Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Integrate A2UI with Your Frontend
Use this guide when building your own chat app, dashboard, or canvas — not only PraisonAIUI. PraisonAI core emits A2UI via the agent toolsend_a2ui_messages. Your frontend detects the payload and renders with Google A2UI renderers or a custom mapper.
Core SDK documents the contract (
A2UIToolResultProtocol). Detection helpers for rich UI live in PraisonAIUI a2ui_utils as the reference UI implementation — do not expect parsing logic in praisonaiagents core.Prerequisites
Four-step contract
1. Agent with the A2UI tool
2. Tool output shape (integrator contract)
send_a2ui_messages returns:
3. Detect in your UI (minimum)
a2ui_utils.py as a reference — copy or vendor that file in your UI layer.
4. Render and handle user actions
React (Google renderer):Transport options
| Transport | Entry point | A2UI delivery |
|---|---|---|
| Tool result JSON | Your WebSocket/SSE | Parse mime_type on TOOL_CALL_COMPLETED |
| AG-UI | AGUI(agent).get_router() → POST /agui | TOOL_CALL_RESULT (JSON string) + CUSTOM event name: "a2ui" |
| A2A | A2A(agent) → POST /a2a | create_a2ui_part() / is_a2ui_part() |
| PraisonAIUI | aiui run app.py | Reference impl — surfaces, canvas, chat preview |
AG-UI CUSTOM event
When a tool returns A2UI, the AG-UI bridge emits an additive event:TOOL_CALL_RESULT with stringified JSON is unchanged for backward compatibility.
Tiers (pick the simplest)
See Generative UI for the full tier list:| Tier | Use when |
|---|---|
| 0 | Markdown streaming only |
| 1 | Your frontend owns component mapping (output_pydantic) |
| 2 | CopilotKit / AG-UI client |
| 3 | Cross-platform A2UI catalog (this guide) |

