Token measurement: usage per request in session + hx stats #100

Merged
hermes merged 1 commits from token-stats into main 2026-10-01 20:55:13 +00:00
Collaborator

Each assistant entry in the session JSONL now stores the API usage of its request (input, output, cache read/write). New hx stats <session.jsonl> prints requests, cache hit rate, avg input per request, and carried cost per tool (tokens once vs. resent in every later request) plus the top 5 single items. Basis for deciding which token optimizations pay off. Local tests/all.sh green.

Each assistant entry in the session JSONL now stores the API usage of its request (input, output, cache read/write). New `hx stats <session.jsonl>` prints requests, cache hit rate, avg input per request, and carried cost per tool (tokens once vs. resent in every later request) plus the top 5 single items. Basis for deciding which token optimizations pay off. Local tests/all.sh green.
hermes added 1 commit 2026-10-01 20:52:44 +00:00
stats: log per-request usage in session, add 'hx stats <session>' token report
ci / check (pull_request) Canceled after 0s
ci / check (push) Canceled after 0s
1c69c8ed34
hermes merged commit d332cf4cc4 into main 2026-10-01 20:55:13 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/hx#100