Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions src/pages/docs/simulation/concepts/replay.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: "Replay"
description: "Reproduce a real production bug as a test, instead of guessing at a synthetic one"
---

## What replay is

**Replay** takes a real production conversation from [Observe](/docs/observe) and turns it into a scenario you can rerun against a dev agent. Say a caller got quoted the wrong refund window last week: you pick that exact conversation, generate a scenario from its transcript, and run it against your fixed agent to confirm it now gets it right. Instead of guessing at a synthetic case, you reproduce the real one.

## Session replay and trace replay

You choose how much of the production data becomes one conversation.

### Session

A whole session, every trace under one `session_id` in order, replays as a single multi-turn conversation. Reach for it when you want to rerun full production conversations end to end.

### Trace

Each selected trace replays as its own one-turn conversation, an input and an output. Reach for it when you want to replay individual calls or single-turn interactions.

## Chat and voice

Replay works in both channels. **Chat replay** rebuilds the conversation from the production transcripts. **Voice replay** goes further: it pulls the original voice setup (system prompt, assistant settings, and provider config) from the production call, so the replayed call runs on the same configuration as the original. Voice replay supports **Vapi** as the primary provider, with **Retell** supported for transcript comparison.

<Mermaid chart={`
%%{init: {"flowchart": {"curve": "linear"}}}%%
flowchart LR
O["Production traces<br/>in Observe"] --> RS["Replay session"]
RS --> SC["Generated scenario"]
SC --> RUN["Simulation run"]
RUN --> CMP["Compare with the original"]
`} />

Once the run finishes, you compare the replayed conversation with the original side by side, transcripts, metrics, and for voice the audio, so you can see exactly what your change moved.

## Replay closes the loop

A production failure that only happened once can slip away. Save its replayed scenario into your regular runs and it becomes a permanent regression test: the exact conversation that broke is now something every future version has to pass.

## Keep exploring

<CardGroup cols={2}>
<Card title="Scenarios" icon="list-check" href="/docs/simulation/concepts/scenarios">
The scenario replay generates from a call
</Card>
<Card title="Agent definitions & versions" icon="robot" href="/docs/simulation/concepts/agent-definitions">
The agent definition replay recreates
</Card>
</CardGroup>