> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decimal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Replay & Experiments

> Re-run historical traces against a new manifest, and run controlled A/B comparisons between variants.

**Replay** re-runs historical traces against a new manifest: pick a set of inputs, create one batch against a target manifest, and aggregate the raw outputs. The four functions below are the Python SDK's replay surface.

There is no `experiment()` function in the Python SDK, and the generic `/api/v1/experiments` endpoints have been removed. To compare two variants on the same inputs, use the skill **Benchmark** (with-skill vs without-skill) and **Versions diff** surfaces — see [skillevaluation](/guides/skillevaluation).

See the [Replay guide](/guides/replay) for when to use which.

***

## `decimalai.get_replay_prompts()`

Download prompts that need to be re-run after a manifest change.

```python theme={null}
result = decimalai.get_replay_prompts("my-agent")

print(f"Total stale prompts: {result['total']}")
for prompt in result["prompts"]:
    print(f"  Trace {prompt['trace_id']}: {prompt['user_input'][:80]}...")
```

<ParamField path="agent_name" type="str" required>
  Agent name to get replay prompts for.
</ParamField>

<ParamField path="verdict" type="str" default="replay + drop">
  Filter by **compatibility verdict** — what to do with the trace: `"keep"`, `"repair"`, `"replay"`, or `"drop"`. (This is the keep/repair/replay/drop axis, not the eval pass/fail axis.)
</ParamField>

<ParamField path="limit" type="int" default="500">
  Maximum number of prompts (max 5000).
</ParamField>

***

## `decimalai.create_replay_batch()`

Create a batch of replay tasks.

```python theme={null}
batch = decimalai.create_replay_batch(
    source_manifest_id="mfst_old",
    target_manifest_id="mfst_new",
    trace_ids=["trace_1", "trace_2", "trace_3"],
)
print(f"Batch {batch['batch_id']}: {batch['total_tasks']} tasks")
```

***

## `decimalai.get_replay_batch()`

Check replay batch progress.

```python theme={null}
batch = decimalai.get_replay_batch("batch_abc")
print(f"Status: {batch['batch_status']}")
print(f"Progress: {batch['completed']}/{batch['total']}")
```

***

## `decimalai.submit_replay_result()`

Submit the result of a replayed trace.

```python theme={null}
decimalai.submit_replay_result(
    task_id="task_xyz",
    replayed_trace_id="new_trace_id",
    eval_score=0.95,
    eval_verdict="pass",  # eval pass/fail — NOT the keep/repair/replay/drop verdict
)
```

***

## A/B comparison (not in the SDK)

There is no `decimalai.experiment()` function, and the generic `/api/v1/experiments` endpoints have been removed. To compare two variants on the same inputs, use the skill **Benchmark** (with-skill vs without-skill) and the **Versions diff** surfaces — see [skillevaluation](/guides/skillevaluation) and the [Replay guide](/guides/replay).

***

## What's next

<CardGroup cols={2}>
  <Card title="Datasets" icon="database" href="/sdk/python/datasets">
    Export replay results as JSONL or push to HuggingFace.
  </Card>

  <Card title="Replay guide" icon="book" href="/guides/replay">
    When to replay vs. when to repair — conceptual model.
  </Card>
</CardGroup>
