# CLI Reference ```text agentbridge register Register and start a CLI tool adapter list List available adapters (Agent Directory or this machine) handoff Hand off context from one CLI tool to another delegate Delegate a single task to a remote agentbridge adapter over A2A/SLIM request-invite Ask a channel's owner over A2A to let someone into the channel coordinate Run autonomous multi-round coordination toward a programming goal slim Native SLIM helpers and the A2A-over-SLIMRPC surface dir Log in to, pull from, search and verify records in the Agent Directory ``` ## `agentbridge register` Exposes a local tool as an A2A service. **It refuses to start unconfined** — see [Security Notes](security.md#what-a-task-can-do). ```bash docker run --network=none ... agentbridge register \ --tool claude-code --a2a-listen "$SLIM_ENDPOINT" ``` | Flag | Meaning | | --- | --- | | `--tool ` | `generic-stdio`, or a bundled profile: `claude-code`, `copilot`, `codex`, `cursor-agent`, `goose`, `opencode` | | `--name ` | The agent's name — its card, its SLIM name (`agntcy/shadi/-a2a`), what `delegate --to` reaches, and with `SLIM_HUMAN_SEED` its DID. ASCII letters, digits, `-`, `_`; max 64 | | `--command ` | Subprocess command (required for `generic-stdio`) | | `--arg ` | Extra arguments forwarded to the subprocess | | `--slim-endpoint ` | Start a SLIM A2A listener. DID auth only — shared secrets are not supported | | `--slim-advertise ` | Address to advertise when callers reach this agent elsewhere (a published container port, an ingress host). Must carry a port; never changes where the listener attaches | | `--a2a-listen ` | Official A2A unicast listener. Loopback may be plaintext; any other bind requires `A2A_TLS_CERT` / `A2A_TLS_KEY` (TLS 1.3) | | `--a2a-binding ` | `grpc` (default), `jsonrpc`, or `http+json` | | `--admission-policy ` | Callers must present a credential it accepts | | `--dir-publish` | Publish an OASF record to the Agent Directory | | `--verbose` | Print full request/response text rather than a one-line preview | Each distinct `--name` is its own identity, which is what lets one host run several agents that peers can tell apart. A listener also needs a gate on who may send it tasks. `--slim-endpoint` under the default closed admission is gated by the `SLIM_MEMBER_DIDS` allow-list. `--a2a-listen`, and SLIM under open admission (`AGENTBRIDGE_SLIM_ADMISSION=open`), refuse to start unless `--admission-policy` or `AGENTBRIDGE_MEMBER_HUMAN_DIDS` is set. ## `agentbridge list` ```bash agentbridge list --local agentbridge list --skill code-generation ``` | Flag | Meaning | | --- | --- | | `--local` | Listeners started on this host | | `--skill ` | Only agents with this skill (repeatable). Listeners that aren't announced carry no skills and are left out | | `--runtime ` | dir-runtime to ask for running agents (default `localhost:8888`) | | `--published` | Search DIR records instead of running agents — what was published, not what runs | | `--dir-server ` | Agent Directory server (with `--published`) | ## `agentbridge handoff` Moves one agent's context to another. ```bash agentbridge handoff --from claude-code --to copilot --save ctx.json ``` `--from` and `--to` take the same specs as `coordinate`: a native tool name, `generic-stdio:`, `slim:`, or a bare command. `--from-file` replays a saved `ContextPacket` instead of snapshotting a live source. !!! note "The snapshot is a summary" It is an LLM session summary this cycle, not a true session export. ## `agentbridge delegate` One task out, one result back. ```bash agentbridge delegate --to did:key:z6Mk... "write the parser tests" ``` | Flag | Meaning | | --- | --- | | `--to ` | Agent DID, or a local alias from `list --local`. **The DID is the portable name; URLs are locators and can change** | | `--agent-id ` | Your local agent ID (`SHADI_AGENT_ID`, default `avatar`) | | `--endpoint ` | SLIM node (`SLIM_ENDPOINT`, default `127.0.0.1:47357`) | | `--a2a-url ` | Locator override. Does **not** identify the peer — still pass `--to did:key:…` | | `--context-id ` | A2A context to send in. Tasks in one context continue a single harness session on the peer. Omitted, it derives one from `IOC_SESSION_ID`, `CLAUDE_CODE_SESSION_ID`, `CODEX_THREAD_ID` or `CODEX_SESSION_ID`; pass empty for an independent task | ## `agentbridge coordinate` Several agents, several rounds, converging on one artifact. ```bash agentbridge coordinate --goal "implement a JSON parser in Rust" \ --agents claude-code,slim:reviewer --quorum 2 --output parser.rs ``` | Flag | Meaning | | --- | --- | | `--goal ` | What to achieve | | `--agents ` | Comma-separated: `claude-code`, `goose`, `claude-code:/path`, `generic-stdio:`, `slim:`, `slim:@` | | `--quorum ` | Endorsements the winner needs (default 2). A round without them repeats; the last round takes the most-endorsed artifact | | `--max-rounds ` | Rounds before force-finalising (default 5) | | `--pattern

` | CONVERGE class: `development` (default, propose/vote for code), `preference`, `cascade`, `resource` | | `--assembly` | Run ASSEMBLY first and infer the CONVERGE class from replies | | `--require-human` | Require explicit approval before accepting the result | | `--session ` | Scopes the coordinator's SLIM name so concurrent runs don't collide | | `--report ` | Machine-readable JSON run report | See [ASSEMBLY and CONVERGE](assembly-converge.md). ## `agentbridge request-invite` Asks a channel's owner to admit someone. ```bash agentbridge request-invite --owner agntcy/agentbridge/owner \ --channel agntcy/agentbridge/my-room \ --invitee-name agntcy/agentbridge/planner --invitee-did did:key:z6Mk... ``` `--owner-did` is sealed into the signed request so it cannot be redirected to a different agent. No discovery for it exists yet — the caller must already know it. ## `agentbridge dir` Wraps `dirctl`, which must be on the `PATH` (`brew tap agntcy/dir && brew install dirctl`). ```bash agentbridge dir login agentbridge dir pull acme/reviewer:v1.0.0 agentbridge dir verify bafkrei... --oidc-issuer https://token.actions.githubusercontent.com ``` | Command | Meaning | | --- | --- | | `login` | Authenticate with the Agent Directory and keep the token in the secret store | | `pull ` | Fetch an OASF record and cache it in `~/.shadi/records/` | | `info ` | Summarise a record | | `search --skill ` | Search records by OASF skill | | `verify ` | Verify a record's Sigstore signature | The token is `--gh-token` (or `DIRECTORY_CLIENT_GITHUB_TOKEN`), else the secret store key `--token-key` (default `dir/gh_token`), else `dirctl`'s own cached login. `--server-addr` defaults to `prod.gateway.ads.outshift.io:443`. The `dirctl` it runs is the one on the `PATH`, or the one `AGENTBRIDGE_DIRCTL_BINARY` names (`SHADI_DIRCTL_BINARY` still works). `register --record`, `list` and the member lookups use the same variable. ## `agentbridge slim` ```text start-node Run a native SLIM node in the foreground with mTLS defaults a2a-echo-peer Serve one task-backed A2A request over SLIMRPC a2a-send Send a unary or streaming A2A request over SLIMRPC a2a-collaborate Collaborate with a group of A2A peers over SLIMRPC group Create a channel, invite its members, and stay attached as moderator join Join a channel and wait for the moderator's invitation whoami Print this agent's SLIM name, role and DID controller Drive a SLIM node's controller API ``` ### `slim group` Long-running: it creates the channel, invites, and stays attached as moderator. ```bash agentbridge slim group --channel agntcy/agentbridge/my-room \ --members running:code-generation \ --invite agntcy/agentbridge/claude-code ``` | Flag | Meaning | | --- | --- | | `--channel ` | Channel to create and moderate | | `--members ` | Repeatable: `skill:`, `running:`, `did:`, `explicit:=[@]` | | `--invite ` | A name to invite literally, repeatable | | `--runtime ` | dir-runtime for `running:` specs | | `--limit ` | Max results per resolved member source (default 20) | !!! important "`--members` and `--invite` address peers differently" A resolved `--members` candidate is invited **at the listener its DID implies**. A peer that ran `slim join` registers under **its own name**, which only `--invite` can express. Use `--invite` for joiners. ### `slim join` Blocks until the moderator invites it. ```bash agentbridge slim join --channel agntcy/agentbridge/my-room --timeout-seconds 60 ``` Without `--timeout-seconds` it waits indefinitely. Start joiners **before** `slim group`, which invites as soon as it opens the channel. ## Next steps - [Getting Started](getting_started.md) — these commands in order. - [AgentBridge in depth](agentbridge.md) — what each one does underneath. - [Secure Agent Group Demo](demos/did-agent-group.md) — a full run.