Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt

Use this file to discover all available pages before exploring further.

Analytics aggregates the same telemetry you see in LLM Calls and Traces into trends you can act on at the team or portfolio level. Use it to spend less, not slower agents, and catch regressions across releases.

What you can answer

Where is my LLM bill going?

Cost by model and by agent, broken down per day. Drill into the dominant cost driver.

Are my agents getting slower?

p50 / p95 / p99 latency over time, per agent and per model.

What's failing and how often?

Error rate per model and per agent, with click-through to the failing runs.

Which model is best for this job?

Model performance comparison — cost, latency, and error rate side by side.

Key endpoints

These are the analytics API endpoints the UI is built on. You can call them directly to feed BI tools.
EndpointReturns
GET /api/analytics/usage/costsDaily cost by model and agent.
GET /api/analytics/usage/modelsPer-model p50, p95, latency, error rate.
GET /api/analytics/usage/agentsPer-agent volume and cost.
GET /api/analytics/usage/errorsError breakdown by reason and model.
Filter parameters mirror the run filters: time range, app, agent, status, model.

Cost tracking

Cost is computed at write time as tokens × per-1k-token rate for each LLM call. The rate table lives in utils/model_costs.py. Two consequences worth knowing:
  • Adding a new model means adding a row to the cost table. Until that happens, calls with that model show cost = 0.
  • Cost only applies to events of type llm — chain or tool spans don’t accumulate cost themselves.
The cost column on the Run model is denormalised. Any backfill (price change, retroactive rate) requires re-running the cost recalc job.

Performance views

The Model performance view sorts models on three axes you usually care about together:
  • p50 and p95 latency
  • Error rate (errors ÷ total)
  • Average cost per call
A model that’s cheaper but ten times slower is only worth it for batch workloads. The view shows them side by side so the trade-off is visible.

Drift Monitor

For distribution-level changes the aggregate charts miss.

Financial ROI

Turn cost and volume into per-agent ROI.
Last modified on June 2, 2026