# AgentTrustCI: Build-Time Policy, Grounding, and Trajectory Tests for Java LLM Agents

DevFeed: [AgentTrustCI: Build-Time Policy, Grounding, and Trajectory Tests for Java LLM Agents](<https://devfeed.tech/articles/agenttrustci-build-time-policy-grounding-and-trajectory-tests-for-java-llm-agents-118084.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.06674>)

Author: Sachin Gupta

Published: 2026-11-05T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Software Engineering](<https://devfeed.tech/sources/arxiv-software-engineering.md>)

Topics: [LLM security](<https://devfeed.tech/topics/llm-security.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agents](<https://devfeed.tech/tags/agents.md>), [build](<https://devfeed.tech/tags/build.md>), [contracts](<https://devfeed.tech/tags/contracts.md>), [coverage](<https://devfeed.tech/tags/coverage.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-se](<https://devfeed.tech/tags/cs-se.md>), [enterprise](<https://devfeed.tech/tags/enterprise.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [execution](<https://devfeed.tech/tags/execution.md>), [framework](<https://devfeed.tech/tags/framework.md>), [grounding](<https://devfeed.tech/tags/grounding.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [infrastructure-security](<https://devfeed.tech/tags/infrastructure-security.md>), [integration](<https://devfeed.tech/tags/integration.md>), [interface](<https://devfeed.tech/tags/interface.md>), [java](<https://devfeed.tech/tags/java.md>), [junit](<https://devfeed.tech/tags/junit.md>), [llm](<https://devfeed.tech/tags/llm.md>), [llm-agents](<https://devfeed.tech/tags/llm-agents.md>), [policy](<https://devfeed.tech/tags/policy.md>), [tests](<https://devfeed.tech/tags/tests.md>)

## AI overview

AgentTrustCI adds build-time behavioral tests for Java LLM agents, checking whether recorded traces use allowed tools, ground answers in tool output, and follow required workflows. Its deterministic replay supports repeatable JUnit 5 tests, with an interface for optional semantic judging. Across 55 synthetic cases in seven domains, the full pipeline classified all 30 injected faults and 25 controls, including ten non-trivial controls, and missed none of 12 designated critical cases. Single-layer configurations classified 35 cases each, reflecting a corpus designed to isolate ten faults per layer. These results show coverage of the authored suite, not production accuracy; the paper also describes validating against production traces and maintaining expectations as workflows change.

## Source excerpt

arXiv:2611.06674v1 Announce Type: new Abstract: Infrastructure security does not establish whether an LLM agent selected an allowed tool, grounded its answer in tool output, or followed a required workflow. AgentTrustCI is a Java/JUnit 5 framework that expresses these application-layer expectations as policy, grounding, and trajectory checks over recorded traces. A deterministic replay implementation supports repeatable build-time tests; a judge interface provides an extension point for optional semantic evaluation. On 55 synthetic cases spanning seven enterprise domains, the full pipeline correctly classifies all 30 injected faults and 25 passing controls, including ten non-trivial controls, and misses none of 12 designated critical cases. Each single-layer configuration correctly classifies 35 cases because the corpus deliberately isolates ten faults per layer. A grounded answer obtained through a disallowed sequence illustrates the additional coverage of trajectory checks. Repeated measurements quantify validator execution separately from process startup and reporting. These results establish coverage of the authored regression suite, not production accuracy. We describe a production-trace validation protocol, optional LLM-judge integration, and maintenance of expectations as workflows evolve. The contribution is a practical pattern for expressing behavioral contracts within an existing Java release pipeline.