How It Works
DecimalAI never runs your agent. You do, on your own infrastructure:- Pull the inputs. By default, these come from traces with a
replayordropverdict. - Run your agent on each one, with tracing on, so each run records a new trace.
- Link or submit each new trace. DecimalAI scores it against the original.
When to Replay
Repair vs Replay: For a schema change such as a renamed parameter, Repair rewrites stored data and costs nothing. Use replay when the agent’s behavior changed.
In the Dashboard
Select your agent, then open More → Replay, which opens Regression checks with its Replay section expanded. The dashboard shows and exports replays. To run one, use the calls below.- Export Prompts downloads the inputs as JSONL.
- Replay Batches lists each batch with its status and counts. Open one to see its tasks.
- Prepare SDK replay, on Code changes, opens this section for one version pair, with Export prompts for this pair and Copy scoped setup.
SDK
replay.run() does the whole loop. Your function takes an input string, and its runs must be traced under this agent name:
get_prompts() and connect each new trace with link():
replay.run_sessions() and get_sessions() do this for conversations, passing earlier turns as history.
To work from a list of traces, create a batch. These calls return plain dicts:
batch_id when created but id when read back. A prompt’s text is user_input, and a task’s is task_input["user_input"].
decimalai replay run BATCH_ID --agent-fn my_app.agent:run runs a batch’s pending tasks, and --dry-run previews them. It can’t create a batch. See Runs and data.
REST
Pass both manifest IDs to
export to get the verdicts your policy set for that pair. Without them, export, get_prompts() and replay.run() read each trace’s agent-wide status, which can differ.
replayability is a hint from the input’s text: not_replayable for no input or a mention of uploads or files, partially_replayable for words like “today”, otherwise fully_replayable. decimalai replay run skips a task only when it has no input.
What Happens After Replay
Each new trace is a normal trace you can read. DecimalAI also scores it against the original, with four checks:completion: the run ended with statussuccess.output_format: it has an output and no error.tool_compliance: it used only expected tools. Replay sets no expected list, so this passes.similarity: it used the same set of tools, with 0.3 to 3 times as many LLM calls.
fail. Otherwise a score of 0.75 or more is pass, 0.5 or more is review, and anything lower is fail. Batch progress counts these as equivalent and regressed.
These checks compare how the run went, not what it said. To judge the answer, use evaluators.
DPO Pair Generation
A replay can become training data for preference-based fine-tuning (DPO). On a completed batch, choose Export DPO Pairs, or call the route:chosen. A score of 0.4 or less makes the original chosen. Anything between is skipped. Set the margin with score_threshold (default 0.1).
Batches filled by link() or replay.run() stay in_progress, so the button doesn’t appear for them. Use the route.
Next Steps
Datasets
Fine-tuning and datasets.
Manifests
How a change marks traces.