# Agent Client Protocol (ACP)
Open protocol that standardizes communication between code editors/IDEs and AI coding agents. Analogous to what the [[Language Server Protocol (LSP)]] did for language servers, but for AI agents. Built on JSON-RPC, reuses [[Model Context Protocol (MCP)]] types where possible.
Initiated by [[JetBrains]] and developed as an open standard.
## Problem it solves
Without ACP, every agent-editor combination requires custom integration work. Agents only work with a subset of editors, and choosing an agent often means accepting their available interfaces. ACP decouples agents from editors so both sides can innovate independently.
## Architecture
- **Local agents**: run as sub-processes of the editor, communicating via JSON-RPC over stdio
- **Remote agents**: hosted in the cloud, communicating over HTTP or WebSocket (work in progress)
- Each connection supports several concurrent sessions (multiple conversations at once)
- Heavy use of JSON-RPC notifications for real-time streaming updates
- Bidirectional requests: agents can request things from the editor (e.g., permission for a tool call)
## Design principles
- **MCP-friendly**: reuses MCP types so integrators don't need yet another representation for common data types
- **UX-first**: solves UX challenges of interacting with agents; supports rich elements like diffs. Default format for user-readable text is Markdown
- **Trusted**: assumes the agent is trusted by the user; the editor gives the agent access to local files and MCP servers, with controls over tool calls
## MCP integration
Editors pass user-configured MCP server configurations to the agent when forwarding prompts. The agent connects directly to MCP servers. The editor can also expose its own tools as an MCP server via a proxy tunnel.
## Harness spawning pattern
Beyond editor-agent integration, ACP is now used as the lowest-common-denominator way to **spawn external coding harnesses as managed sessions** from an orchestrator. [[OpenClaw]]'s `acpx` backend is the reference implementation: any ACP-speaking coding CLI can be registered and invoked as a sub-agent without bespoke integration code.
Supported harnesses (as of April 2026) include:
- [[Claude Code]] ([[Anthropic]])
- [[OpenAI Codex|Codex]] ([[OpenAI]])
- [[Gemini CLI]] ([[Google DeepMind]])
- [[Kimi Code]] ([[Moonshot AI]])
- [[OpenCode]]
- [[Pi Mono|Pi]]
This pattern is what lets orchestrators like OpenClaw stay model-agnostic: pick the right coding model for the job without rewriting the agent layer. It also makes swapping from a closed-weight harness (Claude Code, Codex) to an open-weight one (Kimi Code) a configuration change rather than an engineering effort, which has strategic implications for lock-in.
## References
- Introduction: https://agentclientprotocol.com/get-started/introduction
- GitHub organization: https://github.com/agentclientprotocol
- Specification repo: https://github.com/agentclientprotocol/agent-client-protocol
- JetBrains ACP page: https://www.jetbrains.com/acp
## Related
- [[Language Server Protocol (LSP)]]
- [[Model Context Protocol (MCP)]]
- [[AI Agents]]
- [[AI Agent Harness]]
- [[OpenClaw]]
- [[Claude Code]]
- [[OpenAI Codex]]
- [[Gemini CLI]]
- [[Kimi Code]]
- [[Pi Mono]]
- [[JetBrains]]
- [[IntelliJ IDEA]]
- [[JetBrains Air]]