Documentation Index
Fetch the complete documentation index at: https://reagent-ai.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Golden baselines are snapshot tests for agent behavior. Record a known-good trace, then assert future runs match — catching behavioral regressions from prompt tweaks, model upgrades, or code changes.Recording a baseline
Setgolden=True to save the trace as the expected behavior:
.reagent/golden/refund-flow.trace.json.
Asserting against a baseline
Ignoring noisy fields
Some fields change between runs without indicating a regression (timestamps, request IDs, etc.). Useignore_fields to skip them:
Supported ignore patterns
| Pattern | What it ignores |
|---|---|
"arguments" | All tool call arguments |
"results" | All tool results |
"response_text" | All LLM text responses |
"tool_name.arg_key" | A specific argument of a specific tool |
Storage layout
Updating baselines
When behavior should change (new feature, improved prompt), re-record the golden:--reagent-update flag re-records all golden baselines in a single test run.
How the diff works
The diff engine compares traces positionally — turn 0 vs turn 0, turn 1 vs turn 1:- All tool calls in each turn are compared (not just the first)
- Tool results are compared by position in the results list
call_idis ignored (it’s a random UUID that changes every run)ignore_fieldsis applied to every comparison
Golden baseline diffs are designed for deterministic test fixtures, not live LLM output. Use
ignore_fields to handle expected variation.