Programmatic introspection of the agent's own state from inside
:code. The public state surface is deliberately small:
(read-session [target]) -> canonical data map, including usage and raw LLM diagnostics(get-session [target]) -> ONE session's descriptor, no transcript(list-sessions [search]) -> metadata-only index, RANKED when search is givenEverything else in this namespace is implementation detail. The agent gets the data once and manipulates it with ordinary Python collection operations when filtering or presentation is needed.
Every function is a pure read off the same DB tables the projection layer reads from (or a classpath read for the doc accessors). Failures return nil/[], never throw, so a misbehaving introspection call cannot break iteration execution.
Gated: the extension registered at the bottom of this namespace binds its
symbols and prompt only while the introspection toggle is ON (default OFF).
Programmatic introspection of the agent's own state from inside `:code`. The public state surface is deliberately small: - `(read-session [target])` -> canonical data map, including usage and raw LLM diagnostics - `(get-session [target])` -> ONE session's descriptor, no transcript - `(list-sessions [search])` -> metadata-only index, RANKED when `search` is given Everything else in this namespace is implementation detail. The agent gets the data once and manipulates it with ordinary Python collection operations when filtering or presentation is needed. Every function is a pure read off the same DB tables the projection layer reads from (or a classpath read for the doc accessors). Failures return nil/[], never throw, so a misbehaving introspection call cannot break iteration execution. Gated: the extension registered at the bottom of this namespace binds its symbols and prompt only while the `introspection` toggle is ON (default OFF).
(get-session)(get-session target)Developer alias for foundation-get-session — the model-facing contract is the
symbol's :description/:result below.
Developer alias for `foundation-get-session` — the model-facing contract is the symbol's `:description`/`:result` below.
(list-sessions)(list-sessions search)Developer alias for foundation-sessions — the model-facing contract is the
symbol's :description/:result below.
Developer alias for `foundation-sessions` — the model-facing contract is the symbol's `:description`/`:result` below.
(read-session)(read-session target)Developer alias for foundation-inspect — the model-facing contract is the
symbol's :description/:result below.
Developer alias for `foundation-inspect` — the model-facing contract is the symbol's `:description`/`:result` below.
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 |