<iframe>.
Install the UI extra:
pip install -U "praisonai[ui]". The app examples below also need FastAPI: pip install fastapi. You need PraisonAI 4.7.19 or later, which brings PraisonAI UI (aiui) 0.3.148 or later. With an older aiui, watch() and replay_app() stop with an upgrade message.Quick Start
1
Watch a run with a Run button
2
Show progress inside your own app
How It Works
What the map shows:
Three Ways to Run It
- Python
- CLI
- YAML
Embed on Any Website
The view is a normal web page, so any site can show it in an<iframe>, even when it is not built with Python.
- HTML
- React
- Streamlit
- Gradio
fetch to /generate is cross-origin, so allow your site in your app’s CORS settings (for FastAPI, CORSMiddleware with allow_origins=["https://your-site.example"]). The iframe itself needs no CORS.Common Patterns
Put the Run button in your app
Pass your agent, team or flow toreplay_app() and the mounted page gets an input box and a Run button:
Agent keeps its chat history between runs.
Draw the view inside your own page
On a page served by the same app, load the view into any element instead of an iframe:Teach how agents work together
watch() is a quick way to show a class or a team how a multi-agent run flows. Press Run, then ▶ Play to go through it again. Use ← → to step, Timeline to see who worked when, and Why to see what each agent was given.
Best Practices
Keep it private by default
Keep it private by default
Anyone who can open the page can read the runs (prompts and outputs). With a Run button, they can also start new runs.
watch() listens on 127.0.0.1 only. In your app, mount replay_app() behind your own login. Protect /generate the same way, with login and a rate limit: anyone who can call it can start agent runs over and over.Use one run id per request
Use one run id per request
Create the
run_id yourself, pass it to record(), and return it to the page. The iframe can open /replay/?run=<id> straight away: it waits until the run starts.Record with live=True
Record with live=True
record(run_id, live=True) writes each step as soon as it happens. Without it, the view only fills in at the end of the run.Prefer the iframe for other sites
Prefer the iframe for other sites
The iframe works from any framework or domain. Use
render() only on pages served by the same app.Related
Replay
Record runs and step through them from the CLI
Integrating PraisonAI UI
Use PraisonAI UI as a full dashboard for your agents

