Simulated customers, tool-call checks and an AI judge: Inside Evals
You change one line in an agent's instructions. Did the booking flow just break? Is it still asking for the unit before the issue? Does it still never read a phone number aloud?
Until recently, the honest answer was to run through the test script by hand and judge every reply ourselves. That works for one agent. It doesn't scale to every agent we build, every time one changes. So we built Evals: a framework that tests our AI agents the way customers use them, in real conversations, against our rules.
Here's how it works, why it checks what an agent does and not just what it says, and what we're validating next.
Evals is our testing framework for AI agents. It plays a conversation against the real agent, reads back everything the agent said and did, and checks it against your rules, so you know an agent works before a customer finds out it doesn’t.
What it can do
- Plays real conversations: fixed messages, or an AI customer that answers whatever the agent asks
- Tests the real agent: a single agent, a team of agents or a workflow, with tool calls kept in a sandbox
- Checks what it says and does: “The agent should…” for judgment calls, “Call a tool” for actions, “Say / never say” for exact words
- Explains every result: each check passes or fails with a reason and the evidence behind it
- Two kinds of suites: test suites before a release, live suites on real conversations after they end
- Turns failures into tests: a failed live conversation becomes a replayable test in one click
- One small change to an agent can quietly break a flow, and a customer is usually the first to notice.
- Evals replaces hand-run test scripts with a framework that can test any agent built on our studio.
- Checks cover what the agent says and what it actually does, down to every tool call.
- Test suites guard every release. Live suites check real conversations once they end.
- Next, we're checking that simulated customers hold up against real conversations.
Why a polite reply proves nothing
An agent's reply can sound right while the system behind it does the wrong thing. The customer hears a friendly confirmation. Meanwhile, the service request has gone in for the wrong date. Reading the transcript won't catch it, because the mistake isn't in the transcript.
And agents change all the time. Every prompt edit, model upgrade, new tool or change in the data underneath is a chance to break something that used to work. Re-running a script by hand and grading each reply after every change doesn't keep up. So the replacement had to:
- Play the conversation the way a customer would have it
- Check what the agent did, not only what it said
- Explain every result, with the evidence behind it
- Run again, the same way, after every change
- Work for any agent built on our studio, not just one
That became the brief. We built Evals as a general framework from the start, rather than a test harness for a single agent.
Testing the conversation, not a fixed script
Every eval starts with the customer's side of the conversation. It can be written in two ways:
- Fixed messages: The same words, sent in order, every time. Simple and exact, and best for guarding a known path.
- An AI customer: A short brief describing who they are, what they know, what they want and when they’re done, with an AI playing the part. It can be polite or impatient, brief or chatty. Best for hard scenarios, and for finding what nobody thought to script.
Fixed messages are predictable, but real agents don't ask their questions in a fixed order. An AI customer answers whatever the agent actually asks, in whatever order it asks. It reveals facts only when asked, sticks to its refusals and hangs up when its goal is met. That lets us test the conversation itself, not whether the agent happened to follow our script.
Running every test through the customer's path
A test only counts if it exercises what customers actually reach. So Evals doesn't talk to a stripped-down copy. It plays the conversation against the real agent, team or workflow, through the same path a customer conversation takes. The only difference is where the actions land: when an agent calls a tool during a simulation, it runs in a sandbox, so a test booking never becomes a real service request.
Then it reads back everything that happened:
- Every reply
- Every tool call, with its arguments and what it returned
- Every agent involved, across teams and delegations
- Every step of a multi-step workflow
Because Evals reads the same run traces we use to debug, a result is always backed by what really happened. When several agents share a conversation, a check can see which agent did what.
Three ways to say what good looks like
Some rules are easy to write down exactly. Others are judgment calls. So we built three kinds of checks:
- “The agent should…”, for what’s hard to write as a rule. State a criterion in plain words, such as “shows empathy, then asks only for the unit number”. An AI judge reads the whole conversation, scores how well the criterion holds, explains the score and quotes its evidence. A check passes when its score clears the pass mark.
- “Call a tool”, for proof of what the agent did. Which tool, with which inputs, what it returned and how many times. No AI is involved, so the result is the same on every run. For example, a service request created for the right unit, for tomorrow morning.
- “Say / never say”, for the agent’s exact words. Phrases it must include and phrases it must never use, in any reply or in every reply. For example, never saying “transfer you to a human”, and always quoting the request number.
A check can be aimed at the first reply, the last reply, any turn in between, or the whole conversation. Only AI-judged checks give a score. “Call a tool” and “Say / never say” are exact, so they simply pass or fail. For a judgment call, a score is more useful than a yes or no: it shows how close the agent came, not just which side of the line it landed.
The judge sees everything: what each agent was asked, which tools it called with which inputs, what the tools returned and what each agent answered, in order. That makes it possible to check teams of agents and the handoffs between them, not just the final reply.
- Acknowledges the issuePolite
- Confirms a visitSounds right
- Booking dateNot visible
- Service requestCreated
- Times calledExactly once
- Preferred slotTomorrow
That gap is why “Call a tool” checks exist. A friendly sentence can talk its way past a reader. It can't talk its way past a check on what the system actually did.
What one eval looks like
Take a simple case. A customer reports that the AC in their villa isn't cooling, then asks whether someone can come tomorrow. Three checks run against the conversation:
- An AI-judged check that the agent acknowledges the problem and asks at most one question
- A “Call a tool” check that the unit is saved in the right villa format, exactly once
- A “Say / never say” check that the agent never says “transferring to a human”
# the customer's side of the conversation
case: "AC not cooling"
customer:
- "Hi, the AC in Villa <n> is not cooling."
- "Can someone come tomorrow?"
# what good looks like
checks:
agent_should: "Acknowledges the problem and asks at most one question"
call_a_tool: create_service_request(unit ~ "Villa \d+"), exactly once
never_say: "transferring to a human"In this example, all three pass. Every result links back to the exact turn, tool call and reply behind it, so a pass is something you can inspect, not just a green tick.
Making every result mean the same thing
A test is only as good as its consistency. If the same conversation can pass today and fail tomorrow for no real reason, nobody trusts the result. That's harder for some checks than others:
- Exact checks always agree with themselves. “Call a tool” and “Say / never say” involve no AI, so they give the same result every time they run on the same conversation.
- Judged checks can drift a little. A judge model can score the same conversation slightly differently from one run to the next. Our plan is to run judged checks several times and average the scores, so one noisy run can't flip a result.
- Dates are worked out in your timezone. "Tomorrow", "next Monday" and "today" resolve to real dates on the day the eval runs, so a booking check knows the right date whenever you run it.
- The judge stays the same. AI-judged checks use a fixed default judge model, so scores stay comparable from one run to the next.
- Trends, not verdicts. An AI judge can occasionally be wrong, so judged results are best used to spot trends and flag conversations for a person to review.
On top of that, every check passes or fails with a reason and the evidence it rests on, so nobody has to take a score on faith.
Watching real conversations after they end
A test suite only covers the situations someone thought to write down. So Evals groups cases into two kinds of suites:
- Test suites, before release. Made-up conversations replayed against the agent on demand, like automated tests for software, to catch regressions before a change goes live.
- Live suites, in production. Checks that run automatically on real customer conversations after they end.
A live suite holds the general rules every good conversation should follow:
- Never asks for the same information twice
- Is honest when something fails
- Never leaks internal errors
- Ends with a clear outcome
Instead of someone reading transcripts, the team sees pass rates by rule and a list of failed conversations to review, each with the reason it failed. You choose which agents to watch and what share of conversations to check, which keeps the cost under control. The checking happens in the background, so customers never wait, and it never blocks or changes a reply in real time. That’s the job of guardrails, not evals.
Every failure becomes a test
This is where the two suites meet. From any failed live conversation, one click on Save as test case turns the customer’s real messages into a replayable test, with the rule that failed attached. The loop runs like this:
- Test suites pass against the new version
- The change goes live
- Real customers talk to the agent
- Live suite rules check each conversation after it ends
- A failed conversation shows up for review, with the reason
- One click saves it as a test case
The next release is tested against the exact situation that went wrong, so the same failure doesn’t slip through twice.
What we're validating next
Now that Evals is running, the most important work is proving the simulations hold up. A simulated customer is only useful if it behaves like a real one, so the plan is straightforward:
- Run our eval scripts against real conversations as they come in
- Check whether the simulated customers cover most of what real customers actually do
- Iterate on the simulations wherever they fall short
We also want the people closest to each deployment to write the tests. Our forward-deployed engineers know each customer's service desk best, so they'll write the eval cases. And evals will most likely run automatically on every change, so nobody has to remember to start them.
Turning the rulebook into tests
Getting an agent to say the right thing once was never the hard part. Knowing it still does, after every change, is. Evals is built to make that a routine:
- Replace hand-run scripts with tests that run the same way every time
- Turn a service desk script into checks
- Catch the mistakes a polite reply hides
- Back every result with a trace of what really happened
- Turn every production failure into a test
None of it needs code. The conversation and the checks are written in plain words, and patterns are there only for the rules that need to be exact.
Know your agents work before your customers do.
Written by Anand Hariharan, with the Facilio engineering team.
More from Facilio
