/agents-cli:agents-cli [teams|accounts|run|sessions|use]from agents-cli
Runs and manages multiple AI coding agents (Claude Code, Codex, Cursor, Gemini, Grok, Kimi, etc.) from one CLI. Supports parallel runs, account management, cross-machine sessions, and version pinning.
Ships in agents-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
agents (alias ag) is one control plane for every AI coding-agent harness —
Claude Code, Codex, Cursor, Antigravity (Gemini), Grok, Kimi, OpenCode, Droid,
OpenClaw, and more. Install it once and it manages versions, accounts, parallel
runs, and cross-machine sessions for all of them.
npm install -g @phnx-labs/agents-cli # provides `agents` and `ag`
agents --version # 1.22.58
Every recipe below is a real command. Run agents <group> --help for the full
flag list — each group ships a workflow-first help block, not a flag dump.
agents teams runs several agents at once on one shared task, each isolated in
its own git worktree, wired into a dependency DAG.
# 1. Create a team
agents teams create pricing-page
# 2. Add teammates — different harnesses, run in parallel, each in its own worktree
agents teams add pricing-page claude "Rewrite the /v2/pricing endpoint" --name backend
agents teams add pricing-page codex "Build the /pricing route, three-tier layout" --name frontend
# 3. DAG dependency — QA waits for BOTH to finish (--after)
agents teams add pricing-page claude "Run the Playwright suite, fix flakes" --name qa --after backend,frontend
# 4. Start everyone (respects --after) and watch live
agents teams start pricing-page --watch
# 5. Check in without re-reading everything
agents teams status pricing-page
# 6. Wind down when shipped
agents teams disband pricing-page
For a single one-off agent (not a team) use agents run <agent> "task" --mode edit.
To fan the same task across your machines rather than agents, add --device auto
(see below).
Each installed harness version can carry its own login, and named accounts let you
pick which one a run uses. agents accounts is the surface.
# See every native login and named account bundle
agents accounts list
# Add a second named login for a harness (runs native login into its own slot)
agents accounts add claude work
# Run on a specific account for just this one run
agents run claude --account work "audit the auth middleware"
# Set the default account for a harness
agents accounts default claude work
# Spread load automatically across the accounts you're signed into
agents run claude -b "fix the failing test" # -b = --strategy balanced
agents view shows every installed version, its bound account, and that account's
live usage bars side by side, so you can see which login has headroom before you run.
Three built-in ways to keep working when a harness or account is rate-limited — no manual babysitting.
# 1. Automatic harness fallback: if Claude rate-limits, retry on Codex, then Antigravity
agents run claude --fallback codex,antigravity "finish the refactor"
# 2. Balanced account rotation: pick the signed-in account you've used least recently
agents run claude -b "keep going"
# 3. Full-auto: pick the harness with the most account headroom AND a fresh account
agents run auto "fix the flaky test" --mode edit
Check headroom first with agents view — the S: (5-hour) and W: (weekly) bars
per account show exactly what's left before you switch.
Sessions sync across your fleet, so a conversation started on one box is searchable and resumable from any other. Resume is machine-aware: it hops to the device that owns the live harness state for you.
# Find the session (the standalone sessions CLI; add --host <box> to search another machine)
sessions "auth middleware"
# Resume by id or short prefix — from ANY machine; it routes to the owning device
agents run auto --resume 019fd0c8-b3e9-77a2-a1a4-444698c4d897
agents run auto --resume 019fd114 "now wire up the tests"
agents run auto --device auto "task" picks the least-loaded worker in your fleet
and runs there; agents devices lists the machines you can reach.
Pin a harness version globally or per-project so every run is reproducible. add
installs; use sets the default (they're separate on purpose).
# Install a specific version (reproducibility)
agents add [email protected]
# Make it the global default (only `use` sets a default)
agents use [email protected]
# Pin THIS project only — written to the project's .agents/agents.yaml
agents use [email protected] --project
# Install a clean, isolated copy that never touches your existing setup
agents add [email protected] --isolated
agents add claude@latest / @oldest resolve symbolic versions. Each pinned
version runs in its own isolated home, so configs and logins never bleed between
releases.
| You want to… | Command |
|---|---|
| See installed agents + usage | agents view |
| Register an MCP server for every harness at once | agents mcp add |
| Drive a real browser (fill forms, screenshot) | browser (standalone CLI; agents setup browser installs it) |
| Store credentials, inject into runs | secrets (standalone CLI) + agents run --secrets <bundle> |
| Schedule recurring agent jobs | OS cron / systemd timer / launchd calling agents run |
| Sync skills/commands/rules across the fleet | agents sync |
Full docs: https://github.com/phnx-labs/agi-cli. Every group teaches its own
workflow — start with agents <group> --help.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ai-agents, multi-agent, cli-tool, parallel-execution, account-management
8 skills in this plugin
/browserDrive a browser via CDP — navigate, click, type, screenshot. Profiles persist login state across sessions, so agents log in once and stay authenticated. Triggers on: 'automate a website', 'browser automation', 'click', 'screenshot', 'scrape', 'log in', 'fill form'./devicesRegister and connect to your machines over Tailscale SSH with agents-cli. Use this skill to sync devices from the tailnet, list them, open a shell on another machine, or see agent sessions running across your whole fleet./runExecute a single agent headlessly or interactively. Supports plan/edit/auto/skip modes, secrets bundle injection, version pinning, fallback chains, balanced rotation, profile dispatch (Kimi/DeepSeek/etc.), and workflow dispatch by name. Triggers on: 'run claude', 'run codex', 'agents run', 'dispatch an agent', 'headless agent', 'one-off agent task'.npx claudepluginhub phnx-labs/agi-cli --plugin agents-cliOther plugins' skills for the same job