# See what happened

> Finds out what an agent did, whether it ran as often as it should, and whether it uses what it was given.

**Skill for your coding agent:** [`mindset-test-agent/SKILL.md`](https://docs.mindset.ai/skills/mindset-test-agent/SKILL.md)

Running an agent is a loop: see what happened, diagnose what went wrong, change the agent, test the change, activate it, then see what happens next. Highlighted: See.

## Ask your AI client

```
Did the invoice exceptions agent run every morning this week? Show me any run that failed, how far it got, and which version ran.
```

## What you get back

Your AI client reads the same records the Studio shows, through the `mindset-admin` MCP server, and changes nothing. It counts the [runs](https://docs.mindset.ai/docs/runs) in the window, opens a conversation turn by turn, and names the [version](https://docs.mindset.ai/docs/versions-and-going-live) behind each one.

## What to read

**Status.** Every resource answers two questions separately: did anything happen in the window, and did the last one succeed? **Active** ran and succeeded, **Failing** ran and failed, **Idle** didn't run in the window, **Never used** never ran. An agent idle for a week isn't failing. A resource only an admin has tried out reads **Idle** or **Never used** until you turn on **Include exploratory runs**.

**Speed.** **p50** is the median call, **p95** what one call in twenty waited at least, and **Tail** is p95 divided by p50. From 4× the tail turns red: look at what the slow calls share, usually one outside system or one large input.

**Granted versus used.** A knowledge base the agent was granted and never searched is a dead grant: the answer still sounds confident and nothing fails. A call with no current grant shows on **Topology** as **Used without grant**. Mindset refuses calls without a grant, so it usually means the grant was withdrawn, or the resource renamed or deleted, after those calls.

## When a number moves

| What you see                                     | What it usually means                        | Next                                                                                                      |
| ------------------------------------------------ | -------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| **Active** turns **Failing**                     | The last run errored                         | [Diagnose and improve](https://docs.mindset.ai/docs/diagnose-and-improve-an-agent)                                               |
| Every operation on one connection fails at once  | The credential expired or was rotated        | Replace it on the connection's **Settings** tab                                                           |
| No run at all                                    | Nothing started it                           | Check the trigger, not the agent                                                                          |
| A schedule fired nine times out of fourteen      | The trigger, or the version that holds it    | Check the schedule is on in the active version                                                            |
| "Broken by a change to something they depend on" | A connected system stopped returning a field | [Change something that's live](https://docs.mindset.ai/docs/change-something-thats-already-live#when-a-connected-system-changes) |
| p95 rises after an activation                    | The new version                              | Compare the two versions                                                                                  |
| p95 rises with nothing changed in Mindset        | The system it calls                          | Find the slow connection on **Performance**                                                               |

## What you decide

How often someone looks, and who. Mindset sends no alerts.

| How much the work matters                | Look                          |
| ---------------------------------------- | ----------------------------- |
| A customer notices within hours          | Daily                         |
| Anything that changes a system of record | Daily, however quiet it looks |
| Internal work with a deadline that week  | Twice a week                  |
| Reporting, nothing urgent                | Weekly                        |

Name a person and a backup, or alert from your own tooling.

## Alert from your own tooling

**Telemetry export (OpenTelemetry)**, on **Settings → Governance**, sends traces and metrics to Datadog, Grafana, Honeycomb or any OTLP collector. Enter the **OTLP endpoint**, the **Auth header name** and the **Auth token**, choose what to send, then press **Test**. **Save** is enabled only after the endpoint accepts the test.

**Send traces**, **Send metrics** and **Send agent behavior** start on. **Send costs** starts off and sends one span per model call with its priced cost. **Include end-user identifiers** starts on and puts the person's email or user ID on every span. Message content is never exported.

> **Info:** Telemetry export is an org setting. Once it's on, every agent in the org reports to your collector, whoever built it.

## Done when

- You can open any run and say what started it, which version ran, how far it got and what it reached.
- You can name one agent's dead grants, or say it has none.
- A named person checks on a stated rhythm, with a backup, or your own tooling alerts.

## In the Studio

**Monitor** has the **Cost**, **Performance**, **Resources** and **Topology** tabs. **Log** has **Sessions**, one row per conversation with delegated sessions indented beneath, and **Events**, one row per step. Open a step to see the version that produced it. Open a session for **Transcript**, **Steps**, **Resources**, **Cost** and **Compliance**, and to **Export session** as JSON or **Save as acceptance test**. The **Monitor Agent** and **Log Agent**, docked on the left, answer the same questions and can switch tabs for you. Both pages are admin only and show the environment chosen in the switcher.

![Log → Sessions, one row per conversation.](https://docs.mindset.ai/images/docs/studio/log-sessions.png)
