Skip to main content
AKOS

Command Reference

A concise table of every top-level akos command with a one-line description.

All commands accept --help for detailed usage. Commands marked with a sidecar requirement need akos serve to be running.

Core workspace

CommandDescription
init [dir]Scaffold a new AKOS workspace (config, .agentskitos/, .gitignore)
doctorDiagnose the CLI environment: Node version, platform, credentials, connectivity
statusShow sidecar connection, active workspace, auth state, recent runs/triggers/anomalies
workspaces listList sidecar workspaces and mark the active one (requires sidecar)
workspaces use <id>Switch the active workspace (requires sidecar)
workspaces create <id>Create a workspace; idempotent on id (requires sidecar)
workspaces delete <id>Delete a workspace; rejects the active one. Requires --confirm in non-TTY (requires sidecar)
workspaces clone <new-id>Clone the active workspace into a new id (requires sidecar)
upgradeCheck for a newer CLI version and print the upgrade command
completion <shell>Emit a shell completion script (bash, zsh, fish)
versionPrint the installed CLI version

Authentication and credentials

CommandDescription
auth loginSign in via device-code OAuth and persist a session token
auth logoutClear the persisted session token
auth whoamiPrint the active session identity (requires sidecar)
auth statusShow the current auth session state
tenant listList accessible tenants (requires oem:tenant:admin; falls back to current tenant)
tenant use <id>Switch the active tenant
creds listList known providers and their required vault keys
creds checkVerify that required credential keys are present (values never shown)
creds setInteractively store a provider credential
creds guidePrint the guided credential onboarding playbook
vault listList workspace secret keys stored in the vault (values hidden)
vault put <key> <value>Write a secret to the workspace vault
secrets listList provisioned secret keys via the sidecar (values hidden)
secrets set <key> <value>Provision a secret headless via the sidecar
connections listList provisioned integration connections
connections get <id>Read a single integration connection
connections sql-get <id>Read a single SQL connection (--json)
connections setProvision (create or replace) an integration connection
connections rm <id>Remove an integration connection

Agents

CommandDescription
agents listList inline agents from the sidecar (--json)
agents show <id>Show a single inline agent (--json)
agents run <id>Invoke an agent now (--input, --mode, requires --confirm in non-TTY)
agent registerPersist a new agent registry entry (local registry)
agent listList agents in the local workspace registry
agent from-nl <description>Generate an agent draft from a natural-language description
agent promoteValidate a lifecycle transition and emit an audit event
agent versionView the audit trail of lifecycle transitions for an agent
agent compare <evaluations.json>Rank agent variants by pass rate, cost, and latency
agent changelogView the change event history for an agent

Flows and runs

CommandDescription
flow new [template-id]Scaffold a flow from a built-in template into a workspace config
flows listList inline flows in the active workspace (--json)
flows show <id>Show a single inline flow (--json)
flows validate <id>Validate an inline flow against the FlowConfig schema
flows run <id>Run an inline flow now (--mode, requires --confirm in non-TTY)
flows edit <id>Edit an inline flow in $EDITOR; validates before applying (TTY only)
run [configPath]Execute (or resume) a flow (default mode: dry_run)
runs listList recent flow runs (--workspace, --status, --limit, --json)
runs get <id>Fetch a single run row via the sidecar (runs.get; null when missing) (--json)
runs show <id>Enriched run detail: status, flow, timings, cost/tokens, counts, recent events (--json)
runs watch <id>Follow one run's status/detail until completion (--once, --json)
runs cancel <id>Cancel an in-flight run (requires --confirm in non-TTY)
runs retry <id>Re-dispatch the flow behind a run (--mode, requires --confirm in non-TTY)
runs logs <id>Print the span/tool event timeline of a run (--json)
runs artifacts <id>List artifacts produced by a run (--limit, --json)
explainExplain a coding run from its persisted artifact bundle
whatif <runs.json>Project cost/latency/pass-rate impact of a hypothetical change
inbox listList pending HITL approvals (--status, --json)
inbox show <id>Show full approval context + risk notes (--json)
inbox approve <id>Approve a pending approval (--note, requires --confirm in non-TTY)
inbox reject <id>Reject a pending approval (--note reason required, --confirm in non-TTY)
hitl listList human-in-the-loop escalations (alias surface of inbox)
hitl approve <id>Approve an escalation
hitl reject <id>Reject an escalation (note required)
hitl reassign <id> <assignee>Reassign a pending escalation
hitl modify <id> <proposal>Submit a counter-proposal for an escalation
hitl dead-letterList HITL escalations dead-lettered by a decision-SLA timeout
hitl ledger appendAppend a signed entry to the HITL ledger chain
runs tailStream new run entries live (poll-based; --interval, --workspace)
runs retention prunePrune run records beyond the configured retention policy

Triggers

CommandDescription
triggers kindsList all supported trigger kinds
triggers listList triggers defined in a config file
triggers addAdd a trigger to a config file
triggers remove <id>Remove a trigger from a config file
triggers test <id>Send a synthetic event through a trigger (requires sidecar)
triggers runs <id>View recent executions for a trigger (requires sidecar)
triggers url <id>Print the inbound URL for a webhook trigger (requires sidecar)
triggers toggle <id>Enable or disable a trigger (requires sidecar)
trigger preset listList built-in trigger presets
trigger preset show <id>Show the configuration for a named preset
triggers tailStream new trigger-fired events live (poll-based; --interval)
triggers contractsList every registered trigger contract via the sidecar

Configuration

CommandDescription
config validate <path>Validate a config file against the AKOS schema
config get <path> [key]Read a value (dotted key) from a config file, or the whole config
config set <path> <key> <value>Set a value (dotted key); validates before writing. Requires --confirm in non-TTY
config edit <path>Open a config file in $EDITOR; validates on save (TTY only)
config diff <prev> <next>Show a structural diff between two config files
config explainShow which config layer set each leaf value
config migrate <path>Migrate a config file to the current schema version
lock <configPath>Generate or verify akos.lock
syncCheck or apply version drift between the lockfile and installed packages

Deploying and operating

CommandDescription
publish [dir]Build a signed plugin bundle for marketplace upload
deploy [bundle]Verify asset integrity and ship a bundle to a publisher backend
install <url>Fetch, verify, and install a plugin from a registry URL
serveStart the local workspace sidecar (JSON-RPC over stdio)
mcp-serveServe the AKOS capability catalog and security tools to external agents over MCP
import <input>Translate an n8n / LangChain / LangGraph / Langflow / Flowise / Dify workflow into AKOS config (--apply to upsert into the workspace)
migrate-to-cloudMigrate local workspace data to Postgres and S3
snapshot schedulePersist a snapshot scheduling and retention policy

MCP security tools

mcp-serve exposes agent-operable security management (ADR-0136). An agent can read and reconfigure the firewall, egress policy, and PII profiles at runtime — no redeploy — via these MCP tools:

MCP toolDescription
firewall.rules.listList firewall rules (optionally by tier)
firewall.rules.upsertCreate or update a firewall rule
firewall.rules.deleteDelete a firewall rule by id
firewall.rules.shadowToggle a rule into/out of dry_run (shadow / log-only) mode
egress.policy.get / egress.policy.setRead or replace the outbound network policy
pii.profiles.list / pii.profiles.upsert / pii.profiles.deleteManage custom PII redaction profiles

Every security tool requires the security:admin capability. The MCP server forwards each call to the running sidecar, where the RBAC access gate authorizes it — an unauthorized principal receives AUTHZ_DENIED. There is no path that bypasses the gate.

Marketplace

CommandDescription
marketplace searchList and filter available marketplace domain packs
marketplace install <packId>Apply a domain pack to the workspace (requires sidecar)
marketplace featuredShow the editorial featured-listing rotation
marketplace suggestionsShow connection suggestions inferred from workspace + recent runs
marketplace reportFile an abuse / policy report against a listing (--listing, --reason)
marketplace private-libraryList private (non-marketplace) plugins available for install
marketplace publisher-keysList pinned publisher keys with their current trust level
marketplace installedList installed plugins for the active workspace
marketplace fetchFetch the marketplace catalog
marketplace apply-monitoring-pack <packId>Apply a monitoring pack to the workspace
marketplace apply-security-pack <packId>Apply a security pack to the workspace

Tools

CommandDescription
tools listList built-in + plugin tools in the workspace (--workspace, --json)
tools show <id>Show a tool descriptor: category, stability, side-effects, capabilities, args schema (--json)

Direct ad-hoc tool invocation has no sidecar contract — tools execute inside governed runs. Run a tool by adding it to a flow/agent and using flows run / agents run.

Connectors

CommandDescription
connectors test --workspace <id>Preflight connections — reports missing credential keys (never values), --kind, --json

Connection CRUD lives under connections list/get/set/rm. connectors adds the readiness check.

Knowledge (RAG)

CommandDescription
knowledge listList configured knowledge sources (--json)
knowledge add <id> <location>Add a source (--kind, --name); loader secrets provisioned via secrets, never passed here
knowledge remove <id>Remove a source and drop its index
knowledge search <text>Search the knowledge index (alias: query; --source, --top-k, --json)
knowledge reindex <id>Drop and re-run the digest for a source (alias: rebuild)
knowledge statusIndexer status for every source (--json)
rag search <text>RAG retrieval (--source, --top-k, --json)
rag ingest <id>Re-index (ingest) an existing source
rag statusIndexer readiness for every source

Security & governance

CommandDescription
security policyLive governance posture: air-gap, firewall, PII, sandbox, RBAC, egress, audit (--json)
security rbacList operator roles and assignments (JSON)
security egressShow the egress policy slice of the posture (--json)

Costs

CommandDescription
costs summaryAggregate spend over a window (--from, --to, --provider, --role, --json)
costs breakdownPer-provider / per-agent spend breakdown (same filters)
costs budgetsList configured spend budgets and thresholds (--json)
costs listList itemized cost rows (for filtering / CSV export) (--json)
costs alertsList active cost alerts derived from budget consumption (--json)

Audit

CommandDescription
audit listList audit ledger entries (--actor, --kind, --workspace, --limit, --json)
audit show <id>Show a single audit entry by id/seq
audit exportExport a signed audit batch (--workspace, --limit)
audit verifyVerify ledger integrity (hash chain + signatures); exit 1 on failure
audit tailFollow audit entries live (see streaming commands)

Observability

CommandDescription
observability metrics <metric>Timeseries (tokens.in/tokens.out/cost.totalUsd/errors.count/p99.latencyMs; --range, --json)
observability traces <runId>Span/tool event timeline for a run
observability logsSnapshot active anomalies (--workspace, --json)
observability statusTelemetry exporter + anomaly-rule + cost-meter snapshot (--json)
logs tailStream live anomaly/observability events (poll-based; --interval, --workspace)
obs anomaly-rulesList structured anomaly rules with their paused state (--json)

Copilot

Slash/mention parsing and proactive cards via the sidecar.

CommandDescription
copilot slash listList supported copilot slash commands and their dispatch methods
copilot slash parse <raw>Parse a chat message for a leading slash command; returns the dispatch method
copilot mention parse <text>Parse @-mentions out of a chat message
copilot proactive <eventJson>Turn a sidecar event (JSON object) into a proactive action card, or null

Telemetry

CommandDescription
telemetry statusShow current telemetry consent state
telemetry enableOpt in to anonymous usage telemetry
telemetry disableOpt out of telemetry
telemetry exportExport stored telemetry events (JSON or CSV)

Interactive shell

akos chat --interactive (or akos with no args on a TTY) opens a portable readline shell. akos chat --tui opens an experimental full-screen Ink TUI (transcript pane, context sidebar, status bar) over the same slash-command registry — it requires a TTY and falls back to chat --interactive otherwise. Slash commands mirror the scriptable surface and remember the last list you viewed, so you can select by number:

SlashAction
/helpList available slash commands
/sessionShow the active session ID and workspace
/workspaces, /workspace <id|n>List / switch workspace
/sessions, /use <id|n>, /newList / switch / create a chat session
/flows, /flow <id|n>, /run-flow <id|n>List / show / run a flow
/agents, /agent <id|n>List / show an agent
/inbox, /approve <id|n>, /reject <id|n>List pending approvals / approve / reject
/tools, /tool <id|n>, /knowledgeBrowse tools / show a tool / list knowledge sources
/runs, /run <id|n>List recent runs / show one
/tail <id|n>Snapshot a run's current status + recent events
/logs <id|n>Show a run's span/tool event timeline
/artifacts <id|n>List a run's artifacts
/cancel <id|n>, /retry <id|n>Cancel / re-dispatch a run
/history, /clearPrint / clear the local transcript
/quitExit (Ctrl-C / Ctrl-D also exit gracefully)

Streaming

Live, incremental output (ADR-0133). Streaming is polling-based today — the sidecar transport is request/response, so there is no server-push channel yet; a future sidecar contract can add one behind the same subscription interface.

CommandDescription
chat <message> --streamRender assistant tokens incrementally as they arrive (falls back to --wait polling)
runs tail / runs watch <id>Poll-based live run/event tails
logs tail / audit tail / triggers tailPoll-based live event tails

Streams are cancellable and deadline-bounded (--timeout-ms, AKOS_STREAM_INTERVAL_MS) so they never block a CI pipeline. When streaming is unavailable, the polling fallback remains.

Global flags

These flags are accepted by most commands:

FlagDescription
--help, -hDisplay help for the command
--jsonEmit machine-readable JSON output (where supported)
--stream(chat) render incremental assistant tokens

Exit codes

Cross-cutting codes shared by the sidecar-backed command families (the canonical contract; centralised in os-cli's lib/exit-codes.ts):

CodeMeaning
0Success
1Runtime / network / I/O error
2Invalid arguments, usage, or invalid config
5Requested resource not found (run, flow, agent, tool, inbox item)

Some older commands additionally use command-specific codes, documented per command: 3 (file read error), 4 (conflict / already exists), 5 (lockfile drift, for sync), 6 (unsatisfied governance gate), 7 (missing credentials), 8 (registry entry not found).

Server, CI, and non-TTY usage

akos is safe to run on headless servers, in SSH sessions, and in CI without a graphical shell:

  • Authentication. Set AKOS_TOKEN in the environment to skip the interactive auth login device-code flow. auth login detects the variable and exits 0.
  • Machine output. Pass --json to any list/show/get/status command for parseable stdout. Diagnostics go to stderr, so ... --json | jq stays clean.
  • Mutations never block. Destructive commands (workspaces delete, config set) require --confirm. In a non-TTY context they fail fast with a hint instead of waiting for input — they never hang a pipeline.
  • config edit is interactive only. It opens $EDITOR and therefore requires a TTY. In CI use config set <path> <key> <value> --confirm (scripted) or config validate (read-only) instead.
  • Sidecar reachability. Commands marked "requires sidecar" call the local workspace sidecar (akos serve). Point the CLI at a remote sidecar with AKOS_HEADLESS_URL; tune the per-call deadline with AKOS_SIDECAR_TIMEOUT_MS (default 15 000 ms). Sidecar calls have deadlines and render typed errors with actionable hints. akos status reports whether the sidecar is reachable.
  • Color. ANSI color is disabled automatically when stdout is not a TTY, when NO_COLOR is set, or under CI. Set FORCE_COLOR to override. Watch/tail commands emit plain newline-delimited records suitable for log capture.
Command Reference · AKOS