Python SDK

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.

Python SDK

Use Python for ACP automation, research systems, background jobs, task workflows, feedback, notifications, and backend control of threads, computers, resources, and data.

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.

Use COMPUTER_AGENTS_API_KEY or pass api_key explicitly.
Use run() when you want high-level execution quickly.
Switch to resource managers for lifecycle control and automation.
Install the Python SDK
Loading...
Initialize the Python client
Loading...

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.

Use client.threads for stateful thread execution and streaming callbacks.
Use client.tasks for project tickets, comments, releases, sprints, and task-linked threads.
Use client.computers for persistent execution state, runtime management, and compute profiles.
Use client.agents for reusable execution profiles.
Use client.files to work with environment file state directly, including folder downloads as zip archives.
Run ACP from Python
Loading...

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.

Use client.tasks.start_thread() when your application wants to stream the new thread separately.
Use client.tasks.run_thread() when a backend job should create and execute the task thread synchronously.
Use client.threads.set_feedback() and report_issue() to collect structured review data for later analysis.
Use list_permission_requests() and approve_permission_request() when a thread pauses for user approval.
Run planned task work in Python
Loading...

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.

Use client.web_apps for deployed app surfaces.
Use client.functions for backend functions.
Use client.auth for auth modules and user operations.
Use client.databases for database, collection, and document operations.
Use client.notifications for in-app product notifications and push tokens.
Create app resources in Python
Loading...

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.

Use Python for cron-like operations that also need ACP schedules and triggers.
Use the billing and budget surfaces to monitor CT usage programmatically.
Use the git and files helpers to automate repository-aware execution flows.