Skip to main content
This endpoint does not guarantee full parity with the Agent Client Protocol (ACP) specification, and the API is currently unstable and subject to change at any time. If you need stability guarantees, contact us.
The Devin ACP WebSocket endpoint lets you connect directly to Devin Cloud using the Agent Client Protocol (ACP). Over a single persistent WebSocket, you can create sessions, send prompts, list or resume existing sessions, and stream live responses, tool calls, and task updates without polling the REST API.

Endpoint

Authentication

Authenticate with a Personal Access Token (PAT) (cog_...) in the Authorization header on the WebSocket upgrade request:
A PAT authenticates as your human user across every organization you have access to, with your normal permissions and the full ACP method set. Connections are rejected if your account disables PATs or if the token violates your account’s PAT policy.
Enterprise accounts: If you want to connect to /acp/live using service user API keys or an OAuth app, reach out to your Cognition account team to request access.

Transport and protocol

/acp/live speaks Agent Client Protocol (ACP) v2 over WebSocket text frames (JSON-RPC 2.0). See the ACP v2 specification for framing, initialization, session setup, and prompt lifecycle. Devin-specific notes:
  • Protocol version: Pass "protocolVersion": 2 in initialize.
  • Organizations and session options: session/new allocates a devin-... sessionId right away and starts the session on the first session/prompt. Pass _meta["cognition.ai/orgId"] in session/new to target a specific organization (or omit it for your default), and use session/set_config_option (for example org_id or repos) before the first prompt.
  • Listing sessions: session/list supports optional _meta filters: cognition.ai/orgIds, cognition.ai/archivedStatus (ACTIVE, ARCHIVED, or ALL), cognition.ai/createdAfter, cognition.ai/updatedAfter, and cognition.ai/content.
  • Server-initiated requests: Reply to any server request (such as elicitation) with the matching id, or return JSON-RPC error -32601 for methods your client does not handle.
  • Reconnects: Send periodic WebSocket pings and handle server-initiated closes during deploy drains or connection-age rotation by reconnecting, running initialize, and re-attaching with session/resume.

Minimal example

This Rust example uses the agent-client-protocol crate over tokio-tungstenite to connect with a Personal Access Token, start an ACP v2 session, send a prompt, and stream Devin’s response until the turn completes.
Cargo.toml
src/main.rs

Next steps