MATIH Platform is in active MVP development. Documentation reflects current implementation status.
15. Workbench Architecture
Cost Tracking

Cost Tracking

The Cost Tracking component at frontend/agentic-workbench/src/components/CostTracker/ provides LLM token usage and cost breakdown analysis.


TokenBreakdown

File: frontend/agentic-workbench/src/components/CostTracker/TokenBreakdown.tsx

Displays detailed token usage and cost analysis:

  • Input tokens vs output tokens per request
  • Cost per model provider (OpenAI, Anthropic, etc.)
  • Cost trends over time
  • Per-agent cost breakdown
  • Budget utilization percentage
  • Cost optimization recommendations

Integration

The cost tracker integrates with:

  • AI Service token counting from streaming responses
  • Billing API for cost rates per model
  • Cross-workbench store for tenant-level cost context