Analytics
Understand model usage, settled cost, Resource reliability, custom events, live projections, and durable historical exports.
Analytics answers historical and aggregate questions about Runs, models, Tools, Resource operations, Channels, deployments, Credentials, and custom product events. The Console dashboard uses a bounded recent projection for model calls, tokens, cache use, latency, spend, Agent activity, and Resource reliability.
Analytics is not authoritative live workflow state. A Session exposes current status, waits, controls, journals, and ledger facts. Use a Session’s /workflow endpoint when an operator needs authoritative liveness; use analytics for cross-workflow trends, investigation, cost, and export.
Data paths
| Need | Interface |
|---|---|
| Recent dashboard and activity | Console or POST .../analytics/dashboard and /live |
| Simple recent summary | GET .../analytics/summary |
| Aggregate or raw historical query | POST .../analytics/query |
| Bounded durable artifact | POST .../analytics/exports, then GET .../exports/:ref |
| Product-specific event | analyticsEvent() plus runtime emit() |
| Exact current Run state | Session /workflow, Run detail, and journal routes |
Choose an interface
| Interface | Use it for |
|---|---|
| Console | Visual exploration of recent usage, cost, activity, and reliability |
| SDK | Declaring bounded custom events in runtime code |
| CLI | Repeatable recent queries, historical analysis, and exports |
| Platform API | Product dashboards, data workflows, and artifact retrieval |
Use Instrument custom analytics to add a typed event. Use Query and export analytics for time windows, filters, grouping, raw detail, and artifacts.