Replay View

Watch an agent run live in the browser, or replay a finished one

praisonai replay view opens a local browser page that follows your agents as they run, or replays a run you recorded earlier.

python
from praisonaiagents import Agent
from praisonai.replay import record

with record(live=True) as rec:
    Agent(name="writer", instructions="Draft a short blog post").start("AI agents")

print(f"praisonai replay view {rec.run_id}")
Diagram

Replay View

🤖 Agent run

💾 run-xxx.jsonl

📺 Replay UI

🌐 Browser

Quick Start

  1. Install the UI
    bash
    pip install "praisonai[ui]"
  2. Run a YAML and watch it live
    bash
    praisonai replay view agents.yaml

    The YAML runs in the background, is recorded, and the browser follows it as it happens.

  3. Replay a finished run
    bash
    praisonai replay list
    praisonai replay view run-1a2b3c4d5e6f

How It Works

Diagram
BrowserReplay UIYAML runpraisonai replay viewYouBrowserReplay UIYAML runpraisonai replay viewYoureplay view agents.yamlrun + record livestart on 127.0.0.1:8090open /events appended to tracetimeline + map update
TargetWhat happens
(none)Opens the list of recent runs
run-1a2b3c4d5e6fReplays that run
./traces/run-1a2b3c4d5e6f.jsonlReplays a trace file from any folder
agents.yamlRuns it, records it, and follows it live

Options

OptionDefaultDescription
TARGETrecent runsRun id, trace .jsonl path, or a YAML file to run and watch
--livefalseFollow the run as it is written (implied for a YAML file)
--port, -p8090Port for the replay UI
--host127.0.0.1Host to bind to
bash
praisonai replay view run-1a2b3c4d5e6f --port 9000
praisonai replay view run-1a2b3c4d5e6f --live

The viewer reads traces from the same place recording writes them — see Where Traces Live.


Best Practices

Record with live=True to follow from Python

record(live=True) writes every event immediately, so praisonai replay view RUN --live shows it as it happens.

Keep the default host

Stay on 127.0.0.1 and share a self-contained HTML export instead of exposing the server.


Related