Skip to content

How to test an agent before it ships

A prompt tweak or a new model can quietly make an agent worse. Score every change against real cases, and block the deploy when the score drops.

Last reviewed November 2026

App, built with Tray Helix

The short answer

On Tray Helix you test an agent with parts you already have. Keep test cases in the app's Helix database. Write an eval function that runs the agent on each case and scores the result, with rules where the answer is exact and a model as judge where it isn't. Run it in CI through Deploy from CI, and block the deploy if the score falls below your bar. A staging workspace and deploy approvals sit before production, and the run logs are the evidence.

triage-evals.helix-app.ai

Triage Agent Evals

120

Test cases

94%

This change

92%

Production

90%

Bar to deploy

Case Expected Agent proposed Score Scored by
Screen won't connect AV, P3, Facilities AV, P3, Facilities Pass Rules
Locked out of laptop Access, P2, IT Access, P2, IT Pass Rules
Reply to a VIP Polite, sets expectations Clear, no promise of a date 4/5 Model as judge
New starter kit Hardware, P3, IT Access, P3, IT Fail Rules
A sketch of one eval run. Exact fields are scored by rules, the reply by a model as judge, and the deploy goes ahead only above the bar.

What matters here

  • On Tray Helix you build agent evals from Helix parts: test sets in the database, an eval function, and Deploy from CI as the gate.
  • Score with rules where the answer is exact, such as the category chosen, and with a model as judge where it isn't, such as a drafted reply.
  • Check what the agent proposed to do, not only what it said: the tool it chose and the input it gave.
  • Block the deploy when the score drops below your bar, so a regression never reaches production.
  • A staging workspace and deploy approvals sit between a passing test and production.

Who this is for

You own an agent that people rely on, and you change it: the prompt, the tools, the model. You want to know a change is better before it ships, not after someone complains.

How it works in practice

From a change in a branch to a release someone approved.

  1. 1

    You change the agent

    A new prompt, tool or model, in a branch, like any other code change.

  2. 2

    CI runs the evals

    Deploy from CI runs the eval function against the test set before it deploys.

  3. 3

    Each case is scored

    Rules for exact answers, a model as judge for the rest, including which tool and input the agent proposed.

  4. 4

    The score gates the deploy

    Below the bar, the pipeline stops. Above it, the change goes to the staging workspace.

  5. 5

    A person approves the release

    Deploy approvals put a reviewer between staging and production, with the eval results attached.

What an agent test setup is made of

Cases, a scorer, a gate and a person.

A test set

Real cases with the expected outcome: the tool the agent should choose, its input, and what a good reply looks like.

An eval function

Runs the agent on each case without letting any write tool act, and scores the result by rules or a model as judge.

A CI gate

Deploy from CI runs the eval function and stops the deploy below the bar.

Staging and approval

A staging workspace to try the change, and deploy approvals before production.

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

The test set

Real cases and what good looks like.

Claude Code, Codex or Cursor

In my Helix app, add a test set for the triage agent.

Store test cases: the ticket text, the expected category, priority and team, and for the reply, a short description of what a good reply does. Let me add a case from any real ticket with one click, and edit the expected outcome.

Seed it with 30 cases from our resolved tickets across every category.

2

The eval function

Run the agent, score the result.

Claude Code, Codex or Cursor

Add an eval function that runs the triage agent on every test case.

In eval mode, the agent proposes tool calls but no write tool runs. Record the tool it chose and the exact input.

Score category, priority and team by rules: exact match passes. Score the drafted reply with a model as judge, from 1 to 5, against the case's description of a good reply, and record the judge's reason.

Store each eval run with the agent version, the model, every case's score and the overall pass rate. Show failures first.

Scoring the proposed tool call, not only the text, is what catches an agent that sounds right and does the wrong thing.
3

Gate the deploy

No regression reaches production.

Claude Code, Codex or Cursor

Set up Deploy from CI for this app with helix ci init.

Before the deploy step, run the eval function. If the pass rate is below 90%, or lower than the last production run by more than two points, fail the job and print the failing cases.

Deploy passing changes to our staging workspace first.

4

Ship it

Staging, then a person, then production.

Claude Code, Codex or Cursor

Deploy my app.

Turn on deploy approvals so a reviewer signs off between staging and production. Production reviewers can also be set with GitHub environment protection in the CI job.

What it connects to

Everything lives in the app and your Git host.

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 evals. Running it means they gate every change and leave evidence behind.

  1. 1

    A gate in CI

    Deploy from CI runs the evals before each deploy and stops a change that scores below your bar.

  2. 2

    Staging, approval, rollback

    Changes land in a staging workspace first, deploy approvals gate production, and you can roll back any deployment.

  3. 3

    Credentials held by Tray

    Model keys and system credentials are held in Tray, so CI never needs the secrets.

  4. 4

    Evidence on record

    Each eval run is stored with the agent version and model, and run logs stream to your SIEM, which is what an auditor asks for.

  5. 5

    Know what testing costs

    AI usage shows per app, so eval runs and the judge model are visible next to production use.

Questions people ask

How do I test an AI agent on Tray Helix?

Build it from Helix parts. Keep test cases in the app's database, write an eval function that runs the agent and scores the results by rules or a model as judge, and run it in CI through Deploy from CI to gate the deploy. A staging workspace and deploy approvals sit before go-live.

Is this a built-in eval product?

No. It is built from Helix parts you already have: the database, a function, Deploy from CI, staging and deploy approvals. You choose the cases, the scoring and the bar.

When should I use a model as judge?

When the answer isn't exact, such as a drafted reply. Use rules for anything exact, such as the category, the tool chosen and its input. Record the judge's reason, so you can check the scoring.

What stops the eval run from changing real data?

In eval mode the agent proposes tool calls but no write tool runs. In production, writes are tools marked for approval anyway.

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.