agentproto CLI
The agentproto binary is the reference host for AgentProto agent-CLI
adapters. It installs adapter packages (claude-code, claude-sdk,
hermes, opencode, jcode, codex, mastra-agent, openclaw, antigravity, grok-cli, copilot-cli, …), runs them locally
for a single turn or a long-lived session, exposes them as a daemon over
an outbound WebSocket tunnel, and orchestrates multi-agent swarms
through the runtime kernel.
This tree is tool docs — what the binary does, what flags it takes, what files it touches. For the protocol it implements, see the AIPs at https://agentproto.sh/docs.
Status: alpha. The package is pre-1.0 (
0.20.0). See../../VERSIONING.mdfor what the alpha guarantees and what may change between minor releases.
Three ways in
Pick whichever matches what you're trying to do:
- Run a Claude Code (or other) session locally —
getting-started.mdwalks throughinstallrunfor a single turn. For a persistent session attached to your terminal, seeverbs/sessions.md.
- Share your machine with a hosted agent (a self-hosted
gateway, …) — see
verbs/auth.mdfor the device flow, thenverbs/serve.mdfor the daemon with--connect. - Orchestrate a multi-agent swarm —
concepts/swarms.mdintroduces the model,verbs/run-swarm.mdcovers the verb.
Reference
Verbs
agentproto app— package, unpack, or serve an agentproto app bundle (.agentapp)agentproto acp— manage generic ACP agents (zero-code ACP CLIs)agentproto adapters— manage runtime adapters (swarm-kernel substrates/dispatchers/executors)agentproto auth— log in to a host (RFC 8628 device flow)agentproto brain— fuzzy (BM25) search over a workspace's ingested session transcriptsagentproto browser— manage browser service sessions (Camofox, Bureau, Chromium)agentproto chat/chat-tui— interactive REPL on a daemon agent sessionagentproto config— read/write~/.agentproto/config.jsonagentproto conversation— locate the native transcript behind a session, or the session behind a native transcriptagentproto cron— durable cron jobs on the daemon (command, fresh agent, or re-prompt a live session)agentproto daemon— install/start/restart/stop the background serviceagentproto devices— list/rename/revoke devices known to this daemonagentproto doctor— read-only health check of the whole install (--jsonfor bug reports)agentproto install— install an adapter or a runtime profileagentproto install-mcp— register the daemon's MCP server with installed coding CLIsagentproto mcp-bridge— stdio MCP proxy to the daemon/mcpendpointagentproto mcp-app— stdio MCP server scoped to one installed app's toolsagentproto mcp— imported-MCP maintenance: move secrets to the keychain, mount imports natively per adapteragentproto models— list runnable models per adapter with provider-key statusagentproto onboard— alias of thesetupwizardagentproto pack— generate a versioned skill pack from a manifestagentproto pair— end-to-end pairing with a daemon over an untrusted rendezvousagentproto permissions— held tool-permission requests: list, approve/deny, or auto-resolve withwatchrulesagentproto policy— CLI surface for the daemon's completion-policy engine (shell/judge gates, commit + human-ack)agentproto review— run, verify and scaffold REVIEW.md reviews (pre-push hook + GitHub Actions shim)agentproto provider-preset— list provider gateway definitions + key-env statusagentproto preset— manage saved user spawn configurationsagentproto remote— publish this gateway (or another local port) to the internet via Cloudflare, bearer-gatedagentproto rendezvous— self-host the untrusted pairing brokeragentproto run— one-shot adapter turnagentproto run-swarm— kernel-routed multi-agent loopagentproto sandbox— attach to an already-existing sandbox (Box/e2b) without tearing it downagentproto sentinel— watch a GitHub PR/subject, deliver matching events back into a session's inboxagentproto serve— daemon mode (local-only or tunnelled)agentproto sessions— browse/start/attach/stop daemon sessionsagentproto setup— onboarding wizard (no slug), or re-run an adapter's post-install pipeline (setup <slug>)agentproto task— create/list/claim/update tasks on the daemon's Task ledgeragentproto tunnel— manage public Cloudflare/Ngrok tunnelsagentproto usage— local-derived, provider-agnostic spend estimate over a rolling windowagentproto workflow— start, inspect, and cancel background workflow runs on the daemonagentproto workspace— register local workspacesagentproto worktree— git worktree lifecycle (provision underworktrees.root, status-awarels, guarded/salvage removal,gc)agentproto branch— branch gc: classify local/remote/orphan refs as reclaim/review/hold, reversible apply, review queueagentproto maintain— plan/review (and optionally apply) branch + worktree gc for a repo, via the built-inrepo-maintenanceapp's workflowagentproto steward— judge idle agent sessions, then close or flag them with a recorded outcome, via the built-insession-stewardapp's workflow (dry run by default)
Concepts
- Adapters — what
@agentproto/adapter-*packages are - Plugins — extending the swarm kernel
- Roles — spawn-time delegation gate, the privilege lattice, and role packs
- Runtime profiles —
runtime-profile/<name>scaffolding - Swarms — manifest + kernel cycle model
- Credentials — how host tokens are stored
- Device fleet — driving a fleet of paired hosts from one controller: the three capabilities, bring-up, addressing, and the F1–F12 failure taxonomy
- Hooks and sandbox — the two enforcement planes (ACP semantic gate vs. OS sandbox), the 3-tier cross-harness coverage matrix, and config surfaces (
.agentproto/hooks.json,.agentproto/command-sandbox.json) - Session transcripts — structured per-session capture, event kinds, native vs daemon export
Guides
- Use agentproto as an MCP server inside coding CLIs — register the daemon in Claude Code, Codex, and Hermes
- Agent tools inside your app's agent — the daemon MCP tools an app's spawned agents get, and how AGENT.md shapes the spawn
- Create an agentproto app — scaffold, build, and serve an app bundle end to end
- Build your own agent app — concepts, authoring, UI, data, lifecycle, testing, and packaging, end to end
- Sandboxes and rendezvous: boot-and-drive vs. attach — connection models, keeping a box reachable, and the cost tradeoffs
- Hand off from Claude Code to Codex — checkpoint a session and continue its work on another harness, with
--dry-run
File reference
Install
npm i -g @agentproto/cli
agentproto --version
agentproto --version --check-updates # also compare against the published version on npm--check-updates makes one npm registry call and prints an update hint only
when a newer version is published; it prints nothing extra when already
current or offline. --version alone stays instant and offline — safe in
scripts and CI.
Node ≥ 20.9.0. Optional node-pty for terminal sessions —
npm i -g node-pty if you want agentproto sessions terminal and
PTY-backed agent attach.