Agent Analytics
62%
Tickets deflected
91%
Proposals approved
$0.18
Cost per resolved ticket
4,310
Runs this month
From the run records each agent writes to its app's database, joined with ticket and invoice data.
What matters here
- On Tray Helix you build your own agent analytics: each agent writes its run outcomes to the app's database, and a dashboard app reports on them.
- Record the result, steps, tool calls, approvals, model and tokens for every run, and you can answer most questions later.
- Join run records with business data, such as tickets resolved or invoices paid, to report cost per outcome rather than cost per run.
- Approval rate shows how often people accept the agent's proposals, which is the clearest early signal of whether it is right.
- Run and tool-call logs also stream to Splunk, Datadog or any SIEM, so security sees the same runs.
Who this is for
You own one or more agents in production, and someone has asked whether they are worth it. You want numbers the business recognizes, not a token count.
How it works in practice
From a run ending to a number on a dashboard.
- 1
A run ends
Completed, declined, failed or stopped at its step limit.
- 2
The agent writes a run record
Result, steps, tool calls, approvals asked and given, model, tokens and the business record it touched.
- 3
The dashboard joins your data
Run records next to tickets resolved, invoices paid or records fixed, from the systems that own them.
- 4
It reports outcomes
Deflection, approval rate, cost per outcome, and trends by agent and model.
- 5
Owners act on it
A falling approval rate or a rising cost per outcome is the prompt to look at the agent's tools or model.
What agent analytics is made of
A run record, the joins, and the handful of metrics that matter.
A run record
One row per run: agent, result, steps, tool calls, approvals, model, tokens and the business record touched.
Outcome joins
Each run linked to the ticket, invoice or record it handled, so results are measured where they happen.
Core metrics
Deflection, approval rate, cost per outcome, and failure or step-limit stops.
Owner views
Each agent's owner sees their own agent, and leaders see all of them.
The prompts
Paste these into Claude Code, Codex or Cursor in order. Each one leaves you with something that runs, so you can stop after any step.
These prompts start from a Helix project, which is what handles sign-in, credentials and hosting. Start with Helix.
Write a record for every run
The data everything else depends on.
In my Helix app, make the agent write one run record at the end of every run to the app's database.
Record: agent name, start and end time, result (completed, declined, failed, stopped at limit), number of steps, each tool call and whether it succeeded, approvals asked and given, the model, input and output tokens as returned by the model provider, and the ID of the ticket or record the run handled.
Add a read-only API route that returns run records for a date range, so a dashboard app can read them with a Helix API token.
The dashboard app
Outcomes, not run counts.
Create a Helix app: an agent analytics dashboard.
Read the run records from each agent app's run-records route, with a Helix API token per app. Show, per agent and overall: runs, completion rate, approval rate (approvals given divided by asked), average steps, stops at the step limit, tokens, and cost using a rate per model that I can edit.
Show trends by week, and let me filter by agent, model and result.
Join the business outcomes
Deflection and cost per outcome.
Join the run records to the business records they handled.
For the ticket agent, deflection is tickets resolved with no reply edited by a person, divided by all tickets the agent handled. For the invoice agent, report invoices approved to pay per run.
Report cost per outcome: model cost divided by resolved tickets or paid invoices. Show it next to the volume, so a cheap agent that resolves nothing does not look good.
Connect it to real systems
Your agents, your outcomes.
Now connect it to the systems we actually run.
Anything in angle brackets is a placeholder. Swap it for whatever we use.
<Jira Service Management>. Read ticket status and who sent each reply.
<Snowflake>. Read the business tables I want next to agent results.
This dashboard is read only.
Ship it
A URL, and the owners on it.
Deploy my app.
What it connects to
Run records come from the agents. Outcomes come from the systems that own them.
- Each agent app Return its run records from a read-only API route, called with a Helix API token. Reads
- Jira Service Management Read tickets resolved without a person, for deflection. Reads
-
Snowflake Read the business data you want next to agent results. Reads -
Splunk Where agent and audit logs stream, for security's view of the same runs. Reads
Named systems are the ones most teams actually run, not a list of the only ones that work. Swap in whatever you use.
Running it for real
The build gets you a dashboard. Running it means the data is trusted, access is scoped and security sees the same runs.
- 1
Deploy the dashboard like any app
One command, or Deploy from CI on every merge, takes it to a live URL, and you can roll back any deployment.
- 2
Scoped access to the numbers
SSO and access control decide who sees which agents, so cost and outcome data reach the right people.
- 3
Credentials held by Tray
Read credentials for the business systems are held in Tray, not in the code.
- 4
Logs for security, too
Tray streams agent, workflow and audit logs to Splunk, Datadog or any SIEM, so security reviews the same runs the dashboard counts.
- 5
AI usage per app
Usage shows per app in Tray, next to the cost per outcome your dashboard reports.