Skip to main content

ContextLedger

Defined in the models module.
Tracks token usage across context segments. Provides per-segment token counts and total usage.

Properties

system_prompt
int
No description available.
rules
int
No description available.
skills
int
No description available.
memory
int
No description available.
tools_schema
int
No description available.
history
int
No description available.
tool_outputs
int
No description available.
buffer
int
No description available.
turn_count
int
No description available.
message_count
int
No description available.
tool_call_count
int
No description available.

Methods

  • to_dict: Convert to dictionary.
  • copy: Create a copy of this ledger.