Skip to content

The locus command

The locus command runs an agent, decides what it is waiting on and checks its record. It installs with the package; locus --help prints this table's first column and locus <command> --help the options of one command.

AGENT, where a command takes one, is module:attr or path/to/file.py:attr, naming an Agent or a zero-argument function that returns one:

locus run app.py:agent "refund order 4821" --thread t1
locus approvals --store approvals.json list
locus resume app.py:agent --thread t1 --answer approved --perform
locus serve app.py:agent --port 8000

Commands

Command What it does Actions
locus run run an agent on a prompt, streaming what it does —
locus resume resume a paused run —
locus approvals list and decide held calls list: pending approvals; show: one approval record; approve: approve a held call; reject: reject a held call
locus audit check an exported audit trail verify: verify a JSONL export
locus policy lint a policy file for gaps, or explain its decision for one action lint: report unreachable rules, uncovered environments and kinds never held; explain: the decision path for one action
locus serve serve an agent over HTTP —
locus mcp expose an agent or a tool module over MCP serve: serve an agent (its tools plus run_agent) or every @tool in a module
locus a2a agent-to-agent: write or serve an agent's card card: write the A2A v1.0 agent card for an agent, or serve the agent with it
locus codex install the Locus skill for Codex and start Codex with it init: put the skill in DIR/.agents/skills/locus and a Locus section in DIR/AGENTS.md; run: install the skill here if it is missing, then start Codex with the sandbox settings it needs; path: print where the bundled skill is
locus eval run an evaluation suite, diff two reports, or gate a build on one run: run the cases in a file against an agent and print the report; diff: compare two saved reports case by case; gate: apply the gate to a saved report; summary: print a saved report; trend: compare the last reports of one suite kept in a store
locus deploy deploy the agent server to OCI with Terraform: Container Instances, OKE or Functions init: write a deployment directory: Terraform roots, Helm chart, Dockerfiles, locus-deploy.yaml; plan: terraform plan the target in locus-deploy.yaml; apply: terraform apply the target in locus-deploy.yaml; destroy: terraform destroy the target in locus-deploy.yaml

Exit codes

Code Meaning
0 Success
1 A check or a decision failed: a gate did not pass, a verification found a problem, an approval was rejected
2 Usage error
3 The run is paused, waiting for a person; locus resume continues it

See also