Files
MervinPraisonandClaude Opus 5.5 faba52b940 feat(replay): watch() / replay_app(): a Run button that draws each run live, and embedding
- praisonai.replay.watch(target): serves a page with a Run button; each click
  records the Agent/AgentTeam/AgentFlow/YAML/callable under a new run id and the
  page draws it live (map: not reached / running / done). A team's tasks start
  afresh each run (AgentTeam otherwise skips completed tasks).
- praisonai.replay.replay_app(target=None): the same page as an ASGI app to mount
  in your own FastAPI/Starlette app; /replay/?run=<id> shows one run (iframe).
- CLI: praisonai replay watch [agents.yaml] ("show" was taken).
- examples/replay: watch_flow.py (no key), watch_team.py, embed_fastapi.py.

Needs aiui with create_replay_app (MervinPraison/PraisonAIUI#317); older aiui
gets a clear "pip install -U praisonai[ui]" error and the tests skip.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-26 15:47:17 +00:00
..
2025-12-31 14:05:30 +00:00
2026-01-09 10:51:46 +00:00
2025-12-26 04:23:51 +00:00
2026-01-08 21:52:44 +00:00
2026-01-08 19:55:06 +00:00
2026-01-09 10:51:46 +00:00
2026-01-08 21:52:44 +00:00
u
2026-03-03 13:12:44 +00:00
2026-01-08 10:33:27 +00:00
2026-01-09 15:02:31 +00:00
2026-01-08 19:55:06 +00:00
2026-01-25 00:36:03 +00:00
2026-01-16 06:33:39 +00:00
2026-01-09 10:51:46 +00:00
2026-01-31 08:34:24 +00:00
2025-12-29 17:28:44 +00:00
2026-01-16 06:33:39 +00:00
2026-01-08 19:55:06 +00:00
2025-12-29 12:19:58 +00:00
2025-12-22 08:50:02 +00:00
2025-12-29 12:19:58 +00:00
2026-01-08 19:55:06 +00:00
2026-01-26 08:08:18 +00:00
2026-01-10 09:08:53 +00:00
2026-01-20 06:59:26 +00:00

PraisonAI Examples

This folder contains examples for PraisonAI. For detailed documentation, visit docs.praison.ai.

Structure

examples/
├── python/           # Python examples
│   ├── agents/       # Agent examples (single, multi, router, etc.)
│   ├── workflows/    # Workflow patterns (routing, parallel, loop)
│   ├── tools/        # Custom tools examples
│   ├── mcp/          # MCP protocol examples
│   ├── memory/       # Memory and sessions
│   ├── code/         # Code editing and external CLI tools
│   └── ...
├── serve/            # Server and endpoints examples
├── yaml/             # YAML workflow examples
└── cookbooks/        # Complete use-case examples
Category Examples Docs
Consolidated Params consolidated_params/ 📖
Agents python/agents/ 📖
Workflows python/workflows/ 📖
Model Router python/agents/router-agent-cost-optimization.py 📖
MCP python/mcp/ 📖
Memory python/memory/ 📖
Tools python/tools/ 📖
Code python/code/ 📖
YAML yaml/ 📖
Doctor doctor/ 📖
Serve serve/ 📖
Endpoints serve/ 📖

Consolidated Params Examples

Agent-centric API with unified parameter resolution. Precedence: Instance > Config > Array > Dict > String > Bool > Default

Example Description
basic_agent.py Minimal agent with memory
basic_agents.py Multi-agent with memory+planning
basic_workflow.py Workflow with consolidated params
basic_memory.py Memory presets (file, redis, postgres)
basic_guardrails.py Guardrails with callable or config
basic_workflow_agentlike.py Workflow with agent-like params
basic_step_override.py Step-level override of workflow defaults
advanced_workflow_full_features.py All consolidated params

Serve Examples

Example Description CLI Command
unified_server.py All providers in one server praisonai serve unified
agent_as_api_single.py Single agent HTTP API praisonai serve agents
agents_as_api_router.py Multi-agent router API praisonai serve agents
a2a_server_client.py A2A protocol server praisonai serve a2a
a2u_events_stream.py A2U event stream praisonai serve a2u
mcp_http_server.py MCP HTTP server praisonai serve mcp
tools_as_mcp_server.py Tools as MCP server praisonai serve tools
agent_launch_modes.py Agent.launch() API Python only
endpoints_unified_client.py Unified client praisonai endpoints

Running Examples

# Install PraisonAI
pip install praisonai

# Set API key
export OPENAI_API_KEY=your_key_here

# Run an example
python examples/python/agents/single-agent.py

CLI Commands

See the main README.md for all CLI commands.