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.
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
AGENT_END carries data["status"]: "completed", "failed" (the agent raised), or "cancelled". An unnamed agent (Agent(instructions=...)) uses node_id="agent:Agent", matching its id in to_graph(agent). Both sync (start/chat) and async (astart/achat) runs record LLM_REQUEST / LLM_RESPONSE.
Traces are stored as JSONL in ~/.praisonai/traces/.
Node IDs & Reused Steps
Every step gets a stablenode_id built from its name and position, so one handler reused at two positions shows up as two separate nodes.
node_id values never contain a UUID — they are identical across processes and runs, so they are safe to use as external identifiers in dashboards, alerts, or rerun targets.CLI Commands
Interactive navigation
Inreplay 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
Use meaningful session IDs
Use meaningful session IDs
Include a timestamp or task identifier so traces are easy to find in
replay list.Keep redaction enabled
Keep redaction enabled
redact=True (default) strips sensitive data from persisted traces.Use snapshots sparingly
Use snapshots sparingly
Full
CONTEXT_SNAPSHOT events can be large — prefer message and tool events for routine debugging.Run cleanup periodically
Run cleanup periodically
Use
replay cleanup --max-age 7 so trace storage does not grow unbounded on developer machines.Related
Run History
Inspect past agent runs and session metadata
Observability Hooks
Emit structured events for external observability tools

