Unofficial C# SDK for ACP (Agent Client Protocol) clients and agents
Agent Client Protocol is a protocol proposed by Zed to standardize communication between code editors/IDEs and coding agents.
ACP solves this by providing a standardized protocol for agent-editor communication, similar to how the Language Server Protocol (LSP) standardized language server integration.
Please refer to the official documentation for details.
dotnet add package AgentClientProtocolInstall-Package AgentClientProtocolclass ExampleClient : IAcpClient { ... }var client = new ExampleClient();
using var conn = new ClientSideConnection( _ => client, reader, writer);
conn.Open();
var initResult = await conn.InitializeAsync(new InitializeRequest
{
ProtocolVersion = 1,
ClientCapabilities = new ClientCapabilities
{
Fs = new FileSystemCapability
{
ReadTextFile = true,
WriteTextFile = true
}
}
});
Console.WriteLine($"Connected to agent (protocol v{initResult.ProtocolVersion})");class ExampleClient : IAcpAgent { ... }var agent = new ExampleAgent();
using var conn = new AgentSideConnection(agent, reader, writer);
conn.Open();
await Task.Delay(-1);This library is under the MIT License.