Skip to main content

Import and Edit an Existing Agent

The most common workflow: pull an agent from the cloud, edit it locally, validate, test, and push back.
Importing installs authoring skill packs for Cursor and Claude Code (add opencode via --skills), pulls the authoring JSON Schemas into schemas/, and drops the runtime’s AGENTS.md guide into the checkout — open the agent folder as your coding-tool project root and no additional setup is required.

Create a New Agent from Scratch

apollo agent create provisions the agent server-side, creates a local checkout, and makes it active.

Test Against the Runtime

Talk to your agent against the real Apollo-1 runtime. Pass --local . to send your working tree inline — replies reflect your latest edits, no push required.
Test multi-turn threads, not single messages. Most defects live on turn two and later — a read-back that never executes, a gate that promises and then refuses. Make scripted conversations 5–7 turns. Separate threads are independent: run them as parallel processes (around 20 concurrent threads is a sane cap); turns on one thread are strictly sequential.

Validate, Regress, and Push

The authoring arc is pull → edit → validate → regress → push:
validate checks structure; only a run proves conduct — that gates refuse, read-backs execute, and writes land. Add --judge to grade each conversation against the cases it covers. A bundle with no bundle/build/scenarios.yaml has never been graded.

Publish a Version

Pushing mints a version; to make it live, publish it.

Evaluate the Agent

Two lanes run the agent for real, both server-side, both frozen at start so you can keep editing:
regress answers “does what worked still work” and runs on the tree in front of you; evaluate goes looking for what no script covers and binds to a pushed version. Both measure against the case bank in bundle/build/cases.yaml.

Server-Side Authoring

Two commands move authoring itself to the server, grounded in your checkout:
Add --publish to build to flip the agent’s active pointer to the pushed version in the same turn.

Ground the Agent in Knowledge

Knowledge hubs are the corpora that hub: sources search at runtime. Every step below is load-bearing — the last two are the ones people skip:
To test retrieval before pushing, send the working tree inline with apollo chat --local . from inside the checkout.

CI/CD Integration

Authenticate with a token, force non-interactive mode, and parse the JSON envelope.
Exit codes are stable: 0 success, 1 runtime/API failure, 2 validation failure, 3 auth/config failure — gate pipeline steps on them.
apollo --verbose <cmd> streams one redacted line per API request to stderr — handy when debugging a pipeline. apollo doctor diagnoses the whole setup with the fix attached to every finding.

Driving the CLI with a Coding Agent

The CLI is built to be driven by coding agents (Cursor, Claude Code, the Agent Builder). Every command is non-interactive with --json, and importing an agent installs skill packs that teach the workflow.
  • Author → run → read the trace → revise. Have the agent edit bundle/src/, then apollo --json chat … --local . --trace, read the trace, and iterate until behavior holds.
  • Put global flags before the command — apollo --json --no-input <command> … — and parse the envelope (data on success, error.code/message/suggestion on failure).
  • Keep the checkout fresh. apollo pull refreshes the program, schemas, skill packs, and AGENTS.md the runtime serves.

Next Steps

Command Reference

Full reference for all CLI commands.

Configuration

Checkout structure, config files, and environment variables.