AgentOS markAgentOS

CLI Reference


The agentos CLI is the fastest way to configure, run, inspect, and automate AgentOS.

Run:

agentos --help
agentos <command> --help

Main Commands

CommandPurpose
agentos initInitialize a workspace.
agentos doctorDiagnose readiness and print recovery steps.
agentos onboardRun or inspect first-run setup.
agentos configureReconfigure provider, router, channels, search, image generation, or memory embedding.
agentos gatewayRun and manage the gateway server.
agentos chatStart interactive terminal chat.
agentos agentRun a single automation-friendly agent turn.
agentos sessionsList, inspect, resume, abort, delete, or export sessions.
agentos skillsList, search, view, install, update, publish, and inspect skills.
agentos memoryInspect and maintain memory.
agentos channelsConfigure and inspect messaging channels.
agentos providersConfigure and inspect LLM providers.
agentos searchConfigure and use web search.
agentos sandboxInspect or change default sandbox posture.
agentos cronManage scheduled AgentOS runs.
agentos costInspect usage and estimated cost.
agentos diagnosticsEnable or disable runtime diagnostics logging.
agentos replayReplay a recorded turn from the decision log.
agentos migrateImport state from external agent runtimes.
agentos modelsInspect available models.
agentos agentsManage durable agents.
agentos mcp-serverRun the AgentOS MCP server bridge.
agentos distEmit a reproducible workspace-state inventory.
agentos resetReset a session and flush memory synchronously.

Run Surfaces

Web UI and gateway:

agentos gateway run
agentos gateway start --json
agentos gateway status
agentos gateway restart
agentos gateway stop

Terminal chat:

agentos chat
agentos chat --model gpt-5.4-mini
agentos chat --session <session-key>
agentos chat --standalone --workspace /path/to/project

One-shot automation:

agentos agent -m "Review the current directory"
agentos agent --json -m "Return a short machine-readable summary"
agentos agent --workspace /path/to/project --workspace-strict -m "Inspect this repo"
agentos agent --timeout 600 --max-iterations 30 -m "Run a bounded investigation"

Useful automation flags:

FlagPurpose
--workspaceSet the workspace root.
--workspace-strictRestrict read-side file tools to the workspace.
--workspace-lockdownContain writes to workspace or scratch directory.
--scratch-dirPlace temporary scripts/logs/candidate patches in a known directory.
--timeoutSet total agent wall-clock timeout.
--max-iterationsBound the model/tool loop.
--max-provider-retriesBound transient provider retries.
--length-capped-continuationsBound automatic continuations after length-limited provider output.
--thinkingOverride reasoning level.
--permissionsSelect restricted, bypass, or full permission posture.
--transcript-pathWrite a JSONL transcript for automation.
--usage-pathWrite usage JSON.
--session-db-pathPersist session replay across invocations.

Configuration Commands

Provider and router:

agentos onboard
agentos onboard status
agentos configure provider --provider openrouter --api-key-env OPENROUTER_API_KEY
agentos configure router --router recommended
agentos providers list
agentos providers configure openrouter
agentos providers status

Search:

agentos search list
agentos search configure duckduckgo
agentos search query "latest AgentOS release"
agentos configure search --search-provider duckduckgo

Channels:

agentos channels types
agentos channels describe telegram
agentos channels add telegram --name personal
agentos channels list
agentos channels status
agentos channels enable personal
agentos channels disable personal
agentos channels restart personal
agentos channels remove personal

Raw config:

agentos config get llm.provider
agentos config set gateway.port 18791

More detail:

Skills

agentos skills list
agentos skills search pdf
agentos skills view pdf-toolkit
agentos skills install <skill-name>
agentos skills update --all
agentos skills uninstall <skill-name>

Read:

Sessions and History

agentos sessions list
agentos sessions show <session-key>
agentos sessions resume <session-key>
agentos sessions abort <session-key>
agentos sessions export <session-key>
agentos sessions delete <session-key>

Read: sessions.md

Memory

agentos memory status
agentos memory index
agentos memory list
agentos memory search "preference"
agentos memory show <path>
agentos memory dream
agentos memory flush-session <session-key>
agentos memory repair list
agentos memory raw-fallbacks list

Read: features/memory.md

Durable Agents and Scheduling

agentos agents list
agentos agents add research --name Research --workspace /path/to/research
agentos agents delete research
agentos cron list
agentos cron add --every 1h --text "Summarize important updates" --name hourly-summary
agentos cron status <job-id>
agentos cron runs <job-id>

Read:

Cost, Diagnostics, and Replay

agentos cost
agentos diagnostics status
agentos diagnostics on
agentos diagnostics off
agentos replay --session <session-key> --turn <turn-id>

Use diagnostics and replay when you need to understand why a turn behaved a certain way.

Read:

MCP Server Bridge

agentos mcp-server run
agentos mcp-server run --gateway ws://localhost:18792/ws

Read: mcp-server.md