This example demonstrates how to run DeepAgents as an ACP (Agent Client Protocol) server for integration with IDEs like Zed, JetBrains, and other ACP-compatible clients.
-
Install dependencies:
pnpm install
-
Build the packages:
pnpm build
npx tsx examples/acp-server/server.tsDEBUG=true npx tsx examples/acp-server/server.tsWORKSPACE_ROOT=/path/to/your/project npx tsx examples/acp-server/server.tsAdd to your Zed settings (~/.config/zed/settings.json on Linux, ~/Library/Application Support/Zed/settings.json on macOS):
{
"agent": {
"profiles": {
"deepagents": {
"name": "DeepAgents",
"command": "npx",
"args": ["tsx", "examples/acp-server/server.ts"],
"cwd": "/path/to/deepagentsjs",
"env": {
"WORKSPACE_ROOT": "${workspaceFolder}"
}
}
}
}
}JetBrains ACP support is coming soon. Check the ACP documentation for updates.
The DeepAgents ACP server provides:
- Full Filesystem Access: Read, write, edit files in the workspace
- Code Search: Grep and glob patterns for finding code
- Task Management: Todo list tracking for complex tasks
- Subagent Delegation: Spawn specialized subagents for specific tasks
- Session Persistence: Maintain conversation context across interactions
- Multiple Modes: Switch between Agent, Plan, and Ask modes
Edit server.ts to customize:
- Model selection
- System prompt
- Skills and memory paths
- Custom tools
- Middleware configuration
The server implements the Agent Client Protocol:
- Communication: JSON-RPC 2.0 over stdio
- Session management with persistent state
- Streaming responses via session updates
- Tool call tracking and status updates
- Plan/todo list synchronization
- Check that all dependencies are installed:
pnpm install - Ensure packages are built:
pnpm build - Check for TypeScript errors:
pnpm typecheck
Enable debug mode to see detailed logs:
DEBUG=true npx tsx examples/acp-server/server.tsLogs are written to stderr to avoid interfering with the ACP protocol on stdout.
- Verify the command path in your IDE configuration
- Check that the workspace path exists
- Ensure the LLM API key is set (e.g.,
ANTHROPIC_API_KEY)