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.
PraisonAI Chat
PraisonAI Chat is a powerful, modern chat interface designed for AI agent interactions. It provides a beautiful UI for interacting with PraisonAI agents with features like streaming responses, tool call visualization, and session management.
Installation
pip install praisonai[chat]
Quick Start
CLI Usage
Start the chat interface with a single command:
This starts the chat server at http://localhost:8000.
With Custom Port
praisonai chat --port 3000
Programmatic Usage
from praisonaiagents import Agent
from praisonai . chat import start_chat_server
# Create your agent
agent = Agent (
name = " Assistant " ,
instructions = " You are a helpful AI assistant. "
)
# Start the chat UI with your agent
start_chat_server ( agent = agent , port = 8000 )
Features
Multi-Agent Support Seamlessly interact with multiple AI agents in a single interface
Tool Visualization See agent tool calls and their results in real-time
Streaming Responses Real-time streaming of agent responses
Session Management Persistent sessions with full history
Multi-Agent Chat
from praisonaiagents import Agent
from praisonai . chat import start_chat_server
# Define multiple agents
researcher = Agent (
name = " Researcher " ,
role = " Research specialist " ,
instructions = " You research topics thoroughly. "
)
writer = Agent (
name = " Writer " ,
role = " Content writer " ,
instructions = " You write clear, engaging content. "
)
# Start chat with multiple agents
start_chat_server ( agents =[ researcher , writer ], port = 8000 )
Configuration
ChatConfig Options
from praisonai . chat import start_chat_server , ChatConfig
config = ChatConfig (
host = " 0.0.0.0 " , # Host to bind to
port = 8000 , # Port number
debug = False , # Enable debug mode
auth_enabled = False , # Enable authentication
session_id = None , # Custom session ID
)
start_chat_server ( config = config )
Environment Variables
Variable Description Default PRAISONAI_CHAT_PORTServer port 8000PRAISONAI_CHAT_HOSTServer host 0.0.0.0CHAINLIT_HOSTHost the UI binds to (drives auth mode) 127.0.0.1CHAINLIT_USERNAMEUsername for authentication adminCHAINLIT_PASSWORDPassword for authentication adminPRAISONAI_ALLOW_DEFAULT_CREDSAllow admin/admin on external bind (unsafe) falseCHAINLIT_AUTH_SECRETAuth secret for sessions Auto-generated
Security
The chat UI enforces bind-aware authentication — stricter security when bound to external interfaces.
Interface Security Mode Credentials Loopback (127.0.0.1, localhost)Permissive admin/admin allowedExternal (0.0.0.0, LAN, public)Strict Custom credentials required
Using default admin/admin credentials on external interfaces will cause a UIStartupError unless PRAISONAI_ALLOW_DEFAULT_CREDS=1 is set (demo only).
# Safe for external deployment
export CHAINLIT_USERNAME = myuser
export CHAINLIT_PASSWORD = mypass
praisonai chat --host 0.0.0.0
Bind-Aware Authentication Complete security configuration guide
UI Features
Chain of Thought Visualization
The chat interface displays agent reasoning steps, showing how agents arrive at their responses.
When agents use tools, the UI displays:
Tool name
Input arguments
Tool output/results
Execution time
Session History
Automatic session persistence
Resume previous conversations
Export chat history
Integration with PraisonAI Agents
PraisonAI Chat integrates seamlessly with the full PraisonAI agent framework:
from praisonaiagents import Agent , Task , AgentTeam
# Define agents with tools
from praisonaiagents import duckduckgo_search
researcher = Agent (
name = " Researcher " ,
role = " Research specialist " ,
tools =[ duckduckgo_search ]
)
writer = Agent (
name = " Writer " ,
role = " Content writer "
)
# Define tasks
research_task = Task (
description = " Research {topic} " ,
agent = researcher ,
expected_output = " Research findings "
)
write_task = Task (
description = " Write article based on research " ,
agent = writer ,
expected_output = " Article content "
)
# Create the agents system
agents = AgentTeam (
agents =[ researcher , writer ],
tasks =[ research_task , write_task ]
)
# The chat UI will automatically detect and use these agents
Upstream Updates
PraisonAI Chat is based on Chainlit , an excellent open-source framework. We maintain compatibility with upstream updates.
To sync with upstream improvements:
cd PraisonAIChat
make sync-upstream
License
PraisonAI Chat is licensed under the Apache 2.0 License. See THIRD_PARTY_NOTICES.md for attribution.