Minimal ReAct loop demo runtime for clj-agent-tui states.
The loop is intentionally dependency-light: callers provide an :llm-fn that
returns either final text or a tool request. This keeps clj-agent-tui usable without
network credentials while leaving a clear seam for Claude/Anthropic adapters.
Minimal ReAct loop demo runtime for clj-agent-tui states. The loop is intentionally dependency-light: callers provide an `:llm-fn` that returns either final text or a tool request. This keeps clj-agent-tui usable without network credentials while leaving a clear seam for Claude/Anthropic adapters.
(claude-config)(claude-config env)Return Claude-like configuration from env/system props without making calls.
Return Claude-like configuration from env/system props without making calls.
(run-loop state question)(run-loop state question {:keys [max-steps] :as opts})Run a bounded ReAct loop over clj-agent-tui state. Returns [state ctx].
Run a bounded ReAct loop over clj-agent-tui state. Returns `[state ctx]`.
(scripted-llm)(scripted-llm _opts)Return a deterministic LLM function for tests and local demos.
First turn asks to call echo; second turn returns a final answer using the observation.
Return a deterministic LLM function for tests and local demos. First turn asks to call echo; second turn returns a final answer using the observation.
(step state {:keys [llm-fn tools question observations] :as ctx})Execute one ReAct step. Returns [state ctx].
ctx keys: :question, :observations, :llm-fn, :tools, :done?.
Execute one ReAct step. Returns `[state ctx]`. `ctx` keys: `:question`, `:observations`, `:llm-fn`, `:tools`, `:done?`.
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 |