Agent Foundry / AI Unit Tests
Catch Breaks Before Release
Pin down the small behaviors your agent must never lose, then test them on every change.
One test covers one promise, with fixed inputs, clear checks, and a useful failure report.
What this page delivers
Small tests guard big agent changes
- 1Known input
- 2Agent action
- 3Clear checks
Result
48 / 48 PASS
Emu on the job
Original mechanism
Small tests guard big agent changes
Follow the work from input to a result your team can review.
Known input
Agent action
Clear checks
Pass or fix
The question answered
How do we test an AI behavior that is not a simple yes or no?
Break the behavior into a small promise. Check the answer, tool call, policy result, or evidence against clear rules. Show the exact reason when it fails.
Three-step flow
From a clear input to a governed result.
Write the promise
Name the exact behavior, input, and result your agent must keep.
Run on every change
Test prompts, tools, models, policies, and context before they merge.
Fix with a clear diff
See the failed step, expected result, actual result, and changed version.
Capabilities
The controls teams need to go deep.
Behavior fixtures
Save prompts, context, tool states, and expected behavior together.
Tool-call checks
Confirm the right tool, arguments, order, and permission result.
Policy assertions
Test blocks, masks, approvals, and safe fallback behavior.
CI-ready reports
Return a clear pass or fail with evidence a developer can act on.
Concrete product artifact
See the proof, not just a green light.
A realistic record keeps the result, the evidence behind it, and the next action in one place.
TEST REPORT
refund-policy.spec / run 884
- Policy refusal
- Pass
- Lookup tool args
- Pass
- Approval before refund
- Fail
- PII masking
- Pass
› expected: request_approval
› actual: issue_refund
› change: tools/router-v7
Buyer outcomes
Less guesswork. More control.
Fast feedback
Find the broken behavior without a giant eval run.
Failure reason
Give developers a result they can fix.
Run in CI
Check every agent change before merge.
Why Trinitite
Built for the full agent lifecycle.
Tests cover the whole action
Check words, tools, policy, identity, and side effects, not just the final text.
Failures point to the break
The report shows the expected step, actual step, and changed version.
Unit tests feed full evals
Small behavior checks join larger task and safety suites when needed.
Keep exploring
Connect this capability to the next handoff.
FAQ
Catch Breaks Before Release, answered.
What is an AI unit test?
It is a small check for one agent promise, such as using the right tool, asking for approval, or masking private data.
Can these tests run in CI?
Yes. They are designed to give a clear pass or fail before an agent change merges.
Can a test check tool calls?
Yes. A test can check the selected tool, its arguments, order, permission result, and returned data.
How are unit tests different from evals?
Unit tests check one narrow promise. Evals test full tasks, longer flows, and groups of behaviors together.
Build with Agent Foundry
Put a test around every agent promise.
Bring one behavior you cannot afford to break. We will turn it into a clear, repeatable test.