ReferenceCLI commands
BetaYou are reading docs for the beta channel (
2.4.1-beta.1) — updated automatically on every beta release.Switch to stable →CLI commands
ak run
Run a skill via the configured agent adapter
Resolve <kit>/<skill> against the kits directory and dispatch the invocation to the configured AgentAdapter. Streams stdout/stderr in pretty or NDJSON form. Honors SIGINT for clean cancellation and --timeout for hard caps.
Who it's for: Power devs scripting agent invocations; non-technical users via the matching dashboard surface.
When to use it: When you want to actually run a skill end-to-end. Use after ak kit list-kits to confirm the target exists; pair with --json for scripted consumers (CI, dashboards).
What changes on disk: Read-only on the kit content; the underlying adapter may write to its own working directory (e.g. .agentkit/cache/). The run command itself does not mutate.
Usage
ak run <kit>/<skill> [args...] [flags]Examples
ak run engineer/scout # default adapter, pretty output
ak run engineer/scout --json | jq . # scripted consumption
ak run engineer/scout --timeout 30s # hard timeout
ak run engineer/scout --target codex # route through Codex CLI StreamFlags
| Flag | Description |
|---|---|
-h, --help | help for run |
--json | Emit machine-readable JSON (implies --no-interactive) |
--kits-dir string | Kits directory (default: ./kits or $AGENTKIT_KITS_DIR) |
--no-interactive | Disable interactive prompts (CI-safe) |
-q, --quiet | Suppress non-error output on stderr |
--target string | Adapter to dispatch to: claude-code | codex (default "claude-code") |
--timeout duration | Per-invocation timeout (e.g. 30s, 2m). Zero disables timeout. |
-V, --verbose | Extra diagnostic output on stderr (loses to --quiet) |
-y, --yes | Assume yes for all prompts |
Output modes
| Mode | Behavior |
|---|---|
pretty | default on TTY (colors, ASCII markers) |
plain | auto when stdout piped or --no-interactive |
json | --json (single-object envelope, NDJSON-safe) |
Exit codes
| Code | Meaning |
|---|---|
0 | success |
1 | runtime error |
2 | invalid flags |
3 | user-cancel (SIGINT, prompt-cancel) |
4 | unmet dependency (missing skill env or backend binary) |
5 | kit or skill not found |
Related commands
ak— AgentKit CLI