ACP 使用 JSON-RPC 对消息进行编码。JSON-RPC 消息必须使用 UTF-8 编码。 协议目前为代理-客户端通信定义了以下传输机制:Documentation Index
Fetch the complete documentation index at: https://acp-docs.cxykevin.top/llms.txt
Use this file to discover all available pages before exploring further.
- stdio,通过标准输入和标准输出进行通信
- Streamable HTTP(草案提案进行中)
stdio
在 stdio 传输中:- 客户端将代理作为子进程启动。
- 代理从其标准输入(
stdin)读取 JSON-RPC 消息,并将消息发送到其标准输出(stdout)。 - 消息是单独的 JSON-RPC 请求、通知或响应。
- 消息以换行符(
\n)分隔,不得包含嵌入式换行符。 - 代理可以将 UTF-8 字符串写入其标准错误(
stderr)以用于日志记录。客户端可以捕获、转发或忽略这些日志。 - 代理不得向其
stdout写入任何不是有效 ACP 消息的内容。 - 客户端不得向代理的
stdin写入任何不是有效 ACP 消息的内容。