Skip to content

Tool call report - #2

Open
charlesverge wants to merge 4 commits into
devfrom
tool-call-report
Open

charlesverge wants to merge 4 commits into
devfrom
tool-call-report

Conversation

@charlesverge

Copy link
Copy Markdown
Owner

Issue for this PR

Closes # anomalyco#11434

Notes

  • This is a draft pr
  • A more solid description of what should be added to the stats is needed. This is a throw everything in there and see what sticks pr.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvements
  • Documentation

What does this PR do?

Adds tool usage analytics to the session context tab to help users understand token consumption and tool failure patterns.

Changes:

  • Tool call breakdown chart showing distribution across tools
  • Tool failure visualization with success/failure rates
  • Input and output token breakdowns by tool type
  • Tool token summary table with per-call statistics (avg, median, p95, max) and pattern classification
  • Enhanced raw message display with tool previews and token counts

How did you verify your code works?

Added unit tests covering:

  • Empty inputs and edge cases
  • Mixed tool states (pending/running/completed/error)
  • Aggregation across multiple messages
  • Pattern classification thresholds (spike_dominated, failed_cost_driver, consistently_expensive, repeated_small, etc.)

Screenshots / recordings

Screenshot 2026-06-16 at 4 32 20 AM Screenshot 2026-06-16 at 4 32 07 AM

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant