The Analytics Page
Open any agent and go to the Analytics section. You’ll see metrics for the selected time period.Time Periods
Select a period to analyze:- Today - Current day
- Last 7 days - Past week
- Last 30 days - Past month
- Last 90 days - Past quarter
- Custom - Specific date range
Key Metrics
Users & Engagement
Quality
Performance
Cost
Trend Charts
Visualize metrics over time:- Users trend - Growth or decline in user base
- Conversations trend - Usage patterns by day
- Messages trend - Engagement over time
Tool Usage
See which capabilities are used most:
Use this to identify:
- Underutilized capabilities (consider removing)
- High-failure tools (investigate issues)
- Most valuable integrations
Model Usage
If your agent uses multiple models, a breakdown is displayed showing:- Model name - Each model used
- Calls - Number of LLM invocations per model
- Tokens - Total tokens consumed per model
- Cost - Estimated cost per model
Interpreting Results
Healthy Signs
- Steady or growing active users
- Ratings above 4.0
- Low error rates
- Good avg messages per conversation
Warning Signs
- Declining active users
- Ratings below 3.5
- Increasing error rates
- Very low messages per conversation (users giving up)
Action Items
Based on analytics, consider:How It Works
Pipeline Overview
- Event emission — As agents are used, Elasticsearch events are emitted by agent-factory and llm-gateway
- Aggregation — A scheduled job reads these events and writes pre-aggregated rows into the
agent_metricscollection - Read — The analytics endpoint reads from
agent_metrics, self-heals if needed, and returns the result
Event Sources
Caching
Summary metrics are cached for 1 hour in theagent_metrics collection. With warm cache, response time drops from ~1.5s to ~100ms.
Self-Healing
The analytics endpoint performs two checks:- Current interval refresh: The current in-progress hour or day is re-aggregated if stale (15-minute threshold for hourly, 1-hour for daily)
- Gap detection: If fewer intervals exist than expected (e.g., cron missed a run), a full re-aggregation is triggered
Scheduled Jobs
Refreshing Data
Analytics are cached for performance. To see the latest data:- Click the Refresh button
- Wait for metrics to update
Analytics may have a delay of up to 15 minutes for very recent activity.
POST v1/agents/:agent_id/refresh-metrics with an optional hours_back parameter (max 168 = 1 week).
Exporting Data
Export analytics for reporting:- Select your time period
- Click Export CSV
- Download the file
Privacy Considerations
Analytics are aggregated and anonymized:- Individual conversations are not exposed
- User identities are not revealed in metrics
- Only owners and admins see analytics
Next Steps
Improve based on feedback
Use insights to refine your agent’s instructions
Insights
Deep dive into conversations and user feedback