Skip to content

How to build your own agent analytics

A vendor's agent dashboard counts runs. You need to know whether the agent did the job, at what cost, next to the numbers your business already tracks.

Last reviewed November 2026

App, built with Tray Helix

The short answer

Build agent analytics as a Helix app. Each agent writes one record per run to its app's Helix database: the result, steps, tool calls, approvals asked and given, the model and the tokens used. A Helix dashboard app reads those records, joins them with your own data, such as tickets resolved or invoices paid, and reports deflection, approval rate and cost per outcome. You choose the metrics, because you own the data.

agent-analytics.helix-app.ai

Agent Analytics

62%

Tickets deflected

91%

Proposals approved

$0.18

Cost per resolved ticket

4,310

Runs this month

91%
84%
77%
95%
Ticket triageIT accessCRM hygieneInvoice matching

From the run records each agent writes to its app's database, joined with ticket and invoice data.

A sketch of the overview. Every figure comes from records the agents write and data the business already has.

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. 1

    A run ends

    Completed, declined, failed or stopped at its step limit.

  2. 2

    The agent writes a run record

    Result, steps, tool calls, approvals asked and given, model, tokens and the business record it touched.

  3. 3

    The dashboard joins your data

    Run records next to tickets resolved, invoices paid or records fixed, from the systems that own them.

  4. 4

    It reports outcomes

    Deflection, approval rate, cost per outcome, and trends by agent and model.

  5. 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.

1

Write a record for every run

The data everything else depends on.

Claude Code, Codex or Cursor

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.

Add this prompt to each agent's app. The same shape in every app is what makes one dashboard possible.
2

The dashboard app

Outcomes, not run counts.

Claude Code, Codex or Cursor

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.

3

Join the business outcomes

Deflection and cost per outcome.

Claude Code, Codex or Cursor

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.

4

Connect it to real systems

Your agents, your outcomes.

Claude Code, Codex or Cursor

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.

Tray holds each credential as a workspace authentication, so the app references a name and never the secret itself.
5

Ship it

A URL, and the owners on it.

Claude Code, Codex or Cursor

Deploy my app.

Your assistant runs helix deploy and the app comes back as a URL. Set Access Control so each owner sees their own agents.

What it connects to

Run records come from the agents. Outcomes come from the systems that own them.

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. 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. 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. 3

    Credentials held by Tray

    Read credentials for the business systems are held in Tray, not in the code.

  4. 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. 5

    AI usage per app

    Usage shows per app in Tray, next to the cost per outcome your dashboard reports.

Questions people ask

Does Tray Helix have agent analytics?

You build the analytics you want as a Helix app. Agents write each run's result, steps, tool calls, approvals and model to the app's database, and a dashboard app reports the metrics your business wants, joined with your own data. Logs also stream to your SIEM, and AI usage shows per app.

Why build it rather than use a vendor dashboard?

Because the useful metrics, such as deflection and cost per outcome, need your business data. Run counts and tokens alone don't tell you whether an agent did its job.

What is approval rate?

Approvals given divided by approvals asked. It shows how often people accept the agent's proposed actions, and a drop is the earliest sign that something changed.

How is cost per outcome calculated?

Model cost, from the tokens each run records and a rate per model you set, divided by the outcomes the agent produced, such as resolved tickets or paid invoices.

Build it, then run it properly

Helix is the governed runtime for AI-built apps and agents. Deploy what you build, put SSO in front of it, connect it to your systems with managed credentials, and give it a named owner.