Skip to main content

CLI Commands

openlegion [--version] [--verbose | --quiet]
├── start [--config PATH] [-d] [--sandbox] [-p PORT]   # Start runtime + interactive REPL
├── stop                                                # Stop runtime + all openlegion_* containers
├── chat [NAME] [--port PORT]                           # Connect to a running agent
├── status [--port PORT] [--wide] [--watch N] [--json]  # Show agent status
├── projects [--port PORT] [--json]                     # List active projects
├── project <ID> [--port PORT] [--json]                 # Single project details
├── tasks [--agent NAME] [--project ID] [--status S]    # List/filter durable task records (V2)
│        [--port PORT] [--json]
├── pending [--port PORT] [--json]                      # List open pending operator actions
├── confirm <NONCE>                                     # Confirm a pending action
├── cancel <NONCE>                                      # Cancel a pending action
├── reset [--yes/-y]                                    # Stop + wipe config/data/skills/volumes
├── wallet                                              # Wallet management
│   ├── init                                            #   Generate 24-word BIP-39 seed (once)
│   └── show [AGENT_ID]                                 #   Show wallet addresses on all chains
└── version [-v]                                        # Show version info
Agent management, credential management, channel setup, blackboard / queue inspection, cron management, and other per-agent operations are available as interactive REPL commands inside openlegion start.

Command Details

openlegion start

Launches the mesh host, spins up agent containers, and starts the interactive REPL. On first run (no credentials configured), runs inline setup — API key entry, model selection, and optional agent creation — right in the terminal.
FlagDescription
--config PATHPath to mesh config YAML file (default: config/mesh.yaml)
-dRun in background (daemon mode); logs to .openlegion.log, PID in .openlegion.pid
--sandboxUse Docker Sandbox microVMs for maximum isolation (requires Docker Desktop 4.58+; falls back to standard Docker on init failure)
-p, --port PORTOverride the mesh / dashboard port (default: 8420)

openlegion stop

Cleanly shuts down all openlegion_* Docker containers and the mesh host. Sends SIGTERM to the background host process if running, then cleans up any remaining containers.

openlegion chat [NAME]

Connect to a running agent from a separate terminal. Useful when running in daemon mode (-d). If no name is given, prompts to select from running agents.
FlagDescription
--port PORTMesh host port (default: 8420)

openlegion status

Show health and status of all configured and running agents.
FlagDescription
--port PORTMesh host port (default: 8420)
--wide, -wShow additional columns (role, cost)
--watch NAuto-refresh every N seconds
--jsonOutput as JSON

openlegion projects

List active projects in the running fleet.
FlagDescription
--port PORTMesh host port (default: 8420)
--jsonOutput as JSON

openlegion project <ID>

Show details for a single project (members, goal, context, recent activity).
FlagDescription
--port PORTMesh host port (default: 8420)
--jsonOutput as JSON

openlegion tasks

List durable task records from the V2 orchestration ledger (OPENLEGION_ORCHESTRATION_TASKS_V2=1, default ON).
FlagDescription
--agent NAMEFilter by assigned agent
--project IDFilter by project
--status SFilter by task status
--port PORTMesh host port (default: 8420)
--jsonOutput as JSON

openlegion pending

List open pending operator actions. Some operator-initiated edits (model, permissions, budget, thinking) require explicit confirmation via confirm within 30 minutes; soft edits (instructions, soul, heartbeat, interface, role) have a 5-minute undo window.
FlagDescription
--port PORTMesh host port (default: 8420)
--jsonOutput as JSON

openlegion confirm <NONCE>

Confirm a pending operator action. Use openlegion pending to find the nonce.

openlegion cancel <NONCE>

Cancel a pending operator action without applying it.

openlegion reset

Stop the runtime and wipe config/, data/, agent skills, and Docker volumes. Keeps .env so your API keys survive. Pass --yes/-y to skip the confirmation prompt.

openlegion wallet init

Generate a 24-word BIP-39 mnemonic and store it in .env as OPENLEGION_SYSTEM_WALLET_MASTER_SEED. The seed is shown once — there is no second-chance reveal. Per-agent EVM keys derive via BIP-44 (m/44'/60'/{agent_index}'/0/0); per-agent Solana keys via HMAC-SHA512 over a PBKDF2 of the seed.

openlegion wallet show [AGENT_ID]

Show wallet addresses on all supported chains (EVM: ethereum, base, arbitrum, polygon, sepolia; Solana: mainnet, devnet). Pass an agent ID to scope to that agent.

openlegion version

Show version and environment information.
FlagDescription
-vShow extended info (Python version, Docker version, OS, config path, agent count)

Interactive REPL Commands

When running openlegion start, you’re in the interactive REPL. These commands are only available inside the REPL session:

Chat & Navigation

CommandDescription
@agent <message>Send message to a specific agent
/use <agent>Switch active agent
/statusShow agent health (also aliased as /agents)
/broadcast <msg>Send message to all agents
/steer <msg>Inject message into a busy agent’s context (rate-limited: 10 wakeups / 3600s)
/resetClear conversation with active agent
/historyView conversation history with active agent
/helpShow available commands
/quitExit and stop runtime

Agent Management

CommandDescription
/addAdd a new agent (hot-adds to running system)
/agent [cmd]Inspect or edit a specific agent
/remove [name]Remove an agent
/restart [name]Restart a running agent

Monitoring & Debugging

CommandDescription
/costsShow today’s spend, context usage, and model health
/tracesShow recent request traces (aliased as /debug)
/logsView agent logs
/blackboard [cmd]View/edit shared blackboard entries (list, get, set, del)
/queueShow agent task queue / lane status

Automation

CommandDescription
/cron [cmd]Manage cron jobs and heartbeats (list, del, pause, resume, run)
5-field cron (minute granularity) or every N[s/m/h/d] interval syntax. No 6-field / seconds support. Pass heartbeat=true for autonomous monitoring with built-in probes.

Credentials & Channels

CommandDescription
/addkey <svc> [key]Add an API credential to the vault at runtime (intentionally not a slash-command in chat-channel UIs — the value would be visible)
/removekey [name]Remove a credential from the vault
/credential [cmd]Manage vault credentials (add, list, remove)

Projects

CommandDescription
/project [cmd]Project management (list, use, info)
Aliases: /exit = /quit, /traces = /debug, /agents = /status.

Team Templates

Templates offered during first-run setup (via openlegion start) and applied via the operator’s apply_template tool (per-slot — not atomic; mid-loop failures leave earlier-created agents in place).
TemplateAgentsDescription
starterassistantSingle general-purpose agent
contentresearcher, writerBlog / social / email from briefs
deep-researchscout, analystMulti-source synthesis with citations
devteampm, engineer, reviewerSoftware development team
monitorwatcher, analystAlways-on monitoring
salesresearcher, qualifier, outreachSales pipeline
competitive-inteltracker, analystCompetitor pricing/product tracking
lead-enrichmentenricher, verifierLead list research
price-intelligencecrawler, analystPrice monitoring with anti-bot browser
review-opscollector, responderG2 / Trustpilot / Capterra / App Store / Google reviews + reply drafts
social-listeninglistener, reporterReddit / HN / X competitor pain-point monitor
researchresearcherGeneral-purpose researcher
opportunity-finderscout, evaluator, modelerGap-scout + evaluation + modeling
Each template references models via the "{default_model}" placeholder, substituted at apply time. apply_template accepts agent_overrides per slot (model, instructions ≤12K chars, soul ≤4K, heartbeat, interface ≤4K; role is template-fixed).