Skip to content

Migrating to ACP Python SDK 1.x

Key breaking changes when upgrading from 0.12.x to 1.0.0 and from 1.0.x to 1.1.0.

0.12.x to 1.0.0

1. Construct acp.schema models directly

acp.helpers and its top-level builder functions (text_block, update_agent_message_text, start_tool_call, and friends) were removed. Instantiate generated models from acp.schema directly — discriminator fields such as type and sessionUpdate have defaults:

from acp.schema import AgentMessageChunk, TextContentBlock, ToolCallStart

chunk = AgentMessageChunk(content=TextContentBlock(text="Hello"))
tool_call = ToolCallStart(tool_call_id="call-1", title="Read file", kind="read", status="in_progress")

2. Update authentication and schema types

  • EnvVarAuthMethod was replaced by TerminalAuthMethod.
  • ToolCall and ToolCallUpdate gained an optional programmatic name field.
  • Accepted elicitation responses validate content strictly against acp.schema models.

3. Install the [http] extra for web transports

Streamable HTTP and WebSocket transports moved to Starlette and httpx2[http2] under the optional http extra:

pip install "agent-client-protocol[http]"

See Web Transport for current client and ASGI server usage.

1.0.x to 1.1.0

Changes in 1.1.0 primarily affect unstable protocol features updated by the upstream schema-v1.35.0 release:

1. Move MCP-over-ACP to stateless mcp_message

connect_mcp and disconnect_mcp were removed. Unstable MCP-over-ACP now uses stateless mcp_message requests and notify_mcp notifications keyed by server_id and request_id:

from uuid import uuid4

from acp.schema import McpErrorResponse

response = await conn.mcp_message(
    server_id="project-tools",
    request_id=uuid4().hex,
    method="tools/list",
    params={},
)
if isinstance(response, McpErrorResponse):
    print("MCP error:", response.error)

See Stateless MCP-over-ACP for the full handshake and metadata keys.

2. Remove dropped unstable methods

  • Next edit suggestions (start_nes, suggest_nes, close_nes, accept_nes, reject_nes) and document notifications (did_open, did_change, did_close, did_save, did_focus) were removed.
  • PlanUpdateFile was removed alongside the schema's file plan update variant.

3. Expect stricter validation on local models and mcpServers

  • Passing an invalid local Pydantic model instance inside a list field now raises ValidationError instead of being silently dropped.
  • A malformed entry in session/new's mcpServers list now raises ValidationError instead of being skipped.

Verify after upgrading

make check
make test