YAML-driven website generator - CLI and compiler
Project description
PraisonAI ๐ฆ
AI Dashboard & Multi-Agent Platform โ deploy agents with one Python file
PraisonAIUI gives you a full-featured AI dashboard with multi-agent chat, memory, skills, sessions, and 19 admin pages โ all from a single app.py. It also supports YAML-driven chat bots and static documentation sites.
Quick Start
1. Install
pip install aiui
2. Create app.py
import praisonaiui as aiui
aiui.set_style("dashboard")
@aiui.reply
async def on_reply(message):
return f"You said: {message.content}"
3. Run
aiui run app.py
Open http://localhost:8000 โ your AI dashboard is live.
YAML Chat Mode
No Python needed โ define your agent in YAML:
# chat.yaml
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"
profiles:
- name: Expert
description: Expert mode
icon: ๐
tools:
- web_search
- calculate
features: true
datastore: json
aiui run chat.yaml
Documentation Mode
Generate a static documentation site from Markdown:
aiui init
aiui build
aiui serve
UI Styles
Six distinct UI styles, selectable via --style or aiui.set_style():
| Style | Flag | Description | Best For |
|---|---|---|---|
| Dashboard | --style dashboard |
Multi-page admin panel with sidebar | Agent management, admin dashboards |
| Chat | --style chat |
Fullscreen/sidebar/floating chat | Conversational AI, customer support |
| Agents | --style agents |
Tabbed multi-agent playground | Agent experimentation |
| Playground | --style playground |
Input/output side-by-side panels | Prompt testing, comparison |
| Docs | --style docs |
Three-column documentation layout | Documentation sites, knowledge bases |
| Custom | --style custom |
User-defined layout | Full control |
aiui run app.py --style dashboard
aiui run app.py --style chat
aiui run chat.yaml --style agents
Python SDK API
Write app.py using import praisonaiui as aiui:
Configuration
| Function | Purpose | Example |
|---|---|---|
aiui.set_style(style) |
Set UI style | aiui.set_style("dashboard") |
aiui.set_pages(ids) |
Whitelist sidebar pages | aiui.set_pages(["chat", "agents", "memory"]) |
aiui.set_branding(title, logo) |
Configure branding | aiui.set_branding("MyApp", "๐") |
aiui.set_datastore(store) |
Set persistence backend | aiui.set_datastore(aiui.JSONFileDataStore()) |
aiui.set_provider(provider) |
Set AI provider | aiui.set_provider(aiui.get_provider()) |
aiui.register_agent(config) |
Register an agent | aiui.register_agent({"agent_id": "bot", ...}) |
aiui.remove_page(id) |
Remove a page | aiui.remove_page("debug") |
Callback Decorators
| Decorator | Purpose |
|---|---|
@aiui.reply |
Handle chat messages |
@aiui.welcome |
Welcome message on connect |
@aiui.goodbye |
Cleanup on disconnect |
@aiui.starters |
Suggest conversation starters |
@aiui.profiles |
Define chat profiles |
@aiui.page(slug, ...) |
Register a custom dashboard page |
@aiui.on(event) |
Listen for server events |
@aiui.login |
Handle authentication |
@aiui.settings |
User settings handler |
@aiui.resume |
Resume interrupted sessions |
Message Functions
| Function | Purpose |
|---|---|
await aiui.say(text) |
Send a message |
await aiui.stream(text) |
Stream a response |
await aiui.stream_token(token) |
Stream token-by-token |
await aiui.ask(question) |
Ask user a question |
await aiui.image(url) |
Send an image |
await aiui.audio(url) |
Send audio |
await aiui.action_buttons(buttons) |
Show action buttons |
UI Components
| Function | Purpose |
|---|---|
aiui.layout(children) |
Page layout container |
aiui.card(title, content) |
Card component |
aiui.chart(data, type) |
Chart (bar, line, pie) |
aiui.table(headers, rows) |
Data table |
aiui.columns(cols) |
Multi-column layout |
aiui.text(content) |
Text block |
Full app.py Example
"""Dashboard with three agents and a custom page."""
import os
import praisonaiui as aiui
# โโ Style & pages โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
aiui.set_style("dashboard")
aiui.set_pages([
"chat", "agents", "memory", "knowledge",
"skills", "sessions", "usage", "config", "logs",
])
# โโ Branding โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
aiui.set_branding(title="PraisonAI", logo="๐ฆ")
# โโ Agents โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
aiui.register_agent({
"agent_id": "researcher",
"name": "Researcher",
"description": "Finds and summarizes information",
"instructions": "You are a research assistant.",
"model": os.getenv("PRAISONAI_MODEL", "gpt-4o-mini"),
"icon": "๐ฌ",
})
aiui.register_agent({
"agent_id": "coder",
"name": "Coder",
"description": "Writes clean, well-commented code",
"instructions": "You are a coding assistant.",
"model": os.getenv("PRAISONAI_MODEL", "gpt-4o-mini"),
"icon": "๐ป",
})
# โโ Custom page โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
@aiui.page("explorer", title="Explorer", icon="๐ฌ", group="Control", order=55)
async def explorer_page():
return aiui.layout([aiui.text("Custom page content here.")])
aiui run app.py
Dashboard Pages
All built-in pages available for set_pages():
| ID | Icon | Group | Description |
|---|---|---|---|
chat |
๐ฌ | Agent | AI agent chat |
channels |
๐ก | Agent | Messaging platform connections |
agents |
๐ค | Agent | Configured AI agents |
skills |
โก | Agent | Agent skills & plugins |
memory |
๐ง | Agent | Agent memory & knowledge |
knowledge |
๐ | Agent | Knowledge base & RAG |
guardrails |
๐ก๏ธ | Agent | Input/output safety guardrails |
overview |
๐ | Control | System health and statistics |
sessions |
๐ | Control | Conversation history |
usage |
๐ | Control | Token usage & metrics |
cron |
โฐ | Agent | Scheduled jobs |
jobs |
๐ | Control | Async agent jobs |
approvals |
โ | Control | Execution approval queue |
nodes |
๐ฅ๏ธ | Control | Execution nodes & presence |
eval |
๐ | Control | Agent evaluation & accuracy |
api |
๐ | Control | OpenAI-compatible API endpoints |
config |
โ๏ธ | Settings | Server configuration |
auth |
๐ | Settings | Authentication settings |
logs |
๐ | Settings | Server logs and events |
debug |
๐ | Settings | Debug information |
telemetry |
๐ | Settings | Telemetry data |
traces |
๐ | Settings | Distributed traces |
security |
๐ | Settings | Security settings |
inspector |
๐ | Control | API endpoint debugger (footer) |
CLI Commands
Core Commands
aiui init [--template docs|minimal|marketing] [--frontend] # Create project
aiui validate [--config FILE] [--strict] # Validate config
aiui build [--config FILE] [--output DIR] [--minify] # Build static site
aiui serve [--port 8000] [--reload] [--style STYLE] # Serve site
aiui run app.py [--port 8000] [--reload] [--style STYLE] # Run AI server
aiui run chat.yaml [--port 8000] [--style chat] # Run YAML chat
aiui dev -e examples [--port 9000] # Dev dashboard
aiui doctor [--json] # Diagnostics
aiui test chat|memory|sessions|endpoints|all # Run tests
Management Commands
# Sessions
aiui sessions list|create|get|delete|messages
# Memory
aiui memory list|add|search|clear|status|context
# Skills
aiui skills list|status|discover
# Agents & Provider
aiui provider status|health|agents
# Config
aiui config get|set|list|history
# Schedules
aiui schedule list|add|remove|status
# Approvals
aiui approval list|pending|resolve
# Workflows
aiui workflows list|run|status|runs
# Hooks
aiui hooks list|trigger|log
# Eval
aiui eval status|list|scores|judges|run
# Traces
aiui traces status|list|spans|get
# Pages
aiui pages list|ids
# Features
aiui features list|status
# Health
aiui health [--detailed]
YAML Configuration
Site Config (config.yaml in ~/.praisonaiui/)
site:
title: "PraisonAI"
logo: "๐ฆ"
theme:
preset: "zinc" # 22 Tailwind color presets
radius: "md" # none, sm, md, lg, xl
darkMode: true
pages:
disabled:
- debug
- telemetry
Static Site Config (aiui.template.yaml)
schemaVersion: 1
site:
title: "My Docs"
theme:
preset: "blue"
darkMode: true
content:
docs:
dir: "./docs"
templates:
docs:
layout: "ThreeColumnLayout"
Theme Presets
22 Tailwind color presets with automatic dark/light mode:
zinc slate stone gray neutral red orange amber yellow lime green emerald teal cyan sky blue indigo violet purple fuchsia pink rose
Environment Variables
| Variable | Purpose | Default |
|---|---|---|
OPENAI_API_KEY |
OpenAI API key | โ |
PRAISONAI_MODEL |
Default model | gpt-4o-mini |
AIUI_DATA_DIR |
Data directory | ~/.praisonaiui |
AIUI_CONFIG |
Config file path | aiui.template.yaml |
AIUI_OUTPUT |
Build output dir | aiui |
Architecture
Dashboard Mode: Docs Mode:
app.py โ aiui run โ Server aiui.template.yaml โ aiui build โ aiui/
โ โโโ index.html
http://localhost:8000 โโโ docs/*.md
โโโ /api/chat/ws (WebSocket) โโโ ui-config.json
โโโ /api/pages โโโ assets/
โโโ /api/agents
โโโ /sessions
โโโ /ui-config.json
Development
git clone https://github.com/MervinPraison/PraisonAIUI.git
cd PraisonAIUI
pip install -e .[dev]
pytest tests -v
License
MIT ยฉ Praison Limited
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aiui-0.3.98.tar.gz.
File metadata
- Download URL: aiui-0.3.98.tar.gz
- Upload date:
- Size: 4.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b06297c7045d114b587e06f2963260d390bf564d8d4a08cc26fe562aef8ebb6a
|
|
| MD5 |
1ba87b82d6ee8c2e3756a3febf809d88
|
|
| BLAKE2b-256 |
735c9b73a91b1b0823e9adf6e69dab3f9ae8d54748329d812c660eeff04bfb1d
|
File details
Details for the file aiui-0.3.98-py3-none-any.whl.
File metadata
- Download URL: aiui-0.3.98-py3-none-any.whl
- Upload date:
- Size: 814.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
769549c8009b88933ddce995f330e6349bb95d099484db8207d0f203878275ec
|
|
| MD5 |
6658368bf1cc21ecde0b2fb4a59c42c9
|
|
| BLAKE2b-256 |
74e396ae41482bc962dbcbb94bf410d14e8aa2edb857ffaf1e09ebcea88c579a
|