WhoBuilt

Building an ACP-Compatible Agent Live

Jul 8, 2026· 18 min· 5.1K views·Watch on YouTube

Speaker

Bennet Fenner, an engineer at Zed, demonstrates how to adapt a minimal TypeScript coding agent to Agent Client Protocol during an AI Engineer session.

Why Zed built ACP

Fenner says Zed wanted users to bring their preferred coding agents into a consistent interface. ACP is an open source, JSON-RPC-based protocol for communication between agents and clients. He cites OpenCode and Cursor as agents with ACP mode, and says up to 40 clients support the protocol, including JetBrains and Obsidian.

Implementing the agent basics

Fenner starts with a minimal Anthropic-powered agent that can read and edit files through two tools. Using the TypeScript SDK, he implements initialization, session creation, prompting, and cancellation. Sessions associate a conversation with an agent instance and the working directory supplied by the client.

Streaming output and tool updates

The first Zed run completes without showing the model's text, so Fenner adds ACP session updates for streamed Anthropic response chunks. He then adds updates to show file-tool calls and their status and results. He also routes file reads through ACP so an editor can provide unsaved buffer contents.

Adding terminal access live

Fenner attempts to demonstrate file edits and diffs, but reports a connection problem and duplicated output. He then has the agent add a terminal tool using ACP APIs that let clients create and manage terminals. The tool builds and runs commands such as `sleep 5` and `ls`.

Protocol details and demo limits

Fenner points viewers to agentclientprotocol.com and says the demo code is not production-ready and had not yet been uploaded. In response to questions, he explains that ACP diffs contain old and new text for the client to compare, and that the current connection uses standard I/O. He says remote transport work is underway.

Takeaways

  • A protocol adapter can let users connect different coding agents to one client interface.
  • A minimal ACP agent needs initialization, session creation, prompting, and cancellation support.
  • Send session updates to display streamed text and tool progress in the client.
  • Use client-provided file-system access when an editor needs to expose unsaved buffer contents.
  • Treat live-coded demos as experiments; Fenner cautions that this generated example is not production-ready.

Mentioned in this talk

Search inside this talk

What was claimed 11

Show all 11 facts

Related talks