Skip to main content
A2UI lets agents send declarative JSON UI specs that clients render with trusted component catalogues — integrate via the optional a2ui-agent-sdk package.
The user sends a chat message; the agent may respond with A2UI JSON for the client to render.
Install the optional extra: pip install praisonaiagents[a2ui]
For most web apps, structured output or AG-UI is simpler. Use A2UI when you need a portable UI spec across React, Flutter, Lit, and other renderers.

Quick Start

1

Add A2UI to an agent

2

Build prompts with the facade API

Generative UI Flow

  1. get_schema_manager() — load JSON schemas and catalog
  2. generate_a2ui_system_prompt() — inject schema into instructions
  3. Agent returns A2UI JSON via tool or structured output
  4. parse_a2ui_response() — validate and split text vs UI parts
  5. External renderer draws the UI

Tool Input Shapes

send_a2ui_messages accepts:

Best Practices

Generative UI covers most CopilotKit and structured-output cases with less setup.
Catch schema errors server-side before the renderer receives invalid JSON.
Wrap payloads with create_a2ui_part() for application/json+a2ui compatibility.

Generative UI

Tiered UI options overview

Integrate A2UI Frontend

Connect any UI framework