decimalai.evaluate() does that with order-support, and production keeps serving what it served before.
You need decimalai 0.26.0 or later (pip install -U "decimalai[openai-agents]"), the project and DECIMAL_API_KEY from Part 2, and the prompt versions from Part 3. evaluate() works with OpenAI Agents SDK agents.
1. Write the cases
A case is one question, as a JSON object on its own line.input is the question and id names the case in reports. Every other field is yours, for your checks to read: here, the order a case is about and the skill it needs (billing-dispute-resolution, account-deletion-verification-policy or diagnostic-triage-questions).
cases.jsonl
2. Write the checks
A check is a function that gets one run’s trace and returnsTrue (pass), False (fail) or None (doesn’t apply to this case, so it isn’t scored). trace.case is the case’s row, trace.tool_calls the tools the agent called, trace.skills_loaded the skills it loaded, and trace.output its reply.
measure.py
3. Run it on the served setup
billing-dispute-resolution included. The cases run four at a time. Example output (illustrative numbers):
6/6 counts only the cases a check applies to: two cases name no order, and two need no skill. A failed check is listed below the counts with its case and a link to the run’s trace.
4. Compare two setups
prompt_version= runs every case on a saved prompt version instead of the served one, and exclude_skills= leaves skills out: they aren’t listed, and load_skill refuses them. Neither changes what production serves. Add this to measure.py:
5. Find the runs
Every case is an ordinary traced run, so it shows on the agent’s Traces tab with your checks’ results attached. These runs are marked as evaluation runs and kept out of the agent’s Home, Versions and experiment numbers, so measuring doesn’t skew what they report about real traffic. Server-side evaluators you’ve added to the agent score them too; see Evaluations.evaluate() fails closed: if DecimalAI can’t give a run the setup it asked for (a prompt version or skill name the agent doesn’t have, no API key, an outage), it raises decimalai.EvaluationNotApplied rather than quietly running on the served setup.
What you built
Across the five parts,order-support went from a demo on a web page to an agent in your own code, with a prompt and skills from a template, one skill made your own, its runs traced, and a set of cases to check a change against. The code you wrote in Part 2 never changed.
- Evaluations: checks that run on production traffic, and LLM judges.
- Skills: how the agent’s skill list is chosen and served.
- OpenAI Agents SDK: the reference for everything in this tutorial.