Skip to main content

PraisonAIUI 🦅

The Python-first UI for AI Agents — streaming chat, 81 UI blocks, 5-line interactive apps, human-in-the-loop approvals, and opt-in ops. Zero JavaScript.

Works with any Python AI stack — OpenAI, Anthropic, PraisonAI, LangGraph, CrewAI, PydanticAI, or plain Python functions.

CI PyPI PyPI Downloads Python License: MIT Docs


PraisonAIUI Chat and Canvas workspace showing streaming agent reasoning, tool approval, comparison table, and code artifact

Documentation · Quick Start · 81 UI Components · Migration Guides · Examples


Why PraisonAIUI?

Building an AI product in Python usually forces you to glue together a data-app tool, a chat demo wrapper, and a custom React frontend once you need streaming tools, approvals, or auth. PraisonAIUI gives you all of it in one pip install aiui:

Capability Typical Python UI tools PraisonAIUI (aiui)
Execution model Full-script reruns or single-widget demos Native WebSocket + SSE streaming, async yield actions, zero reruns
Agent UX out of the box Hand-rolled spinners and markdown dumps Streaming tokens, reasoning steps, tool cards, inline approvals & prompts, versioned artifacts canvas
Rich UI blocks Separate chat vs. dashboard widgets 81 Python UI builders — render the exact same blocks inline inside chat and on @aiui.page dashboards
Data & studio primitives Basic tables only Native pandas/Polars dataframe, plotly_chart, formula-backed editable sheet, whiteboard, file_upload, split-pane chat_panel
5-line interactive demos Separate library needed Built-in aiui.interface(fn, inputs=..., outputs=...) with live yield streaming
Production readiness Bolt-on auth and separate ops tools 48 built-in feature protocols, opt-in presets (minimal → agent → ops), deny-by-default auth, A2UI, AG-UI, MCP Connect

Quick start (30 seconds)

pip install aiui
aiui init --template agent    # or: openai, anthropic, langgraph, crewai, pydantic-ai, praisonai, dashboard, docs
aiui run app.py

Open http://localhost:8000. By default aiui run app.py launches in focused mode (--preset minimal: Chat + your own pages). Pass --preset agent for Sessions, Approvals, Usage, and Memory — or --preset ops for the full agent control plane.

1. Streaming agent chat with inline UI blocks

Render any of the 81 UI blocks — metrics, DataFrames, Plotly charts, alerts, cards, or forms — directly inside chat replies:

import praisonaiui as aiui

@aiui.reply
async def on_message(message: str):
    await aiui.think("Analyzing request...")
    await aiui.say(f"Here is the live snapshot for **{message}**:")
    await aiui.send_block(aiui.columns([
        aiui.metric("Latency", value="142 ms", delta="-18%"),
        aiui.metric("Success Rate", value="99.4%", delta="+0.3%"),
    ]))

2. 5-line interactive app (aiui.interface)

Wrap any Python function — sync, async, or streaming yield generator — into a clean interactive app with file uploads and typed controls:

import praisonaiui as aiui

async def summarize(text: str, tone: str = "Brief"):
    acc = ""
    for word in f"**{tone} summary:** {text[:160]}".split():
        acc = f"{acc} {word}".strip()
        yield acc

aiui.interface(
    summarize,
    inputs=["textarea", aiui.select_input("Tone", name="tone", options=["Brief", "Detailed"], value="Brief")],
    title="Summarizer",
)

3. Split-pane data + agent workspace (aiui.chat_panel)

Combine interactive charts, editable spreadsheets, or file uploads alongside an embedded agent chat on a single @aiui.page:

import praisonaiui as aiui

@aiui.page("workspace", title="Analyst Workspace", icon="layout-panel-left")
async def workspace():
    return aiui.layout([
        aiui.columns([
            aiui.card("Q4 Forecast", children=[
                aiui.sheet(columns=["Month", "Revenue", "Target"], rows=[["Oct", 42000, 40000], ["Nov", 48500, 45000]]),
            ]),
            aiui.chat_panel(title="Ask the Analyst", height="520px"),
        ])
    ])

Migrating from Streamlit, Gradio, or chat apps

Side-by-side cheat sheets with working code:


81 Python UI components

Every component works in @aiui.page(...), aiui.interface(...), and inline inside chat via aiui.send_block(...) — with zero frontend code:

Category Highlights
Layout & Navigation layout, card, columns, chat_panel, tabs, accordion, stepper, header, divider, breadcrumb, pagination, link, button_group
Data Display metric, table, dataframe (pandas/Polars), plotly_chart, chart, sheet (interactive formulas & on_save), whiteboard, board (Kanban), timeline, diff_viewer, tree_view, list_detail, definition_list, badge, avatar, gallery
Inputs & Forms form, filter_bar, file_upload (safe UUID attachments), text_input, textarea, number_input, select_input, multiselect_input, tag_input, slider_input, checkbox_input, switch_input, radio_input, segmented_control, date_input, time_input, color_picker, rating_input
Feedback & Overlays alert, callout, progress_bar, spinner, skeleton, empty_state, dialog, popover, tooltip
Media & Content text, markdown_text, doc_viewer, code_block, json_view, copy_field, image_display, audio_player, video_player

Explore interactive live previews for every component at ui.praison.ai/docs/components/overview and the complete Component API Reference.


Six selectable layouts & clean presets

Layouts shape the React app shell (style: app). Every layout is its own lazy chunk — only the active frame is downloaded. Pick one via aiui.set_layout("command"), YAML layout: command, AIUI_LAYOUT=command, or preview live with ?layout=<id>:

Layout ID Title Designed for
chat Chat Clean focused chat with sessions sidebar (aiui run default)
chat-canvas Chat and Canvas Chat beside a versioned side canvas for code, tables, and files (create_app() default)
workbench Quiet Workbench Calm sidebar with chats and focused workspace beside it
command Command Deck Keyboard-first command bar (⌘K), session tabs, and run inspector
guided Guided Studio Plain-language onboarding home, templates, and follow-up suggestions
mission Mission Control Operations view for agents, runs, spend, and approvals at a glance

Control how much UI shows with one flag:

  • aiui.set_pages("minimal") / --preset minimal — Chat + your own pages (clean default)
  • aiui.set_pages("agent") / --preset agent — Chat, Sessions, Approvals, Usage, Memory + your pages
  • aiui.set_pages("ops") / --preset ops — Full built-in ops plane (7 native React Pro pages — Overview, Sessions, Agents, Knowledge, Cron, Logs, Config — plus hosted views for Work Hub/Kanban, Replay, Training Lab, Code Studio, Guardrails, Eval, Traces, Security, and more)

Production protocols & 48 built-in feature APIs

Turn on only what you need — every feature is a modular plugin with a REST/SSE/WebSocket API and self-describing OpenAPI spec at /api/openapi.json:

See the complete 48-protocol Features REST API and Deployment & Security Guide.


Zero-code YAML chat & static docs sites

Run an agent from YAML (no Python required)

# chat.yaml (requires: pip install praisonai)
name: My Assistant
instructions: You are a helpful assistant.
model: gpt-4o-mini
welcome: "Hi! How can I help?"
starters:
  - label: What can you do?
    message: Tell me about your capabilities
datastore: json
aiui run chat.yaml

Build a documentation site from Markdown (aiui build)

The exact engine powering ui.praison.ai — light/dark themes, instant search (⌘K), OpenAPI viewer, Mermaid fullscreen zoom, SEO metadata, and llms.txt:

aiui init --template docs
aiui build          # outputs static site to ./aiui
aiui serve          # live preview at http://localhost:8000

Extending with @aiui/sdk plugins

I want to… Use
Add a Python page or streaming action @aiui.page(...) + @aiui.register_page_action(...)
Ship a custom React page, block, tool renderer, or layout A pip-installable UI plugin (praisonaiui.plugins entry point + @aiui/sdk)
Brand the app aiui.set_branding(title=..., logo=...), aiui.set_theme(...), aiui.set_brand_color(...)
Inject custom JS or CSS aiui.set_custom_js(path), aiui.set_custom_css(css)
Customize UI style (app, chat, dashboard, docs, agents, playground) aiui.set_style(...) or aiui run app.py --style ...

Start from examples/plugins/aiui-hello-plugin and the UI Plugins Guide.


Configuration & CLI

Setting How to configure
Style, layout, branding, theme, pages app.py (aiui.set_* / aiui.configure(...)) or config.yaml — Configuration
Authentication create_app(require_auth=True), YAML auth.requireAuth, or AUTH_ENFORCE=true — Deployment
Cross-origin / reverse proxy AIUI_ALLOWED_ORIGINS=https://app.example.com, AIUI_ALLOWED_HOSTS=aiui.example.com
Persistence --datastore sdk (default), --datastore json, --datastore memory, or aiui.SQLAlchemyDataStore(url)
Data directory & layout override AIUI_DATA_DIR, AIUI_LAYOUT=<id>

31 CLI commands (init, run, dev, build, serve, validate, doctor, health, sessions, pages, plugins, approval, schedule, memory, skills, hooks, workflows, eval, traces, notifications, auth, and more). Run aiui --help or see the CLI Reference.


Development

git clone https://github.com/MervinPraison/PraisonAIUI.git
cd PraisonAIUI
pip install -e ".[dev]"
pytest tests/unit tests/integration

Frontend source lives in src/frontend/ (React 19 + TypeScript + Vite) and syncs to src/praisonaiui/templates/frontend/ via cd src/frontend && npm ci && npm run build && npm run sync. Contributors: read ARCHITECTURE.md and AGENTS.md.

License

MIT © Praison Limited. Third-party notices are listed in THIRD_PARTY_NOTICES.md.

Metadata

Release files for aiui 0.3.189

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiui 0.3.189
File Size Uploaded Provenance Actions
aiui-0.3.189.tar.gz 10.9 MB Without provenance Details for aiui-0.3.189.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiui 0.3.189
File Interpreter ABI Platform Actions
aiui-0.3.189-py3-none-any.whl Python 3 none any Details for aiui-0.3.189-py3-none-any.whl

Total release size: 15.7 MB

Release files / aiui-0.3.189.tar.gz

Download URL aiui-0.3.189.tar.gz
Size 10.9 MB
Tags Source
SHA-256 checksum
How to use checksums
c09cd6dd4ae7a7f13cec0676a6fbcc7ea39e55e1b9413acc2490a2d9bb906d54
BLAKE2b-256 checksum
How to use checksums
75961f879cf2e30ff895b5de0f92b32d4ef9e43378ef2358a555c187d1190cab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / aiui-0.3.189-py3-none-any.whl

Download URL aiui-0.3.189-py3-none-any.whl
Size 4.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
585c7fc824d9ac3731181b973f8812a1a9106dc9640e7d9a72995786a0aced5b
BLAKE2b-256 checksum
How to use checksums
5e532518622136fc137c14b7d13d21dbc4c8f8803b7401244536e5ccae60bf3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for aiui 0.3.189

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.189 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page