Skip to main content
Different feature from the Run-State Journal. This page is about context replay — recording a run’s trace and stepping through it in a debugger. The run-state journal is about resumable execution — persisting the per-event cursor so a crashed run continues without re-executing tools. Pick the run-state journal for crash-safe production runs; pick context replay to inspect a completed run for debugging.
The user saves a trace during a run, then steps through recorded context events to debug handoffs and tools. Record agent context events during a run, then step through them interactively to debug handoffs, tool calls, and token growth.

Quick Start

1

Simple Usage

Save a trace during a recipe or workflow run:
2

With Configuration

Emit traces from Python and persist to disk:

How It Works

Traces are stored as JSONL in ~/.praisonai/traces/.

CLI Commands

Interactive navigation

In replay context: Enter/n next, p previous, g <N> go to event, q quit.

Filters


Common Patterns

In-memory trace during tests

Read traces programmatically

Cleanup old traces


Best Practices

Include a timestamp or task identifier so traces are easy to find in replay list.
redact=True (default) strips sensitive data from persisted traces.
Full CONTEXT_SNAPSHOT events can be large — prefer message and tool events for routine debugging.
Use replay cleanup --max-age 7 so trace storage does not grow unbounded on developer machines.

Run History

Inspect past agent runs and session metadata

Observability Hooks

Emit structured events for external observability tools