Skip to main content
← All posts

How do we trust AI agents in production?

Modulo Team

governancegatesaudit

How do we trust AI agents in production?

Trust is a system of checks that makes the cost of a mistake lower than the cost of not running the agent at all. When an engineer asks "can we trust this AI agent in production?", what they are really asking is "if the agent makes a mistake, will we catch it before it matters?"

What does not work

Blind trust is the obvious failure mode. Give an agent write access, let it run, and hope. This works until it does not, and when it does not, the damage is done before anyone notices.

The opposite extreme also fails: require human approval for every agent action. This defeats the purpose of automation. If a human must read every line an agent writes, the agent has not saved anyone time. The bottleneck just moved from writing code to reviewing it.

What works

The answer is a three-layer system.

Layer one: deterministic gates. Before any agent output reaches a human or production, it passes through automated checks. A regex catches secrets in the diff. A schema check validates the output shape. A scored eval measures quality against a baseline. These gates are not advisory - they block. If the gate fails, the output never reaches the next step. The same principle extends to the input side: guardrails check what enters a run - webhook payloads, manual triggers - before the first node executes, with observe, warn, block, or redact actions. A block is terminal.

Layer two: audit with evidence. Every gate decision is recorded alongside the output it evaluated. When a human reviews a gate failure, they see the evidence, not just a red flag. "Output contained a string matching -----BEGIN RSA PRIVATE KEY-----" is actionable. "Gate failed" is not.

Layer three: evidence-based autonomy. Over time, gates that never fire can be set to auto-pass. The agent earns autonomy by producing outputs that consistently pass every check. You do not guess when the agent is ready - the data tells you.

How Modulo handles this

Modulo's eval engine runs gates on every agent output before anything moves. The gate configuration is part of the pipeline definition, so it is versioned, reviewed, and auditable alongside the pipeline itself. When a gate fires, the run pauses for human review with the gate evidence attached. When a gate never fires, you can raise the autonomy level with confidence.

The principles behind this: deterministic gates catch failures before they reach a human reviewer, and audit as a first-class output means the history you inspect is exactly what happened.