Skip to main content

Module acp

Module acp 

Source
Expand description

ACP (Agent Client Protocol) support for Zed editor integration.

ACP is a JSON-RPC 2.0 protocol over stdio that Zed editor uses to communicate with external agents. This module implements the server side of the protocol, translating ACP method calls into pi’s core agent/session/tool infrastructure.

§Protocol methods

  • initialize — exchange capabilities and protocol version
  • session/new — create a new agent session
  • prompt — send a prompt and stream back results
  • cancel — cancel an in-progress prompt
  • session/list — list existing sessions

§Streaming

Prompt results are streamed as prompt/progress JSON-RPC notifications. Each notification carries incremental content (text deltas, tool calls, tool results) so the client can render in real time.

Structs§

AcpOptions
Options for starting the ACP server.

Functions§

run_stdio
Run the ACP server over stdio.