The agent USE surface for the engine — not an inspector, the whole interface an
agent works through, the way bd is for tasks. One grammar fractal <verb> <subject> [args] [--flags] covers both halves of the loop:
DRIVE (do work): READ (see what happened): fractal run <task> fractal show <run> [node] detail; the hub fractal resume <run> <task> fractal tree <run> addressable tree fractal fork <run> <task> fractal prime <run> orientation fractal ls list runs fractal verify <run> [node] claim-vs-evidence fractal trace <run> [node] provenance fractal cost <run> spend fractal leaves <run> [node] leaf I/O fractal step <run> [node] N one step fractal stream <run> events as JSONL
Every verb takes --json; exit codes mean something (0 final · 1 error ·
2 no-final · 3 timeout · 5 confabulation-suspected). A drive verb prints the run's
name so it chains straight into a read verb — fractal run "…" → fractal verify <run>. A node address is root, child-0001, or child-0001/child-0004 (the
leading root/ is implied). <run> is a path (.fractal/foo) or a bare name
resolved under the runs dir (foo → .fractal/foo). Runs live in .fractal/ in
the directory you invoke from (discovered up the tree like git/bd); override with
--runs-dir DIR. Provider/model flags match the engine:
--provider, --model, --leaf-model, --child-model, --fake-script,
--max-turns, --max-fanout, --max-leaf-concurrency,
--call-timeout-ms.
The agent USE surface for the engine — not an inspector, the whole interface an
agent works through, the way `bd` is for tasks. One grammar `fractal <verb>
<subject> [args] [--flags]` covers both halves of the loop:
DRIVE (do work): READ (see what happened):
fractal run <task> fractal show <run> [node] detail; the hub
fractal resume <run> <task> fractal tree <run> addressable tree
fractal fork <run> <task> fractal prime <run> orientation
fractal ls list runs
fractal verify <run> [node] claim-vs-evidence
fractal trace <run> [node] provenance
fractal cost <run> spend
fractal leaves <run> [node] leaf I/O
fractal step <run> [node] N one step
fractal stream <run> events as JSONL
Every verb takes `--json`; exit codes mean something (0 final · 1 error ·
2 no-final · 3 timeout · 5 confabulation-suspected). A drive verb prints the run's
name so it chains straight into a read verb — `fractal run "…"` → `fractal verify
<run>`. A node address is `root`, `child-0001`, or `child-0001/child-0004` (the
leading `root/` is implied). `<run>` is a path (`.fractal/foo`) or a bare name
resolved under the runs dir (`foo` → `.fractal/foo`). Runs live in `.fractal/` in
the directory you invoke from (discovered up the tree like git/bd); override with
`--runs-dir DIR`. Provider/model flags match the engine:
`--provider`, `--model`, `--leaf-model`, `--child-model`, `--fake-script`,
`--max-turns`, `--max-fanout`, `--max-leaf-concurrency`,
`--call-timeout-ms`.(dispatch cmd args)Run a verb, returning {:out str :exit int}. Pure except for filesystem reads and (for drive verbs) running the engine — no printing, no System/exit (that's -main), so the surface is unit-testable.
Run a verb, returning {:out str :exit int}. Pure except for filesystem reads and
(for drive verbs) running the engine — no printing, no System/exit (that's -main),
so the surface is unit-testable.(handles? cmd)True for verbs this surface owns. Interactive chat and the legacy inspect
stay in cli.
True for verbs this surface owns. Interactive `chat` and the legacy `inspect` stay in `cli`.
(node-address token)Normalize a node token to a projection address. nil/"root" → "root"; "child-0001" → "root/child-0001"; a stray leading "root/" is tolerated.
Normalize a node token to a projection address. nil/"root" → "root"; "child-0001" → "root/child-0001"; a stray leading "root/" is tolerated.
(parse-args args)Split args into {:pos [..] :flags {..}}. --k v is a value flag; --k (followed
by another flag or nothing) is boolean.
Split args into {:pos [..] :flags {..}}. `--k v` is a value flag; `--k` (followed
by another flag or nothing) is boolean.(resolve-run token {:keys [runs-dir]})Resolve a run token to a dir: an existing path wins; otherwise <runs-dir>/<token>.
Returns the dir string or nil.
Resolve a run token to a dir: an existing path wins; otherwise `<runs-dir>/<token>`. Returns the dir string or nil.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |