Flows and Runs
Create flows from templates, execute them, inspect results, model what-if changes, and manage human-in-the-loop approvals.
Flows are the unit of work in AKOS: a directed graph of agent and tool nodes that executes a multi-step process. The CLI lets you scaffold flows from built-in templates, run them in several modes, inspect their output, and project the impact of model or configuration changes.
Creating a flow
Browse templates
Filter templates by persona:
Scaffold a flow into your workspace config
For example:
This merges the template's flow (and any required agents) into your agentskit-os.config.yaml. If a flow with the same ID already exists, the command exits with an error unless you pass --replace.
flow new options
| Flag | Description |
|---|---|
--list | List available templates and exit |
--persona <p> | With --list, filter/order templates for a persona |
--target <path> | Config file to merge into (default: agentskit-os.config.yaml) |
--flow-id <slug> | Override the scaffolded flow ID |
--replace | Replace an existing flow with the same ID |
--estimate | Print a hint to run a cost estimate after scaffolding |
--visual | Also write a visual layout document under .agentskitos/flows/ |
--visual-out <path> | Write the visual layout document to a custom path |
Running a flow
By default, flows run in dry_run mode — the flow graph is traversed and logged but no LLM calls or external side effects are made. This is safe for testing your configuration.
Run modes
| Mode | Description |
|---|---|
dry_run | Traverse the flow without LLM calls or side effects (default) |
real | Execute fully with live LLM calls and tool actions |
durable | Like real, but checkpointed so interrupted runs can be resumed |
Selecting a specific flow
When your config has multiple flows, specify which one to run:
Resuming an interrupted run
--resume requires --store.
Cost estimate
Print an estimated cost and exit without executing the flow:
run options
| Flag | Description |
|---|---|
--flow <id> | Flow ID to execute (required when config has multiple flows) |
--mode <mode> | Run mode: dry_run, real, durable (default: dry_run) |
--workspace <id> | Override workspace ID |
--store <dir> | Checkpoint directory for durable mode |
--resume <runId> | Resume an existing run (requires --store) |
--estimate | Print cost estimate and exit |
--force | Skip budget limit check |
--strict | In real mode, error when LLM credentials are missing instead of falling back |
--quiet | Suppress per-node event output |
Listing past runs
Shows recent runs with their flow ID, status, cost, and token counts.
Add --json for structured output. Use --limit <n> to control how many results are returned.
Explaining a run
After a coding agent run that captured artifact bundles, use explain to get a plain-English step-by-step walkthrough:
Filter to a specific run ID:
Output as structured JSON:
The --artifact-dir should point to the directory passed to --capture-run-artifacts when the run was started.
What-if analysis
Project how a change to token budget, latency, cost, or pass rate would affect your historical runs without re-running them.
Prepare a JSON file of past run snapshots:
Then project the impact:
Options:
| Flag | Description |
|---|---|
--tokens <m> | Token count multiplier (e.g. 0.7 = 30% fewer tokens) |
--latency <m> | Latency multiplier |
--cost <m> | Cost multiplier |
--pass <d> | Pass-rate delta in the range [-1, 1] |
--json | Emit JSON instead of the summary table |
Human-in-the-loop (HITL) approvals
When a flow escalates a decision to a human reviewer, use hitl to list and act on pending escalations via the running workspace sidecar.
List escalations
Approve an escalation
Reject an escalation
--note is required when rejecting.
Reassign an escalation
Submit a counter-proposal
All HITL commands require the workspace sidecar to be running (agentskit-os serve).
Runs retention
To prune old run records:
This command removes run records beyond the configured retention policy. Use --dry-run to preview what would be deleted.