This page covers external tools connecting into CTOR’s built-in agent. For the reverse — CTOR driving Claude Code, Codex, Pi, or Cursor Agent as the agent behind a chat — see CLI Agents. A chat backed by a CLI agent can’t be driven over this bridge; see Using both ACP features together.
How it works
The desktop app runs a Unix socket server inside the Electron main process. The bridge CLI (bricks desktop-acp-bridge) pipes ACP JSON-RPC messages between stdin/stdout and the socket, so any ACP client can connect.
- Sessions — conversations created via ACP appear in the sidebar and vice versa
- Settings — API keys, default model, and provider config come from the app
- MCP tools —
.mcp.jsontools configured in the project are available - Skills — global and project skills are loaded
Session APIs
In addition tosession/new and session/prompt, the bridge supports:
session/list— enumerate sessions on disk, filterable by project cwdsession/loadandsession/resume— reopen an existing session and stream the full tool-call and message timeline so the client can rebuild state after a refresh or restartsession/set_mode— switch the thinking level (off,minimal,low,medium,high,xhigh,max)session/set_modelandsession/set_config_option— change the model mid-session using the sameprovider::nameidentifiers the desktop GUI exposes
Enable ACP
ACP is disabled by default. To enable it:- Open Settings (gear icon in the sidebar)
- Go to Agent
- Toggle Enable ACP
Prerequisites
- CTOR is running with ACP enabled
- BRICKS CLI is installed (
bun add -g @fugood/bricks-cli) - The working directory is a BRICKS project (contains
application.json)
Verify the connection
Test that the bridge can reach the desktop app:Cannot connect to CTOR, make sure the app is running and ACP is enabled in Settings.
Use with acpx
acpx is a headless CLI client for the Agent Client Protocol. It manages sessions, queues prompts, and streams agent output.Install acpx
Basic usage
Persistent config
Add the agent to~/.acpx/config.json to avoid repeating --agent:
Use with OpenClaw
OpenClaw supports ACP via acpx. With thebricks agent configured in ~/.acpx/config.json (see above), OpenClaw can connect to the desktop app’s agent for multi-agent orchestration.
WebSocket bridge
For ACP clients that speak WebSocket instead of stdio — including browser-based clients and the Agmente iOS app — run the bridge in--ws mode. Each WebSocket client opens its own dedicated connection to the ACP Unix socket; one WebSocket text frame equals one JSON-RPC message.
Use with Agmente
Agmente is an iOS ACP client that lets you talk to the CTOR agent from your iPhone or iPad. It connects over WebSocket, so use the WebSocket bridge above to expose the ACP socket on the LAN:ws://<your-mac-ip>:8765 and supply the token. The phone and the Mac running CTOR must be on the same network — or reachable via VPN or a tunnel such as Tailscale.
Once connected, Agmente uses the session APIs above to list past sessions, resume them, and switch model or thinking level on the fly. Prompts you send from Agmente also stream into the desktop GUI, and vice versa.