Test your voice agent
Guardrails vs evals: what's the difference for voice agents?

Guardrails and evals both live under the banner of "keeping the agent safe and good," and that shared banner hides a fundamental difference in what they do. One acts in the moment, on a live call, to stop something bad. The other measures, usually before release, to tell you how the agent behaves. Confusing them leads teams to lean on one and assume they are covered — an eval that never prevents a live failure, or a guardrail that never tells you how often the agent misbehaves. Evalgent focuses on the evaluation side, and this guide draws the line.
Guardrails: runtime controls that prevent a voice agent from doing something harmful or off-policy during a live call.
Evals (evaluation): measurement of how well a voice agent performs, used to catch problems before release and to track quality over time.
Guardrails vs evals: the core difference
The clearest split is when each acts and what it does. A guardrail acts during the call and intervenes. An eval acts in testing and measures.
| Dimension | Guardrails | Evals |
|---|---|---|
| When | Live, during the call | Before release, and over time |
| What it does | Prevents a bad action | Measures how good the agent is |
| Mode | Intervention | Measurement |
| Output | A block, refusal, or redaction | A score or metric |
| Example | Block an unauthorized refund | "Unauthorized refunds happen 3% of the time" |
A guardrail is a runtime rule: if the agent is about to reveal data, take an unauthorized action, or go off-policy, the guardrail stops it right then. An eval is a measurement: it runs the agent against scenarios and reports how often it does the right thing. One prevents; the other quantifies.
How they work together
Guardrails and evals are complements, not alternatives — think crash test and seatbelt. Evals are the crash test: you run the agent through many scenarios before release and measure where it fails. Guardrails are the seatbelt: they sit in the live system and stop harm when something goes wrong on a real call.
The two feed each other. Evals reveal the failure modes worth guarding against — you cannot write a good guardrail for a problem you have not measured. And guardrails need evaluating too: a guardrail that blocks legitimate actions or misses the ones it should catch is itself a failure an eval can surface. So you evaluate to find what needs a guardrail, add the guardrail, and evaluate again to confirm it works. This is the loop at the heart of eval-driven development, and it builds on the distinction in our testing vs evaluation guide.
Why you need both
The reason one cannot replace the other is that each has a blind spot the other covers. Evals cannot stop a live bad call — they run before or after the fact, so a caller on the phone right now is not protected by an eval score. Guardrails cannot tell you your overall quality — they block individual events without measuring how often the agent misbehaves or whether it is improving.
Rely only on evals and a failure that slips past testing reaches a real caller with nothing to stop it. Rely only on guardrails and you have no idea how good the agent actually is, or whether a change made it better or worse — you are blocking symptoms blind. The safe design is both: evals to measure and catch problems before release, and guardrails to prevent the ones that get through, live. Guardrails are especially important for security and safety cases, the concern of our prompt injection and hallucinations guides.
How to use guardrails and evals together
Run the loop deliberately, using each for what it is good at.
1. Evaluate to find failure modes — Run scenarios and measure where the agent goes wrong, and how often.
2. Guard the must-never cases — Add runtime guardrails for the failures that are unacceptable even once.
3. Evaluate the guardrails — Test that they block what they should and do not block what they should not.
4. Gate releases on evals — Use evaluation thresholds to decide whether a change is safe to ship.
5. Keep guardrails live — Rely on them in production to stop the rare failure that slips past evals.
6. Close the loop — Feed new production failures back into evals, and add guardrails as needed.
A worked example
An agent is meant to escalate refund requests to a human, never issue them itself. An evaluation across scenarios reveals that under certain phrasing the agent issues an unauthorized refund about 3% of the time — a measurement you could not get from a guardrail. Because that action is unacceptable even once, you add a guardrail that blocks the refund tool at runtime and forces escalation. Now the eval quantifies the risk and drives the fix, and the guardrail prevents the 3% from ever reaching a real caller. Measure with the eval, prevent with the guardrail — two jobs, one problem.
Guardrails, evals, and Evalgent
Evalgent is the evaluation half of this picture, and it makes guardrails better. Scenarios drive the calls that reveal failure modes — including the unsafe and adversarial ones you will want to guard against. Metrics measure how often each failure occurs, so you know which cases deserve a runtime guardrail and which are rare enough to monitor. Evaluations run the suite as automated batches before release, turning "the agent seems safe" into a number you can gate on. And because guardrails themselves need testing, Evalgent evaluates whether a guardrail blocks the right cases without breaking legitimate ones. Reviews let you replay a failing call to see exactly what a guardrail would need to catch.
The result is the full safety loop: evaluation to measure and catch problems before release, informing the guardrails that prevent the rest live. For the wider discipline, see the AI voice agent testing pillar.
The bottom line
Guardrails prevent a voice agent from doing something bad during a live call; evals measure how well the agent performs before release and over time. Guardrails intervene in the moment; evals quantify and catch problems early.
Neither replaces the other. Evals without guardrails leave live failures unstopped; guardrails without evals leave you blind to quality. Use both — evaluate to find and gate, guardrail to prevent what slips through.
Frequently asked questions
What is the difference between guardrails and evals?
Guardrails are runtime controls that prevent a voice agent from doing something harmful during a live call — blocking an action, refusing a topic, or redacting data. Evals measure how well the agent performs, before release and over time, producing scores rather than interventions. Guardrails act in the moment to prevent harm; evals measure quality to catch problems early. They do different jobs.
Do guardrails replace evaluation?
No. A guardrail blocks individual bad events at runtime but tells you nothing about how good the agent is overall or whether it is improving. Evaluation measures that. Relying only on guardrails means blocking symptoms blind, with no visibility into quality or regressions. Guardrails and evals cover each other's blind spots, so you need both rather than one instead of the other.
What are guardrails in a voice agent?
Guardrails are runtime rules that stop a voice agent from doing something harmful or off-policy during a live call. Examples include blocking an unauthorized action like issuing a refund, refusing an out-of-scope or unsafe request, redacting sensitive data before it is spoken or logged, and forcing escalation. They intervene in the moment, preventing a specific bad outcome on the current call.
What are evals for a voice agent?
Evals, short for evaluation, are measurements of how well a voice agent performs. They run the agent against scenarios and score outcomes like task completion, accuracy, safety, and policy adherence. Evals are used before release to catch problems and gate changes, and over time to track quality. Unlike guardrails, they measure rather than intervene, and run in testing rather than live.
Why do you need both guardrails and evals?
Because each has a blind spot the other covers. Evals cannot stop a live bad call — they run before or after, so a caller right now is not protected by a score. Guardrails cannot tell you overall quality or whether a change helped. Together, evals measure and catch problems before release, and guardrails prevent the ones that slip through, live.
How do guardrails and evals work together?
Evaluate first to find the failure modes and measure how often they happen. Add guardrails for the cases that must never occur, even once. Then evaluate the guardrails to confirm they block the right cases without breaking legitimate ones, and gate releases on the eval results. Feed new production failures back into evals, adding guardrails as needed. It is a loop.
Can a guardrail be wrong?
Yes. A guardrail can be too strict and block legitimate actions, or too loose and miss the cases it should catch. Both are failures, and both are exactly what evaluation surfaces. That is why guardrails themselves need evaluating: you test whether the guardrail intervenes on the right cases and stays out of the way on the rest, treating it as behavior to measure.
Are guardrails part of testing?
Not exactly. Guardrails are a runtime safety mechanism, while testing and evaluation measure behavior before release. But they connect: evaluation finds the failures that justify a guardrail, and it also tests whether a guardrail works. So guardrails are not testing themselves, yet they are shaped by testing and should be evaluated like any other part of the agent's behavior.
Related guides
Testing vs evaluation for voice agents: what's the difference?
Testing and evaluation for voice agents are related but distinct: testing verifies behavior pass/fail, evaluation measures quality. Here's how they differ.
VAD vs endpointing: what's the difference in a voice agent?
VAD detects whether someone is speaking; endpointing decides when they've finished. Learn the difference and why confusing them cuts callers off.