AgentTrustCI

A JUnit 5 framework that catches enterprise AI-agent failures before release by turning allowed-tools, grounded-answers, and golden-trajectory expectations into regression tests that run in CI.
AgentTrustCI is a small JUnit 5 framework for catching enterprise AI-agent failures before a release ships. It turns three classes of expectation into regression tests that run in CI next to your unit tests, so agent behavior is gated at build time rather than discovered in production.
This is the reference implementation behind my Confidential Computing Summit talk on application-layer agent trust.
Three layers of behavioral trust
- Allowed tools. Mock the model and assert the agent only ever selects approved tools, with valid parameters. A forbidden tool call fails the build.
- Grounded answers. A deterministic judge checks, with rules rather than a model, that every ID, quote, and number in the final answer actually appears in what the tools returned, and flags filtered or fabricated data.
- Golden trajectories. Assert the exact ordered sequence of tool calls, because in regulated workflows the path matters as much as the destination.
How it runs
Golden datasets encode the expected sequences and the forbidden tools. The suite runs in CI and fails the build when behavior drifts outside policy, which turns agent safety into a build-time gate rather than a manual review step. The repository is self-contained: clone, run the tests, and read the golden cases and experiment runner to see the whole approach end to end.
