Overview
Show users exactly how many tokens were used and what each universe run cost — broken down per agent and per provider.
UI mockup
After a run completes, show in the post-analysis panel:
Run cost breakdown
──────────────────────────────────────────
Researcher claude-sonnet-4-6 1,240 in / 890 out $0.017
Analyst gemini-2.5-flash 980 in / 650 out $0.001
Coder gpt-4.1-mini 870 in / 720 out $0.002
Reviewer llama-3.3-70b (Groq) 760 in / 540 out $0.001
Synthesis claude-sonnet-4-6 3,200 in / 980 out $0.024
──────────────────────────────────────────
Total $0.045
Implementation
- Parse
usage field from each provider's streaming response (all major providers return this)
- Store
{ inputTokens, outputTokens } per agent in MAAgent
- Look up price per token from the
ALL_MODELS table already in SettingsPage.tsx
- Display in post-analysis panel and the Analytics page
Relevant files
src/lib/multiAgentEngine.ts — capture usage from SSE responses
src/components/pages/UniversePage.tsx — display in post-analysis panel
src/components/pages/AnalyticsPage.tsx — aggregate cost over time
Overview
Show users exactly how many tokens were used and what each universe run cost — broken down per agent and per provider.
UI mockup
After a run completes, show in the post-analysis panel:
Implementation
usagefield from each provider's streaming response (all major providers return this){ inputTokens, outputTokens }per agent inMAAgentALL_MODELStable already inSettingsPage.tsxRelevant files
src/lib/multiAgentEngine.ts— capture usage from SSE responsessrc/components/pages/UniversePage.tsx— display in post-analysis panelsrc/components/pages/AnalyticsPage.tsx— aggregate cost over time