# Debug Agent

> An experimental sheet that shows live what one Agent receives, its reasoning and output, and every tool call it makes.

Source: https://air.build/docs/screens/team/debug-agent/

> [!NOTE]
> Debug Agent is an experimental feature. It shows only when Settings › About › **Experimental Features** is on and its **Debug Agent** switch is on too; both are off by default and apply to this device only. It's on iPhone, iPad and Mac. See [Experimental Features](https://air.build/docs/settings/experimental/).

Debug Agent shows, live, what one Agent is doing: what it receives (its prompts), its reasoning and its output as they're written, and every tool call it makes, with the result. It's a timeline, newest at the bottom, for finding out why an Agent did something.

## Open it

Turn on **Experimental Features** and **Debug Agent** first (see the note above). Then:

**iPhone**

- On the Agent's [profile](https://air.build/docs/screens/team/agent-profile/), tap **Debug Agent** among the buttons under its name.
- In the list of chats, touch and hold the Agent, then choose **Debug Agent**.
- In the Agent's chat, tap **⋯** in the top-right corner, then **Debug Agent**.

It opens as a sheet titled **Debug — _Name_**.

**Mac**

- On the Agent's profile or in its **Profile** tab, click **Debug Agent** among the buttons under its name.
- In the list of chats, Control-click the Agent (on iPad, touch and hold it), then choose **Debug Agent**.

It opens as a sheet titled **Debug — _Name_**.

In the Agent's menu, **Debug Agent** sits after **Pin** and before **Remove Agent**.

## What's on it

| Item | What it shows or does |
| --- | --- |
| Title | **Debug — _Name_** |
| Status | A dot and a word, top right on iPhone and iPad, beside the title on Mac. See [Status](https://air.build/docs/screens/team/debug-agent/#status). |
| Timeline | One row per event, oldest at the top. It stays at the newest row as events arrive, unless you scroll up. |
| **Done** | Closes the sheet and stops the live feed. Top left on iPhone and iPad; bottom right on Mac. On the Mac, Return presses **Done**. |

### Status

| Status | What it means |
| --- | --- |
| **Connecting** | The sheet is joining the Agent's feed. |
| **Live** | Events show as they happen. |
| **Starting Environment** | The place where the Agent runs is starting. The sheet tries again every 3 seconds by itself. |
| **Reconnecting** | The feed dropped. The sheet tries again every 3 seconds by itself and carries on from the last event it showed. |
| **Stream Unavailable** | The feed can't be shown for this Agent right now, for example when the computer it runs on is offline. The sheet stops trying; close it and open it again later. |

### Rows

| Row | What it shows | Tap it to |
| --- | --- | --- |
| Line with **Run Started** or **Run Ended** and a time | Where one piece of work by the Agent starts or ends. |  |
| Line with a time only | A new turn within the work. |  |
| **LLM Request** | The Agent was sent a request for the model: what it receives. | Show the start of the request's raw content. |
| **LLM Response** | The model began answering. |  |
| **LLM Stream Ended** | The model's answer ended. When it failed, the row has a chevron to open. | Show why it failed. |
| **Reasoning** | The Agent's reasoning, as it's written. Long reasoning folds to four lines. | **Show More** / **Show Less** under it. |
| **Output** | What the Agent writes, as it's written. |  |
| Tool call | A mark (spinner while running, check mark when done, cross mark when failed), the tool's name, one line on what the call is for, the error if it failed, how long it took and the time. **Unknown Tool** when the name isn't known. | Show its **Input** and **Output**, in raw form. |
| **Events Dropped** | Some events didn't reach the sheet, so the timeline has a gap here. | Show details. |
| **Model Stream Retrying** | The model's answer is being tried again. | Show details. |
| **Model Stream Error** | The model's answer had an error. | Show details. |
| **Live Output Rewound** | The live output went back to an earlier point; rows after it carry on from there. |  |
| Other rows | Other events, by their name in plain words. | Show details, when there are any. |

Raw content can be selected and copied. The timeline keeps the newest 1,500 rows; as it grows past that, older rows drop off the top.

There are no filters or search in the sheet.

## Watch an Agent work

1. Open **Debug Agent** for the Agent.
2. Wait for **Live**.
3. Send the Agent a message, in its chat or by mentioning it in a Project chat.
4. Watch the rows arrive. Tap a tool call to see what went in and what came back.
5. Tap **Done** when you're finished.

The app doesn't say whether opening the sheet again shows events from before it was opened.

## Messages

| Message | When it shows | What to do |
| --- | --- | --- |
| **Waiting for Events** "Events appear when the agent works. Send it a message to see the stream." | Nothing has arrived yet. | Send the Agent a message. |
| **Stream Unavailable** | The feed can't be shown for this Agent right now. | Close the sheet and try later. |
| **No Team Selected** | The Team was switched while the sheet opened. | Close the sheet and open it again from the Agent. |

> [!WARNING]
> The sheet shows what the Agent receives and thinks, which can include anything in your Team's chats and files the Agent works with. Take care before you share a screenshot of it.
