One launcher for
Claude Code, Pi,
and Hermes.

Pick a model from your gateway, launch the agent, optionally in Docker. No session manager, no proxy — it execs the agent and gets out of the way.

$ npm i -g 9agent
$ 9agent                      # prompts: agent → model → mode
9agent picking an agent, searching the gateway model catalog, choosing a permission mode, then launching the agent and printing its reply
Agent picker → searchable model catalog → permission mode → launch.

Skip the prompts

Every prompt has a flag. Scriptable end to end.

$ 9agent -a claude -m ag/gemini-3.7-flash-high --yolo
$ 9agent -a claude -m ag/gemini-3.7-flash-high --yes safe --sandbox
$ 9agent -a claude -m ag/gemini-3.7-flash-high --yes safe -- --verbose  # passthrough

Requirements

NeedWhy
Node >= 20fetch, import.meta
A gatewayServing GET /v1/models — where the model list comes from. Built for 9Router; anything OpenAI-compatible works
An agentOne of claude, pi, hermes. 9agent launches these, it doesn't bundle them
DockerOnly for --sandbox

No gateway? You get Is 9Router running? and exit 1 — never a hang.

Flags

FlagDescriptionDefault
-a, --agentclaude|pi|hermes, or alias c/cc/p/hpicker
-m, --modelModel idsearchable picker
--sandboxRun the agent in Dockerhost
--yoloSkip permission promptssafe
--yes <mode>Non-interactive: safe|dangerous
--gateway <url>Gateway base URLhttp://localhost:20128/v1
--key <token>Gateway keysk_9router placeholder
--print-onlyPrint the resolved env + argv, spawn nothing
-V, --versionPrint version

The gateway URL comes from --gateway, else NINEROUTER_URL. The key comes from --key, else NINEROUTER_KEY, else LOCAL_9ROUTER_KEY, else the sk_9router placeholder — a local placeholder, not a credential.

Agents

Agent--yolo becomesGateway routing
Claude Code--dangerously-skip-permissionsenv vars
Pinothing — Pi has no permission system~/.pi/agent/models.json
Hermes--yolo9router provider in ~/.hermes/config.yaml

Pi and Hermes have no env var for the base URL, so the gateway must already be in their config. 9agent reads those files; it never writes them.

Sandbox

A blast-radius limiter, not a security boundary against a hostile agent.

$ 9agent -a claude -m ag/gemini-3.7-flash-high --yes safe --sandbox

Only cwd and the agent home are mounted, and anything your host executes — hooks, plugins, settings — is mounted read-only. The full threat model has the per-agent details and known limits.

Design

9agent resolves a model, execs the agent, and mirrors its exit code. It is not a session manager and not a config broker. Two rules follow:

Never rewrites a config you own

Config-driven agents get a ShadowConfig copy instead.

Never supervises what it starts

No wrapping, no proxying, no restarts — so exit codes and signals are the agent's own.

CONTEXT.md is the vocabulary. ADR-0001 records what this trades away.