(agent-router classifier)(agent-router classifier opts)Routes a task down the host's agent tree. Options: :bands, :role. No :on-error — the fallback IS the error outcome.
Routes a task down the host's agent tree. Options: :bands, :role. No :on-error — the fallback IS the error outcome.
(as-hook b)(as-hook b next)The battery as a §8 hook composed with next (may be nil; never discarded):
tool-guard -> :before-tool allow delegates; deny/ask short-circuit
tool-relevance -> :before-llm overrides :tools
content-guard -> :before-llm block throws; otherwise delegates
model-router -> :before-llm overrides :model (only when different)
tool-result-filter -> :after-tool filters "\n\n" chunks
before-llm merge: the battery's override first, next sees the event as
that override leaves it, and next's non-absent fields win.
The battery as a §8 hook composed with `next` (may be nil; never discarded): tool-guard -> :before-tool allow delegates; deny/ask short-circuit tool-relevance -> :before-llm overrides :tools content-guard -> :before-llm block throws; otherwise delegates model-router -> :before-llm overrides :model (only when different) tool-result-filter -> :after-tool filters "\n\n" chunks before-llm merge: the battery's override first, `next` sees the event as that override leaves it, and next's non-absent fields win.
(check b x)(check b task answer)tool-guard: (check g {:name :arguments :description?}) -> {:action allow|ask|deny :reason :risk :sure :calibrated :error?} content-guard: (check g text) -> {:action allow|review|block :flagged :uncertain :scores :calibrated :error?} is-complete: (check ic task answer) -> {:complete :p :band :calibrated :error?}
tool-guard: (check g {:name :arguments :description?}) -> {:action allow|ask|deny :reason :risk :sure :calibrated :error?}
content-guard: (check g text) -> {:action allow|review|block :flagged :uncertain :scores :calibrated :error?}
is-complete: (check ic task answer) -> {:complete :p :band :calibrated :error?}(content-guard classifier opts)Screens text. Options: :on-error (required), :bands, :role, :dimensions
(ordered {:name :instructions}; default default-dimensions).
Screens text. Options: :on-error (required), :bands, :role, :dimensions
(ordered `{:name :instructions}`; default `default-dimensions`).ContentGuard's default dimensions (contract), in order.
ContentGuard's default dimensions (contract), in order.
(filter-chunks f query chunks)tool-result-filter: (filter-chunks f query chunks) -> {:kept :dropped
:calibrated :error?} — chunk indices in order. query is a string or a map.
tool-result-filter: (filter-chunks f query chunks) -> {:kept :dropped
:calibrated :error?} — chunk indices in order. `query` is a string or a map.(is-complete classifier opts)Does an answer complete its task. Options: :on-error (required), :bands, :role.
Does an answer complete its task. Options: :on-error (required), :bands, :role.
(latest-user-text messages)The text of the last user message that has text: string content, or every
{type "text"} part's text joined with "\n". A tool_result-only user
message is skipped. "" when there is none.
The text of the last user message that has text: string content, or every
`{type "text"}` part's text joined with "\n". A tool_result-only user
message is skipped. "" when there is none.(model-router classifier models)(model-router classifier models opts)OPT-IN per-query model routing (SPEC §8 "Right-size routing"). models is
the user's ORDERED option list of {:id :description}. Options: :bands, :role.
OPT-IN per-query model routing (SPEC §8 "Right-size routing"). `models` is
the user's ORDERED option list of `{:id :description}`. Options: :bands, :role.(pick r prompt fallback)(pick r task agents fallback)model-router: (pick r prompt fallback)
-> {:model :routed :sure :probabilities :calibrated :error?}
agent-router: (pick r task agents fallback), agents {:name :description :agents?} (a node with :agents is a group)
-> {:agent :path :sure :probabilities :calibrated :error?}
model-router: (pick r prompt fallback)
-> {:model :routed :sure :probabilities :calibrated :error?}
agent-router: (pick r task agents fallback), agents `{:name :description
:agents?}` (a node with :agents is a group)
-> {:agent :path :sure :probabilities :calibrated :error?}The default 4-level ToolGuard rubric (contract).
The default 4-level ToolGuard rubric (contract).
(select b prompt items)tool-relevance / skill-relevance: (select b prompt [{:name :description}]) -> {:selected :dropped :calibrated :error?} — names in input order.
tool-relevance / skill-relevance: (select b prompt [{:name :description}])
-> {:selected :dropped :calibrated :error?} — names in input order.(skill-relevance classifier opts)Which skills are relevant. Options: :on-error (required), :bands, :role. No
hook: feed :selected into the skill allowlist (an EMPTY selection must not be
passed as an allowlist — empty means all).
Which skills are relevant. Options: :on-error (required), :bands, :role. No hook: feed `:selected` into the skill allowlist (an EMPTY selection must not be passed as an allowlist — empty means all).
(tool-guard classifier opts)Rates one tool call's risk. Options: :on-error (:open | :closed, required), :bands, :role, :ask-at (default 1.5), :deny-at (default 2.5).
Rates one tool call's risk. Options: :on-error (:open | :closed, required), :bands, :role, :ask-at (default 1.5), :deny-at (default 2.5).
(tool-relevance classifier opts)Which tools the request needs. Options: :on-error (required), :bands, :role.
Which tools the request needs. Options: :on-error (required), :bands, :role.
(tool-result-filter classifier opts)Drops the chunks of a tool's output that are confidently irrelevant. Options: :on-error (required), :bands, :role.
Drops the chunks of a tool's output that are confidently irrelevant. Options: :on-error (required), :bands, :role.
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 |