Skip to content

feat(analytics): add tool usage analysis (#983)#988

Open
rodboev wants to merge 3 commits into
kenn-io:mainfrom
rodboev:pr/tool-usage-analysis
Open

feat(analytics): add tool usage analysis (#983)#988
rodboev wants to merge 3 commits into
kenn-io:mainfrom
rodboev:pr/tool-usage-analysis

Conversation

@rodboev

@rodboev rodboev commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

The tools analytics endpoint already scans tool_calls, but the response only exposes category totals, per-agent category breakdowns, and trend buckets. That makes the analytics page useful for broad shape, but it cannot answer which concrete tools dominate usage under the active filters.

This extends the existing /api/v1/analytics/tools response with a ranked per-tool analysis surface, keeping aggregation in internal/db/analytics.go and preserving the existing category, agent, and trend fields. The Huma route continues to pass the typed response through, the frontend client is regenerated from the updated schema, and the analytics store plus ToolUsage.svelte render the new rows without rebuilding filter logic in the browser.

The scope is intentionally vertical but local to the existing tools analytics path. It does not add a new endpoint or change how tool calls are ingested.

Closes #983

@roborev-ci

roborev-ci Bot commented Jul 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (2582662)

Verdict: No Medium, High, or Critical findings to report.

The only reported issue was Low severity and has been omitted per instructions.


Reviewers: 2 done | Synthesis: codex, 4s | Total: 5m46s

@rodboev rodboev force-pushed the pr/tool-usage-analysis branch from 2582662 to 17d8feb Compare July 3, 2026 23:17
@roborev-ci

roborev-ci Bot commented Jul 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (17d8feb)

Verdict: No Medium, High, or Critical findings to report.

The only reported issue was Low severity and is omitted per instructions.


Reviewers: 2 done | Synthesis: codex, 6s | Total: 3m37s

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Tool usage analysis

1 participant