Skip to content

serve-acp

serve-acp

Run agents as an ACP (Agent Client Protocol) server.

This creates an ACP-compatible JSON-RPC 2.0 server that communicates over stdio streams, enabling your agents to work with desktop applications that support the Agent Client Protocol.

Configuration Layers (merged in order, later overrides earlier):

  1. Global config - ~/.config/agentpool/agentpool.yml for user preferences
  2. Custom config - AGENTPOOL_CONFIG env var for CI/deployment overrides
  3. Project config - agentpool.yml in project/git root for project-specific settings
  4. Explicit config - CLI argument (highest precedence)
  5. Built-in fallback - Only used if no agents defined in any layer

Agent Selection: Use --agent to specify which agent to use by name. Without this option, the pool's default agent is used (set via 'default_agent' in config, or falls back to the first agent).

agentpool serve-acp [OPTIONS] [config]

config

Path to agent configuration (optional)

--show-messages

Flag Show message activity in logs

--debug-messages

Flag Save raw JSON-RPC messages to debug file

--debug-file

File to save JSON-RPC debug messages (default: acp-debug.jsonl)

--debug-commands

Flag Enable debug slash commands for testing ACP notifications

--agent

Name of specific agent to use (defaults to pool's default agent)

--skills

Default: True Flag Load client-side skills from .claude/skills and .agents/skills directories

--max-protocol

Default: 2 Highest ACP version to serve: 2 gives each client the version it asks for (v2 clients v2, others v1); 1 serves every client v1

-t, --transport

Default: stdio Transport type: stdio (default), websocket, or http (Streamable HTTP and WebSocket on one endpoint, experimental)

--host

Host to bind (websocket/http; default: localhost)

--port

Port to listen on (websocket/http; default: 8765)

--token

Environment variableAGENTPOOL_ACP_TOKEN Bearer token clients must send as 'Authorization: Bearer ' (websocket/http; on the WebSocket upgrade request). Required when binding to a non-loopback host

--allow-origin

Multiple values allowed. Browser origin allowed to connect (websocket/http; CORS for http). Requests from other browser origins are refused; repeatable

--ws-host

Default: localhost Deprecated alias of --host

--ws-port

Default: 8765 Deprecated alias of --port

--mcp-config

MCP servers configuration as JSON (format: {"mcpServers": {...}})

--help

Flag Show this message and exit.