Automate Computer Agents from Python.
The Python SDK mirrors the same ACP platform model as the JavaScript SDK. It works well for data systems, internal tooling, scheduled operations, and service backends that already standardize on Python.
Automate work
Run agents from scripts, services, notebooks, CI jobs, and research pipelines.
Control resources
Create computers, upload files, deploy functions, bind secrets, and inspect logs from Python.
Manage projects
Create project tasks, comments, releases, and task-linked threads from backend systems.
Monitor usage
Read budget state, usage stats, model availability, and product notifications programmatically.
Install and initialize
The Python SDK uses the same product model and API semantics as the JavaScript SDK. Start with one client and then decide whether you want the convenience run() flow or explicit control over threads and resources.
| Install | Install from PyPI in scripts, services, notebooks, backend jobs, and internal tools. Python 3.9 or newer is required. |
|---|---|
| Authenticate | Create an API key in Computer Agents and pass it through COMPUTER_AGENTS_API_KEY or api_key. |
| Start fast | Use client.run() when Python should hand a task to an agent and stream events back to your process. |
| Use as a control plane | Move to explicit managers when your service controls threads, computers, tasks, resources, and usage state. |
Core execution managers
Python exposes the same platform primitives: threads, tasks, computers, agents, files, resources, databases, and automation managers. That keeps service behavior consistent across SDK languages.
| Threads | Multi-turn agent sessions with messages, logs, reasoning, diffs, permission requests, feedback, and resumable state. |
|---|---|
| Computers | Persistent cloud workspaces where agents browse, code, run CLIs, install packages, edit files, and keep state. |
| Projects | Shared workspaces for strategy, releases, tickets, comments, resources, review state, and task-linked threads. |
| Agents | Reusable execution profiles with model, instructions, skills, reasoning effort, and analytics. |
| Files and Git | Automate workspace file access, folder downloads, git status, diffs, commits, branches, clone, and push. |
Tasks, review feedback, and permission decisions
Project work has a dedicated Python surface. Tasks can start multiple linked threads, thread turns can collect thumbs up/down or issue reports, and paused runtime permission requests can be decided from backend services.
| Create tasks | Create planned work with project, release, priority, assignee, reviewer, comments, and status metadata. |
|---|---|
| Start task threads | Use start_thread() for application-controlled streaming or run_thread() for backend jobs that execute immediately. |
| Capture feedback | Use set_feedback() and report_issue() to collect structured quality signals on thread outputs. |
| Approve safely | List, approve, or deny runtime permission requests when an agent pauses before a sensitive action. |
Product-shaped managers in Python
Python also now exposes first-class product managers rather than forcing every app surface through one generic resources object. That keeps day-to-day usage clearer and closer to the ACP product model.
| Web apps | Deploy dashboards, internal tools, portals, prototypes, and AI apps from a source computer. |
|---|---|
| Functions | Deploy APIs, webhooks, jobs, data transforms, and backend actions, then invoke them from Python. |
| Databases | Create structured app state with databases, collections, and JSON documents. |
| Auth | Create authentication modules for sign-up, sign-in, sessions, and user administration. |
| Secrets | Store API keys, tokens, credentials, and private runtime configuration in vaults instead of source code. |
| Resources | Use generic resource operations for cross-kind automation when one workflow handles multiple deployed surfaces. |
Runtime helpers and Python control
The Python SDK controls Computer Agents resources from Python services, notebooks, CI, and jobs. Deployed Node Functions and server-rendered Web Apps use the JavaScript runtime helpers for in-resource access to secrets, databases, auth, and agent runs.
| Python control plane | Create computers, upload files, deploy resources, bind databases and secrets, invoke functions, and inspect logs from Python. |
|---|---|
| Node runtime helpers | Inside deployed Node resources, import helpers from computer-agents/runtime/server to read secrets and use bound resources. |
| Bindings | Use Python to connect databases, auth modules, secrets, web apps, functions, and agent runtimes before deployment. |
| Operations | Monitor deployments, logs, analytics, billing state, and budget state from service backends. |
Automation and platform operations
The Python SDK is especially useful when ACP needs to live inside recurring jobs or backend operations. Skills, schedules, triggers, orchestrations, billing, and git helpers all stay available from one client.
| Schedules | Create recurring ACP work from Python services and jobs. |
|---|---|
| Triggers | Start work from webhook, GitHub, Slack, email, or app events. |
| Orchestrations | Coordinate multi-agent workflows around one objective, including research, build, review, and deployment phases. |
| Git and files | Automate repository-aware work with git helpers and workspace file operations. |
Models, budget, and SDK surface
Use Python to discover model availability, create reusable agents, check budget state, read usage, and choose the right manager for each ACP surface.
| Models | Create agents with Anthropic, OpenAI, Gemini, DeepSeek, Kimi, or connected external models available to the workspace. |
|---|---|
| Budget | Check whether a task can execute before starting work and display account status inside your product. |
| Billing | Read usage stats, transactions, checkout state, and plan information for account-aware applications. |
| Notifications | List in-app notifications and manage push tokens for product surfaces that embed Computer Agents. |
| Context manager | Use ComputerAgentsClient as a context manager in scripts and jobs that should release resources deterministically. |