Skip to main content
Every command accepts a global --json flag that emits a stable envelope to stdout for scripting, piping, and coding agents: {"success": true, "data": …} on success, {"success": false, "error": {"code", "message", "suggestion"}} on failure. Run apollo <command> --help for the live flag list on your installed version.

Quick Reference

Global Flags

Place global flags before the subcommand; command-specific flags go after it (apollo --json push -m "…"). Exit codes: 0 success · 1 runtime/API failure · 2 validation failure · 3 authentication/configuration failure.

Session & Context

Authenticate with Apollo. With no options, opens the browser sign-in flow.
Invalidate the remote session (best-effort) and remove the local credential.
Show the active Apollo context: profile, checkout, authentication, organization, project, agent, version, runtime, and token expiry.
Diagnose the setup end to end: runtimes (Node/Bun), install origin, shell integration, APOLLO_* overrides, terminal capabilities, credential permissions, token expiry, the current checkout, and service reachability. Read-only, with the fix attached to every finding; exits 2 on problems. Share its output when reporting issues.
Upgrade Apollo from npm (@aui.io/apollo).
Show or select the active credential profile. Profiles keep separate credentials for different users or contexts.
--profile <name> before any command is a one-command override; it does not change the saved default. Change the default with apollo profile use.
List organizations and re-scope the access token to one. use without an id opens an interactive picker.
You rarely need this directly — apollo agent use switches the organization-scoped token automatically when the selected agent requires another org.
Manage projects — the containers agents live in. use inside a checkout updates that checkout’s .apollorc; outside any checkout it sets the account default.

Agents & Checkouts

Manage agents and their local checkouts. A checkout is a directory holding one agent, pinned by its own .apollorc. With shell integration, use, import, and create also cd into the checkout.
agent create options:agent import options:Import writes .apollorc, materializes the program files, registers the checkout, makes the agent active, installs the authoring skill packs, and records a local diff baseline. agent use only enters checkouts already known to the registry — import remote-only agents first.
There is intentionally no delete command. agent unlink removes only the local binding.
Select the runtime (engine build) this checkout runs against.

Authoring

Validate the local agent program — the verdict plus the orphan and era censuses. Exits 2 on findings.
Compare local files with the last baseline (the last successful import, pull, or push).
Pull the selected agent version plus the schemas, skills, and AGENTS.md its runtime serves. Pull refuses to overwrite local changes unless forced; a successful pull makes bundle/src match the remote snapshot exactly, including deleting local files no longer in the remote bundle.
Validate and push local changes — a changed program mints a version; a changed bundle/build ships a build bundle. Push validates first, creates a draft from a published version when necessary, commits the bundle, updates .apollorc to the returned tag, and refreshes the diff baseline.
Pushing is not publishing — a pushed version goes live only after apollo version publish <tag>.
Manage agent versions.
version create options: --from <tag> (clone an existing version) · --template <id> (create from a template) · --label <label> · --notes <notes>.use binds a version tag in the checkout — the push base and pull default. publish is also the rollback/switch operation: publishing an older version makes it live again. Don’t archive the live version.

Server-Side Authoring & Evaluation

Ask the server-side authoring advisor — ships this checkout’s tree and waits for grounded advice.
Run one build turn over this checkout’s pushed agent, server-side. The turn is gated: green pushes a new version and pulls it into the checkout; red refuses.
Run the scripted suite (bundle/build/scenarios.yaml) live through the simulator — every turn said as written, one real conversation per scenario, nobody improvising. The run is frozen at start, so you can keep editing while it runs. No push needed, and it reports rather than gates.With the judge off, a scenario passes when its script ran clean end to end; --judge also grades each conversation against the cases it covers.
Evaluate the agent with improvising simulated callers, planned from guidelines you write in plain words together with the bundle’s own records (cases.yaml, needs.yaml, world.yaml), graded by a judge, ending on a macro verdict — summary, findings, per-case coverage, and candidate regression scenarios. Where regress replays fixed turns, evaluate explores.Push first: the run binds to a pushed version.

Testing & Inspection

Chat with an agent, or start an interactive session. Alias: apollo send. Calling apollo chat with no text opens a REPL in an interactive terminal; scripts should pass text explicitly with --no-input.
A send without --thread creates and persists a thread — capture data.thread_id from --json output and pass --thread on later turns for multi-turn conversations:
Turns on one thread are strictly sequential (a racing turn is refused with API_423), but separate threads share nothing — run them concurrently (around 20 parallel threads is a sane cap).
Inspect Apollo threads. Messages are sent as the signed-in user; thread list likewise lists the signed-in user’s threads.
trace returns the runtime’s official turn-trace view, whose vocabulary is the program’s capabilities, policies, facts, sources, and records.

Resources

The agent’s knowledge hubs — the corpora that hub: sources search at runtime. A source in bundle/src/sources.yaml names its hub (hub: <name>), and the match is by name. Every kb command needs an agent checkout.
A hub is inert until a pushed bundle declares it: the agent consults a hub only because a kind: knowledge source in the running program names it. After uploading, declare the hub in bundle/src/sources.yaml, then apollo push and apollo version publish. A reference to a nonexistent hub retrieves nothing, with no validation error.
Manage vault secrets. A connection refers to one by name — as its token_env, or as ${NAME} in bundle/src/connections.yaml — so the value itself never enters the bundle.
Manage the per-agent mock database — a test database the agent’s connections can run against.

Shell

Print the shell wrapper (zsh/bash) enabling auto-cd after agent use / agent import / agent create. Add to your shell profile:

Next Steps

Configuration

Checkout structure, config files, and environment variables.

Workflows

Common development workflows and patterns.