LemonCore. Introspection
(lemon_core v0.1.0)
View Source
Canonical introspection event API.
Events are persisted through LemonCore.IntrospectionStore in :introspection_log with
the following contract:
:event_id- stable unique identifier:event_type- event taxonomy name:ts_ms- wall clock timestamp in milliseconds:run_id- run identifier when available:session_key- session identifier when available:agent_id- agent identifier when available:parent_run_id- lineage link when available:engine- engine name when available:provenance-:direct | :inferred | :unavailable:payload- redacted event-specific metadata
Redaction Defaults
- Prompt/response and obvious secret fields are removed.
- Tool argument payloads are redacted by default (
capture_tool_args: false). - Result previews are kept by default and truncated.
Summary
Functions
Build a canonical introspection event without persisting it.
Returns whether persistence is currently enabled.
List introspection events through the store query API.
Build and persist an introspection event.
Types
@type event() :: %{ :event_id => binary(), :event_type => atom() | binary(), :ts_ms => non_neg_integer(), :provenance => provenance(), :payload => map(), optional(:run_id) => binary() | nil, optional(:session_key) => binary() | nil, optional(:agent_id) => binary() | nil, optional(:parent_run_id) => binary() | nil, optional(:engine) => binary() | nil }
@type provenance() :: :direct | :inferred | :unavailable
Functions
Build a canonical introspection event without persisting it.
@spec enabled?() :: boolean()
Returns whether persistence is currently enabled.
List introspection events through the store query API.
Build and persist an introspection event.