# Performance Dashboard

Watch how fast your AVCodex agent actually responds. The Performance tab shows real-time latency metrics so you can spot bottlenecks before a field tech complains that the room-support agent is "stuck thinking."

---

The Performance tab gives you visibility into how fast your agent responds. Use it to find bottlenecks, compare models, and tune the experience for techs in the field, programmers on deadline, and end users tapping a QR code in a conference room expecting an answer in seconds.

## Accessing Performance

Open any agent in the Builder and click the **Performance** tab. Data starts collecting automatically after the first message hits your agent.

## Time Range

Use the range selector at the top to filter all metrics by time period:

| Range | Shows |
|-------|-------|
| **24h** | Last 24 hours |
| **7d** | Last 7 days (default) |
| **30d** | Last 30 days |
| **90d** | Last 90 days |

All cards, charts, and session lists update when you change the range.

## Overview Cards

The top section displays four key metrics.

### Median TTFC (Time to First Chunk)

The most important number. How long a user waits before the first word of a response appears. Color-coded:

| Color | Range | Meaning |
|-------|-------|---------|
| **Green** | Under 800ms | Feels instant |
| **Yellow** | 800ms to 2s | Acceptable for most use cases |
| **Red** | Over 2s | Users will notice a delay |

A trend arrow shows whether TTFC is improving or degrading versus the previous period.

### P95 TTFC

The 95th percentile response start time. Worst-case experience: 95% of requests start faster than this. If your median is fast but P95 is slow, some users are hitting edge cases (complex prompts, large manufacturer-spec knowledge bases, slow tool calls into your inventory or ticketing system).

### Success Rate

The percentage of streams that completed without errors. A healthy agent should sit above 98%. If it drops, check for:

- Model API outages.
- Tool execution failures (your control-system status endpoint, your ticketing API, etc.).
- Rate limiting.

### Total Streams

Total number of chat responses generated in the selected period. A trend arrow shows volume change versus the previous period. Useful for spotting when a new deployment (a fleet of conference rooms going live with QR-code support) actually starts driving traffic.

## Pipeline Breakdown

Shows where time is spent before the first token arrives. The bar is split into two phases:

- **Setup**: Context gathering, tool resolution, message history loading, knowledge retrieval. Work your agent does before calling the LLM.
- **Model**: Time from when the LLM request is sent to when the first token arrives. The LLM provider's latency.

> **Tip:** If Setup dominates your TTFC, look at reducing the number of active tools, trimming conversation history length, or paring down the knowledge sources you've attached. If Model dominates, try a faster model or reduce your system prompt size.

## Token Usage

Average input and output tokens per request. High input token counts increase TTFC because the model has more context to chew through. Common causes of high input tokens for AV agents:

- Long system prompts (a 50-page integrator-standards SOP pasted into the system prompt is a classic).
- Large knowledge-source context (every Crestron, Biamp, and Extron PDF you uploaded).
- Deep conversation history.

## Model Comparison

If your agent has used multiple models (after switching models or using model overrides), this table compares them side by side:

| Column | Description |
|--------|-------------|
| **Model** | The model identifier |
| **Streams** | Number of requests processed |
| **Median TTFC** | Median time to first chunk |
| **P95 TTFC** | 95th percentile TTFC |
| **Median Duration** | Median total response time |
| **Avg Input/Output** | Average token counts |
| **Error Rate** | Percentage of failed streams |

Click a model row to filter the entire dashboard to that model. A filter bar appears at the top with a clear button.

> **Note:** Model comparison is especially useful when deciding whether a model upgrade is worth it. Switch models, wait for data to accumulate, then compare before-and-after numbers.

## Recent Sessions

A paginated list of individual chat sessions with performance data:

| Column | Description |
|--------|-------------|
| **Time** | When the session occurred |
| **Model** | Model used |
| **TTFC** | Time to first chunk |
| **Duration** | Total response time |
| **Tokens** | Input and output token counts |
| **Status** | Success, error, or client disconnect |

Click a session to open the **Session Detail Drawer**, which shows a per-stream breakdown:

- Individual phase timings (app config, billing, session load, context, tools, messages, agent ready, first chunk).
- Whether knowledge sources were used.
- How many tools were called.
- Conversation history length at the time of the request.
- Whether deep thinking or deep research was active.

## Optimization Tips

**1. Check the Pipeline Breakdown first.**

If Setup is slow, the bottleneck is on your side (tools, knowledge, history). If Model is slow, the bottleneck is the LLM provider.

**2. Compare models.**

Smaller, faster models like GPT-4.1 Mini often have much lower TTFC than larger models. Use Model Comparison to find the right balance of speed and quality. A field tech standing in a server rack doesn't need a deep-thinking model: they need an answer in under a second.

**3. Watch P95.**

Good median, bad P95 means some users are having a poor experience. Drill into slow sessions to find the pattern. Often it's a specific tool call or a heavy query against a large knowledge source.

**4. Monitor trends over time.**

Use the trend arrows on the overview cards to catch regressions early. A sudden TTFC increase right after you uploaded a 200-page commissioning manual tells you exactly what to roll back.

## Troubleshooting

### No Performance Data

Performance metrics come from streaming chat responses. If you see the empty state:

1. Send a test message to your agent.
2. Wait a minute for data to appear.
3. Refresh the Performance tab.

### TTFC Seems High

1. Check the Pipeline Breakdown. Is Setup or Model the bottleneck?
2. Review your knowledge sources (a large library of Crestron, Biamp, and Extron PDFs increases context time).
3. Check whether deep thinking or deep research is enabled (they add processing time by design).
4. Try the same prompt with a faster model to isolate the issue.

*AVCodex · Your AV expertise. Amplified by AI.*
