AI Usage tab
Toolbar, the query and action rows, the detail sheet and what the tab keeps.
Every query and action an AI agent, or you, made in the app with the devtools command line tool,
newest first, with the reply it got. Holds the 100 most recent. How agents use the tool is on
Use with AI agents.
[⏺] [⊘]
network --where state=error --since 10m 14:02:31
2/214 1.4 ms
get network fetch-1762172310455-212 14:02:40
1/214 0.6 ms
network send GET https://api.example.com/v1/me 14:03:05
action 0.41 sThe reply is recorded after every redaction, so the tab shows exactly what left the app.
Empty state
With no query yet, the tab says No agent queries yet, says what the tab is for (reading the
app's devtools, mocking a request or sending one), and shows a command to start with,
npx devtools topics.
Toolbar
| Control | What it does |
|---|---|
| Record / Clear | As on the panel. Paused, agents can still query and act, and nothing they do is kept. |
aiUsage.disabledByDefault opens the tab paused. See the provider reference.
A row
| Element | Meaning |
|---|---|
| Command | The query or action as you would type it after devtools, flags included, quoted only where a shell needs it. |
| Time | Wall-clock time the app answered. |
| Matched | Rows the query matched, of the rows the topic held, as 2/214. - for an error or a topic that is off. action marks an action, which changes something rather than reading it. |
| Error | In place of Matched, in red, when the reply was an error: line. |
| Took | How long the app took to answer. |
Detail sheet
Tap a row. The header carries the command and Copy, which copies the reply.
| Field | What it shows |
|---|---|
| Time | When the app answered. |
| Topic | The topic asked about. |
| Matched | As on the row. For an action, Action in its place, with the action's name. |
| Took | How long the app took. |
| Reply size | The whole reply in characters, and cut to the first 64 K when only its start was kept. |
| Error | The error's message, when there was one. |
The Reply section holds the reply exactly as the agent got it: a JSON tree for get or --json
output, monospace text otherwise.
What it keeps
- Every query through the tool: a topic's rows and
get.appsandtopicsare probes and are not listed. - While a topic is still reading (storage listing keys or reading values), the tool asks again until it has an answer. Only that answer is listed.
- Up to 64 K characters of each reply.
--fulland--outcan ask for more, and the row says so. - A query of
ai-usageitself is listed without its reply, which would otherwise repeat every earlier reply. - Every action, refused ones included. An action that waits on the app, such as
network send, is listed when it ends, even if the tool gave up waiting first. In its command, a header that the log would mask (authorization,cookie,set-cookie, and any innetwork.redactHeaders) shows as[redacted], and a body over 200 characters shows its start and its length.
The same list is the ai-usage topic, so the tool can read it back:
devtools ai-usage --where 'topic=network', devtools ai-usage --where 'action?' for the actions
alone, or devtools get ai-usage <id> for one reply.
The same tab is in React Native DevTools; see its reference.