Expand description
The acp AgentHandler: any Agent Client Protocol agent runs as an Agent’s handler, with
AI6’s environment, accounts and green-ink gate.
§ai6-agent-acp
ai6-agent-acp implements AI6’s Guatiao AgentHandler for any agent that speaks the
Agent Client Protocol (ACP) on its standard input and
output: the Claude and Codex adapters, gemini --acp, or an agent of your own. AI6 starts the
agent through its terminal provider with the Run’s full environment (roster env, AI6_*,
credentials, the pool account) and drives it as an ACP client.
An Agent selects it with handler = "acp" and handler_settings:
[agent.009]
handler = "acp"
model = "sonnet"
handler_settings = { command = "npx", args = ["-y", "@agentclientprotocol/claude-agent-acp@0.99.1"] }§Settings
command (required), args, env (under the Run’s own), meta (a table passed as
session/new._meta, for an adapter’s options), model_option and effort_option (config option
ids), protocol ("v1"), and the timeouts initialize_timeout_ms (20000), request_timeout_ms
(30000), start_timeout_ms (60000) and close_grace_ms (2000), abort_wait_ms (5000), diagnostic_lines (20),
exit_wait_ms (1000) and poll_ms (200), unconfined_desk (false), client_tools (false), and limit_phrases (the words
that mark a failed turn as a provider’s limit). Unknown keys are refused when the handler loads.
§Behaviour
- Permission requests go through the green-ink gate; restricted Runs (answer only, assistant) refuse every request but reading and the tools of their own MCP servers. A tool the agent runs without asking is its own settings’ to take away.
- An agent that dies is reported with its exit status and the last lines it wrote outside the protocol.
- A Mission’s Run at
deskclearance is refused, because AI6 does not choose an external agent’s tools, unlessunconfined_desk = true, reported as a weakening. - Cable and assistant MCP servers are passed as HTTP
mcpServers; an agent without HTTP MCP support is refused when the Run needs it. Theater tools are refused; on a remote Theater the agent works through the client’sfs/*andterminal/*requests, answered from the Theater, and only withclient_tools = true. - The Agent’s context and a restricted Run’s limits go in front of the first prompt (ACP v1 has no system prompt).
- No token counts or quota windows: cost is reported when the agent sends it. A failed turn whose
error holds one of
limit_phrasesstops as limited, so its route or account is passed over.
§Development
Run cargo test -p ai6-agent-acp from the AI6 workspace root. The tests start a scripted fake agent
(src/bin/fake_agent.rs); no Node or model is needed.
§License
MPL-2.0. See LICENSE.
Structs§
- AcpHandler
- Runs an ACP agent for each Run.
- AcpSettings
- What an
acphandler is configured with, in thestationrecord’s[providers.acp]and an Agent’shandler_settings. Unknown keys are refused.
Statics§
- guatiao_
declares - What this library declares, read by a scanner as data.
Functions§
- guatiao_
library_ ⚠entry - The symbol a
guatiaohost loads this library by.