Liking cljdoc? Tell your friends :D

vaelii.agents.engine

The vaelii.host.* vars this repo reads, and the one namespace in vaelii.agents.* that reaches for them. vaelii.host.* is the engine's tooling tier, private and free to change, so a breaking change upstream is an edit here. Each var is the engine's own under the name the callers use.

The daemon's op tables (vaelii.host.serve): ops, kbless-ops, feed-ops and write-ops. vaelii.agents.tools generates the model's tool schemas from the read subset of ops and dispatches tool calls back through it, so a model's reads are the daemon's reads with no second copy.

The `vaelii.host.*` vars this repo reads, and the one namespace in `vaelii.agents.*`
that reaches for them.  `vaelii.host.*` is the engine's tooling tier, private and free
to change, so a breaking change upstream is an edit here.  Each var is the engine's
own under the name the callers use.

The daemon's op tables (`vaelii.host.serve`): [[ops]], [[kbless-ops]], [[feed-ops]] and
[[write-ops]].
`vaelii.agents.tools` generates the model's tool schemas from the read subset of
[[ops]] and dispatches tool calls back through it, so a model's reads are the daemon's
reads with no second copy.
raw docstring

vaelii.agents.llm.anthropic

The Anthropic Messages API backend, over java.net.http and cheshire. Beyond the neutral request keys it reads :thinking-display and :fallbacks. See docs/llm.md § The Messages API backend.

The Anthropic Messages API backend, over `java.net.http` and `cheshire`.  Beyond the
neutral request keys it reads `:thinking-display` and `:fallbacks`.  See docs/llm.md
§ The Messages API backend.
raw docstring

vaelii.agents.llm.http

The part of an HTTP provider's transport that is not its wire format: the connect and read deadlines, the typed send, the not-JSON refusal, the bounded excerpt. Each fn takes an endpoint {:label :slug}: :label names the far end in a message, :slug in a thread name. See docs/llm.md § What both HTTP backends share.

The part of an HTTP provider's transport that is not its wire format: the connect and
read deadlines, the typed send, the not-JSON refusal, the bounded excerpt.  Each fn
takes an endpoint
`{:label :slug}`: `:label` names the far end in a message, `:slug` in a thread name.
See docs/llm.md § What both HTTP backends share.
raw docstring

vaelii.agents.llm.ollama

The Ollama chat API backend, over java.net.http and cheshire, plus the host probes. Beyond the neutral request keys it reads :temperature and :keep-alive. See docs/llm.md § The local backend.

The Ollama chat API backend, over `java.net.http` and `cheshire`, plus the host
probes.  Beyond the neutral request keys it reads `:temperature` and `:keep-alive`.
See docs/llm.md § The local backend.
raw docstring

vaelii.agents.llm.pool

A yes/no question put to a model several times across a pool of Ollama hosts, and the vote over the answers. See docs/llm.md § The vote pool.

A yes/no question put to a model several times across a pool of Ollama hosts, and
the vote over the answers.  See docs/llm.md § The vote pool.
raw docstring

vaelii.agents.llm.protocol

The Provider extension point: two methods over a provider-neutral request and response map, neither naming HTTP, JSON or a vendor field. See docs/llm.md § Providers.

Request:

{:model      "claude-opus-5-5"   ; provider-resolved when absent
 :system     [{:text "…" :cache? true} …]   ; blocks, in order
 :messages   [{:role "user"|"assistant" :content <string | [block …]}]
 :tools      [<tool schema> …]      ; vaelii.agents.tools/schemas
 :format     {…}                    ; a JSON schema decoding is constrained to
 :max-tokens 8192
 :effort     "low"|"medium"|"high"|"xhigh"|"max"
 :thinking-display "summarized"     ; Anthropic only
 :num-ctx    8192}                  ; context length, tokens; local providers only

:cache? on a system block asks for a cache breakpoint after it. This list is the whole of what a provider reads, so a key any path sends belongs here. A provider ignores a key it cannot express: :cache? on Ollama, :num-ctx on Anthropic.

Response:

{:stop-reason  "end_turn"|"tool_use"|"refusal"|"max_tokens"|…
 :stop-details {…}                ; populated only on a refusal
 :content      [{:type :text     :text "…"}
                {:type :tool-use :id "…" :name "…" :input {…}}
                {:type :thinking :text "…"}]
 :model        "…"
 :usage        {…}}

A refusal is a successful answer with empty or partial :content: a caller reads :stop-reason first, and a provider never fabricates a text block. Assistant content is echoed back verbatim in the next request's :messages, so a provider may carry its own vendor blocks through :content.

The `Provider` extension point: two methods over a provider-neutral request and
response map, neither naming HTTP, JSON or a vendor field.  See docs/llm.md § Providers.

Request:

    {:model      "claude-opus-5-5"   ; provider-resolved when absent
     :system     [{:text "…" :cache? true} …]   ; blocks, in order
     :messages   [{:role "user"|"assistant" :content <string | [block …]}]
     :tools      [<tool schema> …]      ; vaelii.agents.tools/schemas
     :format     {…}                    ; a JSON schema decoding is constrained to
     :max-tokens 8192
     :effort     "low"|"medium"|"high"|"xhigh"|"max"
     :thinking-display "summarized"     ; Anthropic only
     :num-ctx    8192}                  ; context length, tokens; local providers only

`:cache?` on a system block asks for a cache breakpoint after it.  This list is the
whole of what a provider reads, so a key any path sends belongs here.  A provider
ignores a key it cannot express: `:cache?` on Ollama, `:num-ctx` on Anthropic.

Response:

    {:stop-reason  "end_turn"|"tool_use"|"refusal"|"max_tokens"|…
     :stop-details {…}                ; populated only on a refusal
     :content      [{:type :text     :text "…"}
                    {:type :tool-use :id "…" :name "…" :input {…}}
                    {:type :thinking :text "…"}]
     :model        "…"
     :usage        {…}}

A refusal is a successful answer with empty or partial `:content`: a caller reads
`:stop-reason` first, and a provider never fabricates a text block.  Assistant content
is echoed back verbatim in the next request's `:messages`, so a provider may carry its
own vendor blocks through `:content`.
raw docstring

vaelii.agents.llm.provider

Which backend a turn runs against: :stub (the default), :ollama or :anthropic, resolved lazily, with an unreachable backend falling back to the stub. Every fn here that can build a stub reads that stub's own opts (vaelii.agents.llm.stub/provider) from opts's :stub, and hands a backend opts without it. See docs/llm.md § Choosing one.

Which backend a turn runs against: `:stub` (the default), `:ollama` or `:anthropic`,
resolved lazily, with an unreachable backend falling back to the stub.  Every fn here
that can build a stub reads that stub's own opts (`vaelii.agents.llm.stub/provider`)
from `opts`'s `:stub`, and hands a backend `opts` without it.  See docs/llm.md
§ Choosing one.
raw docstring

vaelii.agents.llm.stub

The default provider: deterministic, offline, no credential, and scripted. See docs/llm.md § The stub is the default.

A :script entry is a full response map, or one of these shorthands:

"some text" a plain text answer {:tool "kb_sentexes_matching" :input {…}} a tool-use turn (:id, :prose optional)

A caller with answer shapes of its own passes :expand, which sees each map entry first.

The default provider: deterministic, offline, no credential, and scripted.  See
docs/llm.md § The stub is the default.

A `:script` entry is a full response map, or one of these shorthands:

  "some text"                                a plain text answer
  {:tool "kb_sentexes_matching" :input {…}}  a tool-use turn (`:id`, `:prose` optional)

A caller with answer shapes of its own passes `:expand`, which sees each map entry
first.
raw docstring

vaelii.agents.tools

The model's read tools, generated from the read subset of the engine daemon's op table (vaelii.agents.engine/ops) and dispatched back through it. No tool writes. See docs/llm.md § Tools.

The model's read tools, generated from the read subset of the engine daemon's op
table (`vaelii.agents.engine/ops`) and dispatched back through it.  No tool
writes.  See docs/llm.md § Tools.
raw docstring

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