Skip to main content Inicio Creadores enuno claude-command-and-control agent-client-protocol
agent-client-protocol 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.
Ir a la instalación Skills Marketplace Descubre y explora habilidades de IA creadas por la comunidad.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Copiar promptMostrar detalles del prompt Un comando directo omite el prompt de revisión. Revisa el origen antes de ejecutarlo.
npx skills add https://github.com/enuno/claude-command-and-control --skill agent-client-protocolEl comando permanece en una sola línea. Desplázate horizontalmente para revisarlo antes de copiarlo.
¿Prefieres una copia local? Descarga los archivos que SkillsMP tiene disponibles ahora.
Descargar Zip Descargando... Ocupaciones relacionadas SOC
Basado en la clasificación ocupacional SOC
Explorador de archivos
2 archivos name agent-client-protocol version 1.0.0 description 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.
Agent Client Protocol Skill
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.
When to Use This Skill
This skill should be triggered when:
Building AI coding agents that need editor integration
Implementing ACP support in code editors or IDEs
Creating tool call handlers for agent operations
Managing file system operations from agents
Implementing session management for AI assistants
Building bridges between existing agents and ACP clients
Understanding JSON-RPC messaging for agent-editor communication
Protocol Overview
The Problem ACP Solves
Before ACP:
Each editor must build custom integrations for every agent
Agents must implement editor-specific APIs
N editors × M agents = N×M integrations needed
After ACP:
One protocol specification
N + M implementations needed
Any agent works with any editor
Deployment Models ┌─────────────────────────────────────────────────────────────┐
│ LOCAL DEPLOYMENT │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ JSON-RPC/stdio ┌──────────────────────┐ │
│ │ Editor │◄────────────────►│ Agent (subprocess) │ │
│ │ (Zed) │ │ (Claude Code) │ │
│ └──────────┘ └──────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ REMOTE DEPLOYMENT │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ HTTP/WebSocket ┌──────────────────────┐ │
│ │ Editor │◄────────────────►│ Cloud Agent │ │
│ │ │ │ (remote server) │ │
│ └──────────┘ └──────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
Supported Ecosystem
Compatible Agents (18+) 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
Compatible Clients/Editors (15+) 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
Protocol Architecture
Communication Model ACP uses JSON-RPC 2.0 with two message types:
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 };
}
interface Notification {
jsonrpc : "2.0" ;
method : string ;
params ?: object ;
}
Session Lifecycle ┌─────────────────────────────────────────────────────────────┐
│ 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
Core Methods
Agent-Side Methods (Required) Method Purpose initializeNegotiate protocol version and capabilities authenticateValidate client credentials session/newCreate new conversation session session/promptProcess user input
Client-Side Methods Method Purpose session/request_permissionGet user authorization for tool execution fs/read_text_fileRead file contents fs/write_text_fileWrite/create files
Content Types ACP defines structured content blocks for data exchange:
Text Content {
"type" : "text" ,
"text" : "Hello, I can help you with your code."
}
Image Content {
"type" : "image" ,
"mimeType" : "image/png" ,
"data" : "base64encodeddata..."
}
Audio Content {
"type" : "audio" ,
"mimeType" : "audio/wav" ,
"data" : "base64encodedaudio..."
}
Embedded Resource {
"type" : "resource" ,
"resource" : {
"uri" : "file:///path/to/file.ts" ,
"mimeType" : "text/typescript" ,
"text" : "const x = 1;"
}
}
Resource Link {
"type" : "resource_link" ,
"uri" : "file:///path/to/document.pdf" ,
"name" : "document.pdf" ,
"mimeType" : "application/pdf" ,
"size" : 1024000
}
Tool Calls
Creating Tool Calls 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"
}
}
}
Tool Call Kinds Kind Description readReading files or data editModifying existing content deleteRemoving files/resources moveMoving/renaming files searchSearching codebase executeRunning commands thinkAgent reasoning fetchHTTP requests otherCustom operations
Tool Call Status Lifecycle pending ──► in_progress ──► completed
│
└──► failed
Permission Requests {
"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" }
]
}
}
File System Operations
Reading Files
{
"jsonrpc" : "2.0" ,
"id" : 1 ,
"method" : "fs/read_text_file" ,
"params" : {
"sessionId" : "session-123" ,
"path" : "/absolute/path/to/file.ts" ,
"line" : 1 ,
"limit" : 100
}
}
{
"jsonrpc" : "2.0" ,
"id" : 1 ,
"result" : {
"content" : "const x = 1;\nconst y = 2;\n..."
}
}
Writing Files
{
"jsonrpc" : "2.0" ,
"id" : 2 ,
"method" : "fs/write_text_file" ,
"params" : {
"sessionId" : "session-123" ,
"path" : "/absolute/path/to/newfile.ts" ,
"content" : "export const config = {};"
}
}
{
"jsonrpc" : "2.0" ,
"id" : 2 ,
"result" : null
}
Important Constraints
All file paths MUST be absolute
Line numbering is 1-based
No edit-in-place operations (full read/write only)
Check clientCapabilities.fs before using
Session Modes Agents can operate in different modes affecting behavior:
Example Modes Mode Description Ask Request permission before any changes Architect Design and plan without implementation Code Full tool access for code modifications
Switching Modes {
"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"
}
}
}
SDK Installation
TypeScript npm install @agentclientprotocol/sdk
import { AgentSideConnection , ClientSideConnection } from '@agentclientprotocol/sdk' ;
const agentConnection = new AgentSideConnection ();
const clientConnection = new ClientSideConnection ();
Python pip install agent-client-protocol
uv add agent-client-protocol
from agent_client_protocol import AgentConnection, ClientConnection
agent = AgentConnection()
client = ClientConnection()
Rust cargo add agent-client-protocol
Kotlin Available via Maven for JVM environments with samples included.
Building an ACP Agent
Minimal TypeScript Agent import { AgentSideConnection } from '@agentclientprotocol/sdk' ;
const agent = new AgentSideConnection ();
agent.on ('initialize' , async (params) => {
return {
protocolVersion : '1.0.0' ,
capabilities : {
modes : {
currentModeId : 'code' ,
availableModes : [
{ id : 'code' , name : 'Code' , description : 'Full coding mode' }
]
}
}
};
});
agent.on ('session/new' , async (params) => {
return {
sessionId : crypto.randomUUID (),
modes : {
currentModeId : 'code' ,
availableModes : [{ id : 'code' , name : 'Code' }]
}
};
});
agent.on ('session/prompt' , async (params) => {
const { sessionId, prompt } = params;
agent.notify ('session/update' , {
sessionId,
update : {
type : 'text_delta' ,
delta : 'Processing your request...'
}
});
const response = await processWithLLM (prompt);
return {
stopReason : 'endTurn' ,
content : [{ type : 'text' , text : response }]
};
});
agent.listen ();
Production Example
MCP Integration ACP integrates with Model Context Protocol (MCP) in three ways:
1. External MCP Servers Editors pass user-configured MCP server configs to agents:
{
"mcpServers" : [
{
"name" : "filesystem" ,
"transport" : "stdio" ,
"command" : "npx" ,
"args" : [ "-y" , "@modelcontextprotocol/server-filesystem" , "/path" ]
}
]
}
2. Editor-Exported Tools Editors expose their own MCP server to agents:
{
"editorMcpServer" : {
"transport" : "stdio" ,
"capabilities" : [ "search" , "diagnostics" , "refactor" ]
}
}
3. Proxy Tunneling For stdio-only MCP support, editors provide proxies routing requests:
Agent ──MCP request──► Editor Proxy ──MCP──► External Server
Design Principles
MCP-Friendly
Built on JSON-RPC 2.0
Reuses MCP content types
Compatible data representations
UX-First
Balances rendering flexibility
Appropriate abstraction levels
Supports diffs, terminal output, file locations
Trusted
Operates in trusted editor context
User controls tool execution
Agents access files and MCP servers
Best Practices
For Agent Developers
Implement all baseline methods : initialize, authenticate, session/new, session/prompt
Stream updates frequently : Use session/update for progress visibility
Request permissions appropriately : Use request_permission for destructive operations
Handle cancellation : Respect session/cancel notifications
Use absolute paths : All file operations require absolute paths
For Client Developers
Declare capabilities accurately : Only advertise supported features
Handle streaming updates : Process session/update notifications in real-time
Implement permission UI : Show user-friendly permission dialogs
Support multiple sessions : Allow concurrent agent sessions
Security Considerations
Validate all file paths (prevent directory traversal)
Implement rate limiting for tool calls
Sanitize user input before passing to agents
Log all operations for audit trails
Error Handling
JSON-RPC Error Codes Code Meaning -32700 Parse error -32600 Invalid request -32601 Method not found -32602 Invalid params -32603 Internal error
Error Response Format {
"jsonrpc" : "2.0" ,
"id" : 1 ,
"error" : {
"code" : -32601 ,
"message" : "Method not found" ,
"data" : { "method" : "unknown/method" }
}
}
Resources
Official Documentation
SDKs
Examples
Community
Version History
1.0.0 (2026-01-10): Initial skill release
Complete protocol overview
Session lifecycle documentation
Tool call and permission handling
File system operations
Session modes
SDK installation guides (TypeScript, Python, Rust, Kotlin)
18 supported agents, 15 supported clients
MCP integration patterns
Best practices and error handling