Skip to content

Reports and Visuals

TokenPilot provides built-in reporting and a visual inspector so you can see exactly what it's doing.

The Report Command

The report command shows a summary of token usage, cache efficiency, and cost savings for the current session:

bash
# Standalone CLI
lightmem2 report

# Per-host
lightmem2 openclaw report
lightmem2 codex report
lightmem2 claude-code report

# Inside OpenClaw
/lightmem2 report

What Each Metric Means

MetricDescription
Input tokensTotal tokens sent to the model (lower is better)
Cache readTokens served from the model API cache (higher is better)
Cache missTokens that had to be recomputed (lower is better)
Output tokensTokens generated by the model
CostEstimated API cost in USD
Cache hit ratePercentage of input tokens served from cache

How to Judge If TokenPilot Is Working

  1. Cache read >> cache miss: Most input tokens are cached — stabilizer is working.
  2. Input tokens grow slowly: The context isn't bloating each turn.
  3. Cost stays flat or grows slowly: Per-turn cost isn't climbing with session length.

If you see No TokenPilot session stats yet, the session is too new — run a few more turns and check again.

Visual Inspector

The visual inspector is a browser-based dashboard showing real-time TokenPilot behavior:

bash
lightmem2 visual

This opens your default browser with three views:

Stabilizer View

Shows cache efficiency at a glance:

  • Stable vs. dynamic context split
  • Per-turn cache hit/miss breakdown
  • Prefix stability metrics

Reduction View

Shows what was trimmed:

  • Per-turn reduction statistics
  • Tool output before/after trimming
  • Which reduction passes were applied

Eviction View

Shows lifecycle pruning:

  • Current session depth (turns, tokens)
  • Eviction threshold and status
  • Number of evicted turns
  • Use the tabs at the top to switch between views
  • Use the host dropdown to change which host's data you're viewing
  • Use the session selector to view specific sessions
  • Data updates automatically as new turns complete

Next

Released under the MIT License.