Build with Computer Agents from JavaScript.
The JavaScript SDK is the main ACP product SDK for Node backends, platform integrations, internal tools, and agent-native products. It gives you both the high-level run() flow and first-class managers for the platform surfaces that teams actually operate.
Run agents
Start threads, stream work, resume sessions, approve permissions, and collect feedback from Node.js.
Ship resources
Deploy web apps, functions, databases, auth, runtimes, and secrets from the same client.
Use runtime helpers
Read bound secrets, write database records, and start agent runs inside deployed Node resources.
Build products
Embed Computer Agents inside your own app with typed managers for the full platform surface.
Install and initialize
The JavaScript SDK is designed to get you from API key to working ACP integration quickly. Start with one client instance and then decide whether you want the high-level run() path or the lower-level resource managers.
| Install | Install the typed Node.js package with npm. Node.js 18 or newer is required. |
|---|---|
| Authenticate | Create an API key in Computer Agents and pass it through COMPUTER_AGENTS_API_KEY or apiKey. |
| Start fast | Use client.run() when your app only needs to hand a task to an agent and stream the result. |
| Go deeper | Use the resource managers when you need exact lifecycle control over threads, computers, projects, and deployments. |
Core execution managers
The SDK exposes the operational ACP model directly. Threads run work, tasks organize planned execution, computers hold state, agents define reusable behavior, and files let you manage the workspace behind a run.
| 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 | Manage workspace files, download folders, inspect git state, create commits, and automate repo-aware workflows. |
Tasks, review feedback, and permission decisions
Project work now has a dedicated SDK 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 without leaving your app.
| Create tasks | Create planned work with project, release, priority, assignee, reviewer, comments, and status metadata. |
|---|---|
| Start task threads | Use startThread() for UI-controlled streaming or runThread() for backend jobs that execute immediately. |
| Capture feedback | Use setFeedback() and reportIssue() 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 SDK managers
ACP now exposes first-class product managers on top of the generic resources layer. That means you can work with web apps, functions, auth, runtimes, secrets, databases, and notifications directly instead of always setting kind manually.
| 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 the SDK. |
| 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 for deployed resources
Inside deployed Node Functions and server-rendered Web Apps, import native runtime helpers from the SDK. This is the supported replacement for local runtime shims and gives deployed code access to bound databases, secrets, auth modules, and agent runs.
| Runtime metadata | getComputerAgentsRuntime(), getConnectedDatabase(), getConnectedAuth(), getConnectedAgentRuntime(), and getConnectedSecrets(). |
|---|---|
| Secrets | listSecrets(), getSecret(), and getSecretValue() for vault-backed runtime configuration. |
| Databases | Create collections, list documents, read documents, write documents, and delete records from bound databases. |
| Auth | Use signUpWithAuthModule(), signInWithAuthModule(), and getAuthModuleUser() from deployed code. |
| Agent runs | Create, start, stream, wait for, inspect, and cancel agent runs from web apps and functions. |
Automation, scheduling, and orchestration
The SDK also covers ACP’s automation layer. You can create skills, schedules, triggers, and multi-agent orchestrations from the same client surface.
| Skills | Publish and update reusable capabilities agents can invoke during project work. |
|---|---|
| Schedules | Run recurring tasks such as daily research briefs, monitoring jobs, and periodic reports. |
| Triggers | Start work from webhooks, GitHub, Slack, email, and other event sources. |
| Orchestrations | Coordinate multi-agent workflows around one objective, including research, build, review, and deployment phases. |
Models, budget, and SDK surface
Use the SDK 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. |
| Errors | Catch ApiClientError to inspect status, code, and user-safe message when API calls fail. |