Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.foundation.introspection

Programmatic introspection of the agent's own state from inside :code. The public state surface is deliberately small:

  • (session-state [session-id]) -> data map, including raw LLM diagnostics
  • (session-report-md [session-id]) -> Markdown rendered from that data

Everything else in this namespace is implementation detail. The agent gets the data once, manipulates it via plain Clojure (get-in, filter, map, etc.), and renders the same data to Markdown only when 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.

Opt-in: not auto-loaded by default. Add this jar to the classpath to enable.

Programmatic introspection of the agent's own state from inside
`:code`. The public state surface is deliberately small:

- `(session-state [session-id])` -> data map, including raw LLM diagnostics
- `(session-report-md [session-id])` -> Markdown rendered from that data

Everything else in this namespace is implementation detail. The agent
gets the data once, manipulates it via plain Clojure (`get-in`,
`filter`, `map`, etc.), and renders the same data to Markdown only
when 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.

Opt-in: not auto-loaded by default. Add this jar to the classpath
to enable.
raw docstring

all-symbolsclj

source

introspection-promptclj

source

session-report-htmlclj

(session-report-html)
(session-report-html session-id)

await session_report_html(session_id) # standalone HTML report for ANOTHER conversation Returns a self-contained HTML document (vis-light themed): every turn, iteration, code, result, answer - the same data as session_report_md, styled to match the web TUI. Write it to a file to open in a browser. Most useful for OTHER sessions.

await session_report_html(session_id)  # standalone HTML report for ANOTHER conversation
Returns a self-contained HTML document (vis-light themed): every turn, iteration, code,
result, answer - the same data as session_report_md, styled to match the web TUI. Write it
to a file to open in a browser. Most useful for OTHER sessions.
sourceraw docstring

session-report-html-symbolclj

source

session-report-mdclj

(session-report-md)
(session-report-md session-id)

await session_report_md(session_id) # markdown report for ANOTHER conversation Returns a Markdown string: every turn, iteration, code, result, answer. Same data as session_state, pre-rendered. Most useful for OTHER sessions — your own live state is already in the session bag and your transcript is already on the wire.

await session_report_md(session_id)  # markdown report for ANOTHER conversation
Returns a Markdown string: every turn, iteration, code, result, answer. Same data as
session_state, pre-rendered. Most useful for OTHER sessions — your own live state is
already in the `session` bag and your transcript is already on the wire.
sourceraw docstring

session-report-md-symbolclj

source

session-stateclj

(session-state)
(session-state session-id)

await session_state(session_id) # investigate ANOTHER conversation Returns {"session", "current_turn", "failures", "diagnosis", "session_forks", "turn_retries", "llm_diagnostics", "transcript", ...}. Pick keys; the whole dict stays bound. No-arg defaults to the current session, but for THIS conversation the live session bag (session["turn"|"scope"|"utilization"|"context"]) already has it and your transcript is already on the wire — reach here mainly for OTHER sessions (use sessions() for the index).

await session_state(session_id)  # investigate ANOTHER conversation
Returns {"session", "current_turn", "failures", "diagnosis", "session_forks", "turn_retries", "llm_diagnostics", "transcript", ...}.
Pick keys; the whole dict stays bound. No-arg defaults to the current session, but for
THIS conversation the live `session` bag (session["turn"|"scope"|"utilization"|"context"])
already has it and your transcript is already on the wire — reach here mainly for OTHER
sessions (use sessions() for the index).
sourceraw docstring

session-state-symbolclj

source

sessionsclj

(sessions)
(sessions channel)

await sessions() # index of EVERY past conversation, newest-first Returns [{"id", "channel", "title", "turn_count", "created_at"} ...]. Pass a channel keyword to filter. Take an id from here into session_state(id) / session_report_md(id) to investigate that conversation.

await sessions()  # index of EVERY past conversation, newest-first
Returns [{"id", "channel", "title", "turn_count", "created_at"} ...]. Pass a channel
keyword to filter. Take an id from here into session_state(id) / session_report_md(id) to
investigate that conversation.
sourceraw docstring

sessions-symbolclj

source

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