Skip to content

Quickstart guide

agentclientprotocol.github.io • November 26, 2026

Spin up a working ACP agent/client loop in minutes. Keep this page beside the terminal and check off each section as you go. Want inspiration? Hop to the Use Cases list to see how teams like kimi-cli or Zed apply the SDK in production.

Python 3.10–3.14 with pip or uv

An ACP-capable client such as Zed (recommended for validation)

Optional: the Gemini CLI ( gemini --acp ; use --experimental-acp for older versions) for the bridge example

Step 1 — Install the SDK ¶

Install the library from PyPI or add it to your uv workspace.

Step 2 — Launch the Echo agent ¶

Run the provided streaming agent so clients have something to talk to.

Start the ready-made echo example; it streams text blocks back to any ACP client. Leave it running in a terminal:

Step 3 — Connect from an ACP-aware client ¶

Point a client at the script and confirm you can exchange streamed updates.

Add an Agent Server entry in settings.json (Zed → Settings → Agents panel):

Open the Agents panel and start the session. Each message you send should be echoed back via streamed session/update notifications.

Any ACP client that communicates over stdio can spawn the same script; no additional transport configuration is required.

Programmatic launch ¶

Prefer to drive agents directly from Python? The spawn_agent_process helper wires stdio and lifecycle management for you:

spawn_agent_process manages the child process, wires its stdio into ACP framing, and closes everything when the block exits. The mirror helper spawn_client_process lets you drive an ACP client from Python as well.

Step 4 — Extend the agent ¶

Swap the echo demo for your own Agent subclass.

Create your own agent by subclassing acp.Agent . The pattern mirrors the echo example:

Run it with run_agent() inside an async entrypoint and wire it to your client. Refer to:

examples/echo_agent.py for the smallest streaming agent

examples/agent.py for an implementation that negotiates capabilities and streams richer updates

examples/duet.py to see spawn_agent_process in action alongside the interactive client

examples/gemini.py to drive the Gemini CLI ( --acp ; use --experimental-acp for older versions) directly from Python

Need builders for common payloads? acp.helpers mirrors the Go/TS helper APIs:

Each helper wraps the generated Pydantic models in acp.schema , so the right discriminator fields ( type , sessionUpdate , and friends) are always populated. That keeps examples readable while maintaining the same validation guarantees as constructing the models directly. Golden fixtures in tests/test_golden.py ensure the helpers stay in sync with future schema revisions.

Optional — Talk to the Gemini CLI ¶

Have the Gemini CLI installed? Run the bridge to exercise permission flows.

If you have the Gemini CLI installed and authenticated:

ACP_GEMINI_BIN — override the CLI path (defaults to PATH lookup)

ACP_GEMINI_TEST_ARGS — extra flags forwarded during the smoke test

ACP_ENABLE_GEMINI_TESTS=1 — opt-in toggle for tests/test_gemini_example.py

Authentication hiccups (e.g. missing GOOGLE_CLOUD_PROJECT ) are surfaced but treated as skips during testing so the suite stays green on machines without credentials.

Compare what you built with the real integrations listed on the Use Cases page.

Explore docs/contrib.md for higher-level utilities like session accumulators and permission brokers.

Run make check / make test before committing changes, and regenerate schema artifacts with make gen-all when ACP versions advance.

Need help? Start a thread in GitHub Discussions or chat with other ACP developers at agentclientprotocol.zulipchat.com .

Extracted Entities