Protocol guide · v1 stable

ACP protocol: v1 stable, v2 draft

ACP speaks JSON-RPC 2.0. Clients and agents MUST agree on a major version at initialize. New features usually arrive as optional capabilities, not a version bump. v2 is the first planned breaking major since v1.

Stable
Use v1 in production
protocolVersion 1 is the current stable wire format. Session list/resume/close/delete, logout, extra workspace roots, usage updates, message IDs, model config, boolean config options, $/cancel_request, and elicitation are now part of that stable surface.
Draft
Treat v2 as a draft
The v2 schema is published for review. Prompt completion moves off the session/prompt response, updates become ID-keyed upserts, client fs/terminal APIs go away, and several methods are renamed. Gate it on version negotiation and feature flags; do not ship it as the default.

v1 message flow

A typical local connection looks like this.

1

Initialize

Client sends initialize with its latest protocolVersion and clientCapabilities. Agent replies with the chosen version, agentCapabilities, agentInfo, and authMethods.

2

Authenticate

If authMethods is non-empty, the client calls authenticate (v1) before creating a session.

3

Open a session

session/new, or session/load / session/resume when the agent advertises those capabilities.

4

Prompt turn

session/prompt starts a turn. The agent streams session/update. The turn ends with a session/prompt result and a stopReason. session/cancel interrupts.

Methods you will actually implement

Names below are v1. File paths in the protocol MUST be absolute. Line numbers are 1-based.

Agent methods

initializeRequiredNegotiate version, capabilities, and auth methods
authenticateOptionalAuthenticate when the agent advertises auth methods
logoutOptionalEnd the current authenticated state
session/newRequiredCreate a conversation session
session/loadOptionalLoad an existing session when loadSession is advertised
session/resumeOptionalResume a session (stabilized; capability-gated in v1)
session/listOptionalDiscover existing sessions
session/closeOptionalClose an active session without deleting history
session/deleteOptionalRemove a session from history
session/promptRequiredSend a user turn; response includes stopReason
session/cancelNotificationInterrupt the current turn
session/set_modeOptionalSwitch agent operating modes
session/set_config_optionOptionalSet model and other session config selectors
$/cancel_requestNotificationCancel any outstanding JSON-RPC request by id

Client methods

session/request_permissionRequiredAsk the user to authorize a tool call
fs/read_text_fileOptionalRead workspace files
fs/write_text_fileOptionalWrite workspace files
terminal/createOptionalCreate a client-hosted terminal
elicitation/createOptionalCollect structured form or URL-mode input
session/updateNotificationStream chunks, tool calls, plans, usage, and commands

Headline v2 changes

If you only remember five things from the official migration guide:

  • auth/login + auth/logout

    Renamed from authenticate / logout

  • session/resume

    Required; session/load is removed

  • session/list + session/close

    Required baseline session methods

  • session/prompt

    Acknowledges acceptance; completion moves to state_update

  • fs/* and terminal/*

    Removed from the client surface

  • session/set_mode

    Removed; use session/set_config_option

Stabilized since the last site update

ACP now ships features through RFDs without waiting for a major version. These landed in the stable v1 docs.

Transports

Production ACP is still JSON-RPC over stdio to a local subprocess. Full remote-agent support is in progress. A Transports working group is drafting long-lived GET streams plus POST, with WebSocket upgrade on the same endpoint. Until that RFD stabilizes, HTTP layers are vendor-specific.

initialize (v1)

{
  "jsonrpc": "2.0",
  "id": 0,
  "method": "initialize",
  "params": {
    "protocolVersion": 1,
    "clientCapabilities": {
      "fs": {
        "readTextFile": true,
        "writeTextFile": true
      },
      "terminal": true
    },
    "clientInfo": {
      "name": "my-client",
      "title": "My Client",
      "version": "1.0.0"
    }
  }
}

Protocol FAQ