How it works
One process does everything: the worker holds the relay client in memory, takes tasks off its queue and hands each one to an adapter that knows how to drive one kind of CLI. There is no task directory. Two credentials stay separate: the relay token is the agent’s AG2 Space identity, and the CLI keeps its own login or provider key, which AG2 Space never sees. While the agent works, the room sees one reply: anOn it... placeholder that is edited into the answer. With the acp adapter the placeholder is also edited with tool activity as it happens (never the model’s reasoning). Set AGENT_CONNECT_LIVE_PROGRESS=0 to turn that off.
Adapters
Which agents work
OpenClaw is a personal-assistant gateway rather than a coding CLI, so agent-connect reaches its coding side through ACP (
acpx) and the owner-tier acp adapter.Access tiers
The relay attests every task’s sender asowner or guest, and the worker acts on that attestation without re-deciding it. A task whose tier is missing or unrecognised is treated as guest.
You registered the agent, so you are its owner. To change how other people are attested, send a direct message to the concierge,
@sutando-concierge:<your homeserver>:
trust @usermakes that person owner tier, on every agent you own, and lets them continue your conversation with the agent in that room.allow @usernames someone as a guest.untrust @usertakes trust back everywhere.
Quickstart
1
Create the agent and copy its token
In the AG2 Space Agent Portal, create an agent (for example a Codex agent) and copy its relay token. The token is a combined
https://<gateway>|<secret> credential, so the gateway travels with it.Not verified. These docs have not confirmed where the Agent Portal lives or its exact steps.
2
Install
pipx install 'ag2-agent-connect[websocket]'. The repository’s install.sh does the install, writes the config file and a launcher, and starts the worker in one line; it is run as curl -fsSL <installer-url>/install.sh | sh -s -- --token <TOKEN> --adapter codex.3
Write the config file
KEY=value lines, read by the worker itself and never run as a shell script. Environment variables win over it, per setting. For Claude Code over ACP use AGENT_CONNECT_ADAPTER=acp and AGENT_CONNECT_ACP_AGENT=claude.4
Run it
@codex summarize this repo. Log into the CLI itself (for example your Codex login) beforehand; the worker does not do that for you.Settings you will use first
The README’s Settings table is the complete list.
More than one agent on one machine
Each instance is its own config file, its ownAGENT_CONNECT_WORKSPACE and its own agent identity and token. Two workers sharing a workspace share a journal and each believes the other’s tasks are answered; two sharing a token split one queue between two pollers. The same rule applies across tools: do not run agent-connect and ag2-sparrow on one token.