Output an agent can act on.
Most of ee's callers are agents. With --json, every command answers in one versioned JSON envelope with a typed exit code; anything that ran in a reduced mode is listed with a code, and errors carry a recovery plan when ee has one.
A session, the way an agent runs it.
resume to handoff, every step but the work itself is one ee command, and its JSON answer has named fields the next step reads.The ee commands in one agent session.
Nine stations: five only read from ee, three write to it, one is the harness's own work. Pick one to see its command and the JSON it returns, or press Play.
- reads only
- writes
- the harness
- between sessions
- What it returns
- The last three sessions' episodic memories, decisions waiting on a revisit, items tagged next, todo, blocking and the like, and a stale flag on any item a newer memory has superseded.
- Why it works this way
- When the store is missing or empty, resume still succeeds. It returns an empty report that lists populated stores nearby with the exact command to retarget, and it never creates a store. An agent started in the wrong directory is given the command for the right store, and resume does not suggest ee init.
checked against src/core/resume.rs · src/cli/mod.rs · docs/schemas/ee.resume.v1.json · src/core/effect.rs
Resume the last session
read-onlyWhere was I?
$ ee resume --workspace . --json- The agent reads
data.report.sessionsdata.report.openLoopsdata.report.nearbyStoresdata.report.nextCommands
What comes back · a store with nothing to resumeexcerpt · highlighted: what the agent reads
{ "schema": "ee.response.v2", "data": { "report": { "schema": "ee.resume.v1", "episodicTotal": 0, "sessions": [], "openLoops": { "revisitDecisionsTotal": 0, … }, "nearbyStores": { "stores": [{ "documents": …, "provenance": "child_scan", … }], "outcome": "complete" }, "nextCommands": ["ee resume --workspace … --database … --json", …] } }, "degraded": [{ "code": "resume_no_session_evidence", … }]}Sources and assumptions
Errors that say what to do next.
How an agent reads an ee error or degraded result.
A typical CLI
A toy in your browser · not eeError: search index is out of date. Please rebuild the index and try again.exit 1
The message names no command and does not say whether a rebuild is safe to run unattended.
ee · stdoutexit 4
$ ee … --json
pinned: tests/snapshots/error_envelope_golden__error_envelope_search_index.snap
An agent’s reading
Read 7 of 7 · Re-check
Exit 0, and no index code left in degraded[].
Each risk class and its next action
ee's rule, computed here- read_only_proberun it
- idempotent_refreshrun it · preflight if given · ask if approval
- mutating_local_repairrun it · preflight if given · ask if approval
- mutating_external_coordination_repaircoordinate first · ask if approval
- approval_required_repairask a human
- destructive_or_irreversible_repairask a human
- unavailable_or_manual_onlymanual only
From repair_command_preflight_policy in src/core/preflight_guard.rs. Two classes always lead to ask_human and one to manual_only; three more lead to ask_human when requiresHumanApproval is true.
Sources and assumptions
It documents itself to the agent.
ee --agent-docs
A machine-readable overview of ee and the index of every documentation topic.
ee agent-docs recipes
32 workflows, each with its command, a jq selector for the answer, a success check and its failure branches.
ee agent-docs <topic>
Twelve focused topics: guide, commands, contracts, schemas, paths, env, exit-codes, fields, errors, formats, examples, recipes.
ee --help-json
The whole command tree as JSON, so a harness can build its own tool list.
ee schema list
Every public JSON Schema by id; ee schema export <id> prints one to validate against.
ee introspect
ee's command, schema and error maps in one response.
ee capabilities
What this build can do: feature flags, the binaries it found, the environment overrides in force.
- 0successread data
- 1usagefix the call
- 2configurationfix the config
- 3storagefollow repair
- 4search indexrebuild the index
- 5importcheck the source
- 6degraded, required mode unmetrelax or repair
- 7policy deniedask a human
- 8migration requiredee migrate run
- 9eval found regressionsread the report
- 10workspace store missingcheck the path; don't init blindly
- 130cancelledretry with more budget
ProcessExitCode, src/models/mod.rs · stdout carries JSON, stderr carries diagnostics
ee status reports one of five postures, so an agent can tell a store that is still warming up from one that needs a repair and one it must not touch. ee doctor uses three of them: ok, degraded_recoverable and blocked.
- ok
- initializing
- degraded_recoverable
- degraded_required
- blocked
src/models/posture.rs