Version Info
- OpenClaw: 2026.3.8
- ACPX: 0.1.15
- Last Updated: 2026-03-09
- ACP is an open protocol that connects IDEs and AI coding agents, and OpenClaw uses it to support IDE integration (like Zed Editor) and chat interfaces
- ACPX is OpenClaw's ACP implementation engine, supporting coding agents like Codex/Claude/Gemini/Pi
- Three-layer architecture: IDE/Chat → Gateway → ACPX Runtime → Coding Agents
- Main uses: IDE integration, chat interface, programmatic calls
What can you do with ACP?
- Call Codex/Claude directly from Zed/VS Code
- Use professional coding agents in Discord/Telegram
- Integrate once, support multiple AI tools
ACP (Agent Client Protocol) is the open protocol that makes this possible. It standardizes communication between "editors/IDEs" and "AI coding agents."
- Official website: https://agentclientprotocol.com/
- GitHub: https://github.com/agentclientprotocol/agent-client-protocol
- Similar concept: MCP (Model Context Protocol), but ACP focuses on coding scenarios
Codex CLI → Own command format
Claude Code → Own command format
Gemini CLI → Own command format
Pi Agent → Own command format
If you want to integrate these AIs into your tool, you need to:
- Write different integration code for each tool
- Handle different input/output formats
- Maintain multiple PTY (terminal) capture logic
Your Tool → ACP Protocol → Any ACP-compatible AI agent
Implement ACP once, and you can support all ACP-compatible AI agents!
External Interface (IDE/Chat)
↓
OpenClaw Gateway (Routing Hub)
↓
ACPX Runtime (ACP Implementation)
↓
Coding Agents (Codex/Claude/...)
Simply put:
- Gateway: Unified message routing hub
- ACPX: ACP protocol implementation engine
- Agents: AI tools that actually execute coding tasks
ACPX = ACP eXecution/eXtension
- npm package:
acpx@0.1.15 - Purpose: CLI client implementation of ACP protocol
- Exists as a plugin in OpenClaw (
extensions/acpx/)
| Agent Name | Underlying Tool | Command |
|---|---|---|
pi |
Pi Coding Agent | npx pi-acp |
claude |
Claude Code (Anthropic) | npx -y @zed-industries/claude-agent-acp |
codex |
Codex CLI (OpenAI) | npx @zed-industries/codex-acp |
opencode |
OpenCode | npx -y opencode-ai acp |
gemini |
Gemini CLI (Google) | gemini |
# Use in Discord
/acp spawn codex --mode persistent --thread auto
# Use in Telegram
/acp spawn claude --mode persistentFlow:
Discord/Telegram Message
↓
OpenClaw Gateway
↓
ACPX Runtime
↓
Codex CLI / Claude Code
// Via sessions_spawn tool
sessions_spawn({
runtime: "acp",
agentId: "codex",
message: "Fix the bug in auth.ts"
}){
"acp": {
"enabled": true,
"backend": "acpx",
"defaultAgent": "codex"
}
}{
"plugins": {
"entries": {
"acpx": {
"config": {
"permissionMode": "approve-reads",
"timeoutSeconds": 300,
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "@playwright/mcp"]
}
}
}
}
}
}
}approve-all: Auto-approve all operationsapprove-reads: Auto-approve reads, ask for writes (default)deny-all: Deny all operations
# Create persistent session
/acp spawn codex --mode persistent --thread auto
# One-time execution
/acp spawn claude --mode oneshot# Check status
/acp status
# Set model
/acp model anthropic/claude-3-5-sonnet-20241022
# Set permissions
/acp permissions approve-all
# Set timeout
/acp timeout 600
# Cancel current task
/acp cancel
# Close session
/acp close# Adjust direction without resetting context
/acp steer "focus on performance optimization"ACP sessions can bind to chat threads:
# In Discord thread
/acp spawn codex --mode persistent --thread autoEffect:
- All subsequent messages in that thread route to the same ACP session
- Output returns to the same thread
- Until session closes or thread expires
Supported platforms:
- Discord threads/channels
- Telegram forum topics
- Development environment: Can use
approve-allfor efficiency - Production environment: Recommend
approve-readsor stricter settings - Shared use: Must set
deny-alland manually review each operation
- Cannot spawn ACP sessions from sandboxed sessions
- ACP agents can access host file system
- If sandbox execution needed, use
runtime="subagent"
# ❌ Unsafe: token appears in process list
openclaw acp --token <token>
# ✅ Safe: use file
openclaw acp --token-file ~/.openclaw/gateway.token
# ✅ Safe: use environment variable
export OPENCLAW_GATEWAY_TOKEN=<token>
openclaw acp- Possible cause: Backend plugin not installed or not enabled
- Solution:
openclaw plugins install acpx openclaw config set plugins.entries.acpx.enabled true /acp doctor
- Possible cause: ACP feature globally disabled
- Solution:
openclaw config set acp.enabled true # Restart Gateway openclaw gateway restart
- Possible causes:
- Gateway not started
- URL/token settings incorrect
- Network connection issues
- Solution:
# 1. Check Gateway status openclaw gateway status # 2. Test ACP bridge openclaw acp client # 3. Check connection settings openclaw config get gateway.remote.url
- Possible cause: Trying to start ACP from sandboxed session
- Solution: ACP currently only runs in host runtime, use
runtime="subagent"or start from non-sandbox session
- Possible cause:
permissionModesetting too strict - Solution:
# Allow all operations (development environment) openclaw config set plugins.entries.acpx.config.permissionMode approve-all # Or set graceful degradation openclaw config set plugins.entries.acpx.config.nonInteractivePermissions deny
- Unified interface: One codebase supports multiple AI agents
- Standard protocol: No need to handle PTY capture yourself
- Flexible integration: Can use from IDE, chat, CLI
- Permission control: Fine-grained permission management
- Session management: Persistent conversations, parallel workflows
- ACP = Protocol standard (like HTTP)
- ACPX = OpenClaw's ACP implementation engine
- Agents = AI tools that actually execute coding tasks (Codex/Claude/Gemini/Pi)
- ACP Official Website: https://agentclientprotocol.com/
- ACPX npm: https://www.npmjs.com/package/acpx
- OpenClaw ACP Documentation: https://docs.openclaw.ai/tools/acp-agents
- OpenClaw Configuration Reference: https://docs.openclaw.ai/gateway/configuration-reference