skills-templates/agent-client-protocol/SKILL.md
Agent Client Protocol (ACP) - Standardized communication between code editors and AI coding agents. Use for building ACP-compatible agents, integrating agents with editors (Zed, JetBrains, Neovim), implementing tool calls, file operations, and session management.
npx skillsauth add enuno/claude-command-and-control agent-client-protocolInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The Agent Client Protocol (ACP) is a standardized communication framework between code editors (IDEs) and AI coding agents, similar to how the Language Server Protocol (LSP) unified language server integration. ACP enables any compatible agent to work with any compatible editor without custom integrations.
Core Value Proposition: Build once, run everywhere - agents implementing ACP work with any compatible editor, and editors supporting ACP gain access to all ACP-compatible agents.
This skill should be triggered when:
Before ACP:
After ACP:
┌─────────────────────────────────────────────────────────────┐
│ LOCAL DEPLOYMENT │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ JSON-RPC/stdio ┌──────────────────────┐ │
│ │ Editor │◄────────────────►│ Agent (subprocess) │ │
│ │ (Zed) │ │ (Claude Code) │ │
│ └──────────┘ └──────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ REMOTE DEPLOYMENT │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ HTTP/WebSocket ┌──────────────────────┐ │
│ │ Editor │◄────────────────►│ Cloud Agent │ │
│ │ │ │ (remote server) │ │
│ └──────────┘ └──────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
| Agent | Description | |-------|-------------| | Claude Code | Anthropic's coding agent (via Zed adapter) | | Gemini CLI | Google's AI coding assistant | | Goose | Block's open-source coding agent | | OpenHands | Open-source AI software engineer | | Codex CLI | OpenAI's coding agent (via adapter) | | Augment Code | AI pair programming | | Blackbox AI | Code generation agent | | Docker cagent | Containerized agent | | Mistral Vibe | Mistral AI coding assistant | | Qwen Code | Alibaba's coding agent | | JetBrains Junie | JetBrains AI agent (coming soon) | | fast-agent | Lightweight ACP agent | | OpenCode | Open-source coding agent | | Stakpak | Infrastructure agent | | VT Code | Visual coding agent | | AgentPool | Multi-agent pool | | Code Assistant | General coding assistant | | Kimi CLI | Moonshot AI agent |
| Client | Platform | |--------|----------| | Zed | Native desktop editor | | JetBrains | IntelliJ IDEA, PyCharm, WebStorm, etc. | | Neovim | Via CodeCompanion or avante.nvim | | Emacs | Via agent-shell.el | | Obsidian | Via Agent Client plugin | | marimo notebook | Python notebook | | DeepChat | Chat interface | | DuckDB | Via sidequery extension | | Agmente | iOS client | | AionUi | Web UI | | aizen | CLI client | | Tidewave | Phoenix LiveView | | Toad | Database client | | Web Browser | Via AI SDK provider | | Sidequery | Coming soon |
ACP uses JSON-RPC 2.0 with two message types:
// Methods: Request-Response pairs
interface Request {
jsonrpc: "2.0";
id: string | number;
method: string;
params?: object;
}
interface Response {
jsonrpc: "2.0";
id: string | number;
result?: any;
error?: { code: number; message: string; data?: any };
}
// Notifications: One-way messages (no response)
interface Notification {
jsonrpc: "2.0";
method: string;
params?: object;
}
┌─────────────────────────────────────────────────────────────┐
│ SESSION LIFECYCLE │
└─────────────────────────────────────────────────────────────┘
1. INITIALIZATION
Client ──initialize──► Agent
Client ◄──capabilities── Agent
Client ──authenticate──► Agent (if required)
2. SESSION SETUP
Client ──session/new──► Agent (new conversation)
OR
Client ──session/load──► Agent (resume existing)
3. PROMPT TURN CYCLE (repeats)
Client ──session/prompt──► Agent
Agent ──session/update──► Client (streaming)
Agent ──request_permission──► Client (if needed)
Client ◄──response── Agent
4. TERMINATION
Client ──session/cancel──► Agent (interrupt)
OR
Connection closes
| Method | Purpose |
|--------|---------|
| initialize | Negotiate protocol version and capabilities |
| authenticate | Validate client credentials |
| session/new | Create new conversation session |
| session/prompt | Process user input |
| Method | Purpose |
|--------|---------|
| session/request_permission | Get user authorization for tool execution |
| fs/read_text_file | Read file contents |
| fs/write_text_file | Write/create files |
ACP defines structured content blocks for data exchange:
{
"type": "text",
"text": "Hello, I can help you with your code."
}
{
"type": "image",
"mimeType": "image/png",
"data": "base64encodeddata..."
}
{
"type": "audio",
"mimeType": "audio/wav",
"data": "base64encodedaudio..."
}
{
"type": "resource",
"resource": {
"uri": "file:///path/to/file.ts",
"mimeType": "text/typescript",
"text": "const x = 1;"
}
}
{
"type": "resource_link",
"uri": "file:///path/to/document.pdf",
"name": "document.pdf",
"mimeType": "application/pdf",
"size": 1024000
}
Agents report tool invocations via session/update:
{
"jsonrpc": "2.0",
"method": "session/update",
"params": {
"sessionId": "session-123",
"update": {
"type": "tool_call",
"toolCallId": "tc-456",
"title": "Reading configuration file",
"kind": "read",
"status": "pending"
}
}
}
| Kind | Description |
|------|-------------|
| read | Reading files or data |
| edit | Modifying existing content |
| delete | Removing files/resources |
| move | Moving/renaming files |
| search | Searching codebase |
| execute | Running commands |
| think | Agent reasoning |
| fetch | HTTP requests |
| other | Custom operations |
pending ──► in_progress ──► completed
│
└──► failed
{
"jsonrpc": "2.0",
"id": 1,
"method": "session/request_permission",
"params": {
"sessionId": "session-123",
"toolCallId": "tc-456",
"options": [
{ "label": "Allow", "action": "allow" },
{ "label": "Always Allow", "action": "allow_always" },
{ "label": "Deny", "action": "deny" }
]
}
}
// Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "fs/read_text_file",
"params": {
"sessionId": "session-123",
"path": "/absolute/path/to/file.ts",
"line": 1,
"limit": 100
}
}
// Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": "const x = 1;\nconst y = 2;\n..."
}
}
// Request
{
"jsonrpc": "2.0",
"id": 2,
"method": "fs/write_text_file",
"params": {
"sessionId": "session-123",
"path": "/absolute/path/to/newfile.ts",
"content": "export const config = {};"
}
}
// Response (success)
{
"jsonrpc": "2.0",
"id": 2,
"result": null
}
clientCapabilities.fs before usingAgents can operate in different modes affecting behavior:
| Mode | Description | |------|-------------| | Ask | Request permission before any changes | | Architect | Design and plan without implementation | | Code | Full tool access for code modifications |
Client-initiated:
{
"jsonrpc": "2.0",
"id": 1,
"method": "session/set_mode",
"params": {
"sessionId": "session-123",
"modeId": "code"
}
}
Agent-initiated (notification):
{
"jsonrpc": "2.0",
"method": "session/update",
"params": {
"sessionId": "session-123",
"update": {
"type": "current_mode_update",
"modeId": "architect"
}
}
}
npm install @agentclientprotocol/sdk
import { AgentSideConnection, ClientSideConnection } from '@agentclientprotocol/sdk';
// For building an agent
const agentConnection = new AgentSideConnection();
// For building a client
const clientConnection = new ClientSideConnection();
API Reference: https://agentclientprotocol.github.io/typescript-sdk
pip install agent-client-protocol
# or with uv
uv add agent-client-protocol
from agent_client_protocol import AgentConnection, ClientConnection
# For building an agent
agent = AgentConnection()
# For building a client
client = ClientConnection()
API Reference: https://agentclientprotocol.github.io/python-sdk
cargo add agent-client-protocol
Crates.io: https://crates.io/crates/agent-client-protocol
Available via Maven for JVM environments with samples included.
import { AgentSideConnection } from '@agentclientprotocol/sdk';
const agent = new AgentSideConnection();
// Handle initialization
agent.on('initialize', async (params) => {
return {
protocolVersion: '1.0.0',
capabilities: {
modes: {
currentModeId: 'code',
availableModes: [
{ id: 'code', name: 'Code', description: 'Full coding mode' }
]
}
}
};
});
// Handle new sessions
agent.on('session/new', async (params) => {
return {
sessionId: crypto.randomUUID(),
modes: {
currentModeId: 'code',
availableModes: [{ id: 'code', name: 'Code' }]
}
};
});
// Handle prompts
agent.on('session/prompt', async (params) => {
const { sessionId, prompt } = params;
// Stream updates to client
agent.notify('session/update', {
sessionId,
update: {
type: 'text_delta',
delta: 'Processing your request...'
}
});
// Process prompt with your LLM
const response = await processWithLLM(prompt);
return {
stopReason: 'endTurn',
content: [{ type: 'text', text: response }]
};
});
// Start listening on stdio
agent.listen();
See the Gemini CLI implementation for a complete, production-ready ACP agent.
ACP integrates with Model Context Protocol (MCP) in three ways:
Editors pass user-configured MCP server configs to agents:
{
"mcpServers": [
{
"name": "filesystem",
"transport": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path"]
}
]
}
Editors expose their own MCP server to agents:
{
"editorMcpServer": {
"transport": "stdio",
"capabilities": ["search", "diagnostics", "refactor"]
}
}
For stdio-only MCP support, editors provide proxies routing requests:
Agent ──MCP request──► Editor Proxy ──MCP──► External Server
initialize, authenticate, session/new, session/promptsession/update for progress visibilityrequest_permission for destructive operationssession/cancel notificationssession/update notifications in real-time| Code | Meaning | |------|---------| | -32700 | Parse error | | -32600 | Invalid request | | -32601 | Method not found | | -32602 | Invalid params | | -32603 | Internal error |
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32601,
"message": "Method not found",
"data": { "method": "unknown/method" }
}
}
tools
MemPalace local-first AI memory system. Use when setting up persistent memory for Claude Code sessions, mining project files or conversation transcripts, querying past context, configuring MCP tools, managing the knowledge graph, or troubleshooting palace operations.
tools
LangSmith Python SDK — trace, evaluate, and monitor LLM applications. Covers @traceable decorator, trace context manager, Client API, evaluate() / aevaluate(), comparative evaluation, custom evaluators, dataset management, prompt caching, ASGI middleware, and pytest plugin.
development
LangGraph (Python) — build stateful, controllable agent graphs with checkpointing, streaming, persistence, interrupts, fault tolerance, and durable execution. Covers both Graph API (StateGraph) and Functional API (@entrypoint/@task).
development
LangGraph Graph API (Python) — build explicit DAG agent workflows with StateGraph, typed state, nodes, edges, Command routing, Send fan-out, checkpointers, interrupts, and streaming. Use when you need explicit control flow and graph topology.