(run-turn-async! session user-message)Run one turn on a background daemon thread. Returns a promise that delivers the
turn result map. A turn that throws delivers {:status :error :error ...} instead
of escaping, so a deref or poll never surprises the caller. The session journal
updates live throughout — poll projection/progress (or load-node) on the
session dir to watch the turn settle, then deref the promise for the result.
Refuses to start (throws :fractal/turn-in-flight) if a turn is already running on
this handle.
Run one turn on a background daemon thread. Returns a promise that delivers the
turn result map. A turn that throws delivers {:status :error :error ...} instead
of escaping, so a deref or poll never surprises the caller. The session journal
updates live throughout — poll `projection/progress` (or `load-node`) on the
session dir to watch the turn settle, then deref the promise for the result.
Refuses to start (throws :fractal/turn-in-flight) if a turn is already running on
this handle.(start-session! cfg)(start-session! cfg {:keys [dir id kind parent cache-id overlay]})Start a fresh session. Opts may carry an :overlay — an extra, session-level
system instruction appended to the base behavior in the single system message.
It is a standing specialization for the whole session (e.g. codebrain's brain
role), stated once at birth and carried across every turn and resume via the
message history; it is NOT the per-turn task. Kept to one combined system
message so it is provider-agnostic (some adapters honor only the first system).
Start a fresh session. Opts may carry an `:overlay` — an extra, session-level system instruction appended to the base behavior in the single system message. It is a standing specialization for the whole session (e.g. codebrain's brain role), stated once at birth and carried across every turn and resume via the message history; it is NOT the per-turn task. Kept to one combined system message so it is provider-agnostic (some adapters honor only the first system).
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 |