ACP Stdio Mode
MicroClaw can run as an Agent Client Protocol (ACP) server over stdio.
Use this mode when you want a local tool or editor integration to talk to MicroClaw as a sessioned chat runtime without going through Telegram, Discord, Slack, or the Web UI.
This page covers the ACP server entry point. It is different from the ACP-backed subagent runtime used by sessions_spawn(runtime="acp").
Start ACP mode
microclaw acp
The process stays attached to stdio and serves ACP until the client disconnects or the process exits.
What ACP mode gives you
- One shared MicroClaw runtime behind ACP stdio transport
- Sessioned chat behavior, including resumed context by session key
- The same tool loop used by normal chat surfaces
- Slash command support for
/stopto cancel the current in-flight run
Typical use cases
- local editor or IDE integrations
- terminal agents that want a stdio chat backend
- thin local wrappers around the MicroClaw runtime
Runtime behavior
- ACP mode uses the normal MicroClaw config file and provider setup
- conversations are persisted like other channels
- each ACP session is mapped into MicroClaw chat/session storage
- cancellation is supported through
/stop
ACP-backed Subagents
MicroClaw can also use ACP as an external worker runtime for subagents. This is separate from microclaw acp.
Enable it in config:
subagents:
acp:
enabled: true
command: codex
args: ["--model", "gpt-5.4"]
Then use sessions_spawn with runtime="acp" to run one background subagent through that external ACP agent process.
If you want multiple ACP workers, define named targets:
subagents:
acp:
enabled: true
default_target: "reviewer"
targets:
reviewer:
enabled: true
command: codex
args: ["--model", "gpt-5.4"]
fast-fix:
enabled: true
command: codex
args: ["--model", "gpt-5.3-codex"]
auto_approve: false
Selection rules:
runtime="acp"usessubagents.acp.default_targetwhen it is set- otherwise it uses the inline
subagents.acp.commandworker when configured - if neither exists and only one named target is enabled, that target is selected automatically
- if multiple named targets are enabled, pass
runtime_target
Current behavior:
- the parent chat still uses the normal MicroClaw lifecycle (
sessions_spawn,subagents_list,subagents_info,subagents_kill,subagents_log) - each ACP run gets the chat working directory as its session workspace
- ACP file read/write and terminal methods are exposed to the external agent inside that workspace
subagents_sendinherits the runtime andruntime_targetfrom the focused ACP runsubagents_logrecords ACP permission, plan, tool-call, file, and terminal events- ACP permission requests are target-configurable with
auto_approve; treat enabled auto-approve as an explicit operator opt-in
Quick verification
Before testing ACP, make sure your config is valid:
microclaw doctor
If the Web control plane is enabled, also check GET /api/config/self_check. It reports ACP warnings such as:
- invalid
subagents.acp.default_target - missing ACP worker commands on the host
auto_approvebeing enabled on the selected target
Then start ACP:
microclaw acp
Recommended validation flow:
- open a session from your ACP client
- send a normal prompt and confirm you get a reply
- send a second prompt in the same session and confirm context is preserved
- start a long-running request, then issue
/stop - reconnect and confirm the runtime still accepts new requests
For ACP-backed subagents, also validate:
- run one
sessions_spawnwithruntime="acp" - if you use named workers, run one with
runtime_target - inspect the run with
subagents_infoorsubagents_log - focus the run, then continue it with
subagents_sendand confirm the target is preserved
When not to use ACP mode
Use microclaw start instead if you want:
- Telegram / Discord / Slack / Feishu / IRC / Web adapters
- Web UI and Web operator APIs
- webhook-triggered automation endpoints
ACP mode is specifically the stdio server entry point.