Agent Client Protocol (ACP)
Agent Client Protocol (ACP) standardizes communication between coding agents and code editors or IDEs. With the ACP protocol, you can make use of your custom deep agents with any ACP-compatible client, allowing your code editor to provide project context and receive rich updates.
Note
ACP is designed for agent-editor integrations. If you want your agent to call tools hosted by external servers, see Model Context Protocol (MCP).
Quickstart
Install the ACP integration package:
pip install deepagents-acpuv add deepagents-acpThen expose a deep agent over ACP.
This starts an ACP server in stdio mode (it reads requests from stdin and writes responses to stdout). In practice, you usually run this as a command launched by an ACP client (for example, your editor), which then communicates with the server over stdio.
import asyncio
from acp import run_agent
from deepagents import create_deep_agent
from langgraph.checkpoint.memory import MemorySaver
from deepagents_acp.server import AgentServerACP
async def main() -> None:
agent = create_deep_agent(
model="google_genai:gemini-3.6-flash",
# You can customize your deep agent here: set a custom prompt,
# add your own tools, attach middleware, or compose subagents.
system_prompt="You are a helpful coding assistant",
checkpointer=MemorySaver(),
)
server = AgentServerACP(agent)
await run_agent(server)
if __name__ == "__main__":
asyncio.run(main())import asyncio
from acp import run_agent
from deepagents import create_deep_agent
from langgraph.checkpoint.memory import MemorySaver
from deepagents_acp.server import AgentServerACP
async def main() -> None:
agent = create_deep_agent(
model="openai:gpt-5.5",
# You can customize your deep agent here: set a custom prompt,
# add your own tools, attach middleware, or compose subagents.
system_prompt="You are a helpful coding assistant",
checkpointer=MemorySaver(),
)
server = AgentServerACP(agent)
await run_agent(server)
if __name__ == "__main__":
asyncio.run(main())import asyncio
from acp import run_agent
from deepagents import create_deep_agent
from langgraph.checkpoint.memory import MemorySaver
from deepagents_acp.server import AgentServerACP
async def main() -> None:
agent = create_deep_agent(
model="anthropic:claude-sonnet-5",
# You can customize your deep agent here: set a custom prompt,
# add your own tools, attach middleware, or compose subagents.
system_prompt="You are a helpful coding assistant",
checkpointer=MemorySaver(),
)
server = AgentServerACP(agent)
await run_agent(server)
if __name__ == "__main__":
asyncio.run(main())import asyncio
from acp import run_agent
from deepagents import create_deep_agent
from langgraph.checkpoint.memory import MemorySaver
from deepagents_acp.server import AgentServerACP
async def main() -> None:
agent = create_deep_agent(
model="openrouter:z-ai/glm-5.2",
# You can customize your deep agent here: set a custom prompt,
# add your own tools, attach middleware, or compose subagents.
system_prompt="You are a helpful coding assistant",
checkpointer=MemorySaver(),
)
server = AgentServerACP(agent)
await run_agent(server)
if __name__ == "__main__":
asyncio.run(main())import asyncio
from acp import run_agent
from deepagents import create_deep_agent
from langgraph.checkpoint.memory import MemorySaver
from deepagents_acp.server import AgentServerACP
async def main() -> None:
agent = create_deep_agent(
model="fireworks:accounts/fireworks/models/glm-5p2",
# You can customize your deep agent here: set a custom prompt,
# add your own tools, attach middleware, or compose subagents.
system_prompt="You are a helpful coding assistant",
checkpointer=MemorySaver(),
)
server = AgentServerACP(agent)
await run_agent(server)
if __name__ == "__main__":
asyncio.run(main())import asyncio
from acp import run_agent
from deepagents import create_deep_agent
from langgraph.checkpoint.memory import MemorySaver
from deepagents_acp.server import AgentServerACP
async def main() -> None:
agent = create_deep_agent(
model="baseten:zai-org/GLM-5.2",
# You can customize your deep agent here: set a custom prompt,
# add your own tools, attach middleware, or compose subagents.
system_prompt="You are a helpful coding assistant",
checkpointer=MemorySaver(),
)
server = AgentServerACP(agent)
await run_agent(server)
if __name__ == "__main__":
asyncio.run(main())import asyncio
from acp import run_agent
from deepagents import create_deep_agent
from langgraph.checkpoint.memory import MemorySaver
from deepagents_acp.server import AgentServerACP
async def main() -> None:
agent = create_deep_agent(
model="ollama:north-mini-code-1.0",
# You can customize your deep agent here: set a custom prompt,
# add your own tools, attach middleware, or compose subagents.
system_prompt="You are a helpful coding assistant",
checkpointer=MemorySaver(),
)
server = AgentServerACP(agent)
await run_agent(server)
if __name__ == "__main__":
asyncio.run(main())The deepagents-acp package includes an example coding agent with filesystem and shell that you can run out of the box.
Clients
Deep agents work anywhere you can run an ACP agent server. Some notable ACP clients include:
- Zed
- JetBrains IDEs
- Visual Studio Code (via vscode-acp)
- Neovim (via ACP-compatible plugins)
Zed
The deepagents repo includes a demo ACP entrypoint you can register with Zed:
- Clone the
deepagentsrepo and install dependencies:
git clone https://github.com/langchain-ai/deepagents.git
cd deepagents/libs/acp
uv sync --all-groups
chmod +x run_demo_agent.sh- Configure credentials for the demo agent:
cp .env.example .envThen set ANTHROPIC_API_KEY in .env.
- Configure your ACP agent server command in Zed's
settings.json:
{
"agent_servers": {
"DeepAgents": {
"type": "custom",
"command": "/your/absolute/path/to/deepagents/libs/acp/run_demo_agent.sh"
}
}
}- Open Zed's Agents panel and start a Deep Agents thread.
Toad
If you want to run an ACP agent server as a local dev tool, you can use Toad to manage the process.
uv tool install -U batrachian-toad
toad acp "python path/to/your_server.py" .
# or
toad acp "uv run python path/to/your_server.py" .Info
See the upstream ACP docs for protocol details and editor support:
- Introduction: https://agentclientprotocol.com/get-started/introduction
- Clients/editors: https://agentclientprotocol.com/get-started/clients