OffRail
Knowledge base

Agents Monitoring

Track cost, tokens, and sessions for every coding agent in a project

The Agents page groups your project's gateway traffic by the coding agent that produced it — Claude Code, Cursor, OpenCode, Cline, Codex and others — so you can see which tool is spending your credits and drill into the individual sessions behind the numbers.

Agents Monitoring

Agents are identified by the x-source header their requests send. Anything that doesn't match a known agent stays out of this view — use Activity for the full request log.

Filtering the view

Two controls sit above the agent cards and both are stored in the URL, so a filtered view can be bookmarked or shared:

ControlOptionsDefault
Time range1h, 4h, 24h, 7d, 30d7d
Usage modeAll, Credits, BYOKAll

Credits shows only traffic billed against your credit balance, BYOK only traffic served by your own provider keys. The summary on the right of the row totals the agents, requests, and spend currently in view.

Agent Cards

Each agent that was active in the selected period gets a card:

FieldDescription
NameThe agent, matched from its request source
Total costSpend for this agent in the period
RequestsNumber of API requests
TokensPrompt and completion tokens combined
Last activeWhen the agent last sent a request

Click a card to open its detail view.

Agent Detail

Agent Detail

The detail view splits the agent's requests into sessions — consecutive requests with less than a 30-minute gap between them. Each session row shows its time range, request count, total tokens, duration, and cost. Expand a session to see the individual requests with their response previews, model, cache status, tokens, cost, and source.

Sessions load as you scroll; Load more sessions fetches the next page manually.

Exporting to CSV

Export CSV downloads every request in the selected period — not just the sessions currently loaded — for the agent you are viewing. Use it to reconcile agent spend against your own reporting.

See also Coding Agents.

How is this guide?

On this page

Ready for production?

Ship to production with SSO, audit logs, spend controls, and guardrails your security team will approve.

Explore Enterprise