Skip to main content

Module ledger

Module ledger 

Source
Expand description

What a session has spent and asked for over its turns — kept on its SessionState (in session-state), so it outlives the engine that ran them. Its token total is also in the session log (agix.spend), so it outlives the process.

Structs§

GoalSpend
The node of the goal whose rounds spend into it.
GoalSpendRecord
SessionCalls
The model calls and tool calls of a session’s own agent, summed over the turns it ran since it was loaded.
SessionLedger
SpendRecord
What a session has spent since it was created, and its goal since it was set, as the session log records them.
TokenTarget
An output token target, kept until it is met, given up on, or cleared — a turn that ends otherwise leaves it running into the next.

Constants§

SPEND_EVENT
SPEND_NS
Log namespace and event under which a SpendRecord is written.