Liking cljdoc? Tell your friends :D

fractal-engine.agentcli

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`.
raw docstring

-mainclj

(-main & args)
source

cmd-chatclj

(cmd-chat pos flags)
source

cmd-costclj

(cmd-cost pos flags)
source

cmd-forkclj

(cmd-fork pos flags)
source

cmd-helpclj

(cmd-help _ _)
source

cmd-leavesclj

(cmd-leaves pos flags)
source

cmd-lsclj

(cmd-ls _pos flags)
source

cmd-primeclj

(cmd-prime pos flags)
source

cmd-resumeclj

(cmd-resume pos flags)
source

cmd-runclj

(cmd-run pos flags)
source

cmd-showclj

(cmd-show pos flags)
source

cmd-stepclj

(cmd-step pos flags)
source

cmd-streamclj

(cmd-stream pos flags)
source

cmd-traceclj

(cmd-trace pos flags)
source

cmd-treeclj

(cmd-tree pos flags)
source

cmd-verifyclj

(cmd-verify pos flags)
source

dispatchclj

(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.
sourceraw docstring

handles?clj

(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`.
sourceraw docstring

json-strclj

(json-str x)
source

node-addressclj

(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.
sourceraw docstring

node-exitclj

(node-exit node)
source

parse-argsclj

(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.
sourceraw docstring

resolve-runclj

(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.
sourceraw docstring

verbsclj

source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close