AI Agents Framework with Self Reflection and MCP support
PraisonAI π¦ β Automate and solve complex challenges with AI agent teams that plan, research, code, and deliver results to Telegram, Discord, and WhatsApp β running 24/7. A low-code, production-ready multi-agent framework with handoffs, guardrails, memory, RAG, and 100+ LLM providers, built around simplicity, customisation, and effective human-agent collaboration.
Quick Paths:
- π New here? β Quick Start (1 minute to first agent)
- π¦ Installing? β Installation
- π Python SDK? β Python Examples
- π― CLI user? β CLI Quick Reference
- π€ Contributing? β Contributing
PraisonAI is built for speed, with agent instantiation in under 4ΞΌs. This reduces overhead, improves responsiveness, and helps multi-agent systems scale efficiently in real-world production workloads.
| Performance Metric | PraisonAI |
|---|---|
| Avg Instantiation Time | 3.77 ΞΌs |
AI agents solving real-world problems across industries:
| Use Case | Description |
|---|---|
| π Research & Analysis | Conduct deep research, gather information, and generate insights from multiple sources automatically |
| π» Code Generation | Write, debug, and refactor code with AI agents that understand your codebase and requirements |
| βοΈ Content Creation | Generate blog posts, documentation, marketing copy, and technical writing with multi-agent teams |
| π Data Pipelines | Extract, transform, and analyze data from APIs, databases, and web sources automatically |
| π€ Customer Support | Deploy 24/7 support bots on Telegram, Discord, Slack with memory and knowledge-backed responses |
| βοΈ Workflow Automation | Automate multi-step business processes with agents that hand off tasks, verify results, and self-correct |
PraisonAI supports 100+ LLM providers through seamless integration:
| Provider | Example |
|---|---|
| OpenAI | Example |
| Anthropic | Example |
| Google Gemini | Example |
| Ollama | Example |
| Groq | Example |
| DeepSeek | Example |
| xAI Grok | Example |
| Mistral | Example |
| Cohere | Example |
| Perplexity | Example |
| Fireworks | Example |
| Together AI | Example |
| OpenRouter | Example |
| HuggingFace | Example |
| Azure OpenAI | Example |
| AWS Bedrock | Example |
| Google Vertex | Example |
| Databricks | Example |
| Cloudflare | Example |
| AI21 | Example |
| Replicate | Example |
| SageMaker | Example |
| Moonshot | Example |
| vLLM | Example |
| Feature | How | |
|---|---|---|
| π | MCP Protocol β stdio, HTTP, WebSocket, SSE | tools=MCP("npx ...") |
| π§ | Planning Mode β plan β execute β reason | planning=True |
| π | Deep Research β multi-step autonomous research | Docs |
| π€ | External Agents β orchestrate Claude Code, Gemini CLI, Codex | Docs |
| π | Agent Handoffs β seamless conversation passing | handoff=True |
| π‘οΈ | Guardrails β input/output validation | Docs |
| Web Search + Fetch β native browsing | web_search=True | |
| πͺ | Self Reflection β agent reviews its own output | Docs |
| π | Workflow Patterns β route, parallel, loop, repeat | Docs |
| π§ | Memory (zero deps) β works out of the box | memory=True |
| Feature | How | |
|---|---|---|
| π‘ | Prompt Caching β reduce latency + cost | prompt_caching=True |
| πΎ | Sessions + Auto-Save β persistent state across restarts | auto_save="my-project" |
| π | Thinking Budgets β control reasoning depth | thinking_budget=1024 |
| π | RAG + Quality-Based RAG β auto quality scoring retrieval | Docs |
| π | Model Router β auto-routes to cheapest capable model | Docs |
| π§ | Shadow Git Checkpoints β auto-rollback on failure | Docs |
| π‘ | A2A Protocol β agent-to-agent interop | Docs |
| π | Context Compaction β never hit token limits | Docs |
| π‘ | Telemetry β OpenTelemetry traces, spans, metrics | Docs |
| π | Policy Engine β declarative agent behavior control | Docs |
| π | Background Tasks β fire-and-forget agents | Docs |
| π | Doom Loop Detection β auto-recovery from stuck agents | Docs |
| πΈοΈ | Graph Memory β Neo4j-style relationship tracking | Docs |
| ποΈ | Sandbox Execution β isolated code execution | Docs |
| π₯οΈ | Bot Gateway β multi-agent routing across channels | Docs |
Get started with PraisonAI in under 1 minute:
# Install
pip install praisonaiagents
# Set API key
export OPENAI_API_KEY=your_key_here
# Create a simple agent
python -c "from praisonaiagents import Agent; Agent(instructions='You are a helpful AI assistant').start('Write a haiku about AI')"
Next Steps: Single Agent Example | Multi Agents | Full Docs
Lightweight package dedicated for coding:
pip install praisonaiagents
For the full framework with CLI support:
pip install praisonai
π¦ AgentClaw β full UI with bots, memory, knowledge, and gateway:
pip install "praisonai[claw]"
praisonai claw
npm install praisonai
from praisonaiagents import Agent
agent = Agent(instructions="You are a helpful AI assistant")
agent.start("Write a movie script about a robot in Mars")
from praisonaiagents import Agent, Agents
research_agent = Agent(instructions="Research about AI")
summarise_agent = Agent(instructions="Summarise research agent's findings")
agents = Agents(agents=[research_agent, summarise_agent])
agents.start()
from praisonaiagents import Agent, MCP
# stdio - Local NPX/Python servers
agent = Agent(tools=MCP("npx @modelcontextprotocol/server-memory"))
# Streamable HTTP - Production servers
agent = Agent(tools=MCP("https://api.example.com/mcp"))
# WebSocket - Real-time bidirectional
agent = Agent(tools=MCP("wss://api.example.com/mcp", auth_token="token"))
# With environment variables
agent = Agent(
tools=MCP(
command="npx",
args=["-y", "@modelcontextprotocol/server-brave-search"],
env={"BRAVE_API_KEY": "your-key"}
)
)
π Full MCP docs β stdio, HTTP, WebSocket, SSE transports
from praisonaiagents import Agent, tool
@tool
def search(query: str) -> str:
"""Search the web for information."""
return f"Results for: {query}"
@tool
def calculate(expression: str) -> float:
"""Evaluate a math expression."""
return eval(expression)
agent = Agent(
instructions="You are a helpful assistant",
tools=[search, calculate]
)
agent.start("Search for AI news and calculate 15*4")
π Full tools docs β BaseTool, tool packages, 100+ built-in tools
from praisonaiagents import Agent, db
agent = Agent(
name="Assistant",
db=db(database_url="postgresql://localhost/mydb"),
session_id="my-session"
)
agent.chat("Hello!") # Auto-persists messages, runs, traces
π Full persistence docs β PostgreSQL, MySQL, SQLite, MongoDB, Redis, and 20+ more
Connect your AI agents to Telegram, Discord, Slack, WhatsApp and more β all from a single command.
pip install "praisonai[claw]"
praisonai claw
Open http://localhost:8082 β the dashboard comes with 13 built-in pages: Chat, Agents, Memory, Knowledge, Channels, Guardrails, Cron, and more. Add messaging channels directly from the UI.
π Full Claw docs β platform tokens, CLI options, Docker, and YAML agent mode
| Category | Commands |
|---|---|
| Execution | praisonai, --auto, --interactive, --chat |
| Research | research, --query-rewrite, --deep-research |
| Planning | --planning, --planning-tools, --planning-reasoning |
| Workflows | workflow run, workflow list, workflow auto |
| Memory | memory show, memory add, memory search, memory clear |
| Knowledge | knowledge add, knowledge query, knowledge list |
| Sessions | session list, session resume, session delete |
| Tools | tools list, tools info, tools search |
| MCP | mcp list, mcp create, mcp enable |
| Development | commit, docs, checkpoint, hooks |
| Scheduling | schedule start, schedule list, schedule stop |
π Full CLI reference
| Feature | Code | Docs |
|---|---|---|
| Single Agent | Example | π |
| Multi Agents | Example | π |
| Auto Agents | Example | π |
| Self Reflection AI Agents | Example | π |
| Reasoning AI Agents | Example | π |
| Multi Modal AI Agents | Example | π |
| Feature | Code | Docs |
|---|---|---|
| Simple Workflow | Example | π |
| Workflow with Agents | Example | π |
Agentic Routing (route()) | Example | π |
Parallel Execution (parallel()) | Example | π |
Loop over List/CSV (loop()) | Example | π |
Evaluator-Optimizer (repeat()) | Example | π |
| Conditional Steps | Example | π |
| Workflow Branching | Example | π |
| Workflow Early Stop | Example | π |
| Workflow Checkpoints | Example | π |
| Feature | Code | Docs |
|---|---|---|
| Code Interpreter Agents | Example | π |
| AI Code Editing Tools | Example | π |
| External Agents (All) | Example | π |
| Claude Code CLI | Example | π |
| Gemini CLI | Example | π |
| Codex CLI | Example | π |
| Cursor CLI | Example | π |
| Feature | Code | Docs |
|---|---|---|
| Memory (Short & Long Term) | Example | π |
| File-Based Memory | Example | π |
| Claude Memory Tool | Example | π |
| Add Custom Knowledge | Example | π |
| RAG Agents | Example | π |
| Chat with PDF Agents | Example | π |
| Data Readers (PDF, DOCX, etc.) | CLI | π |
| Vector Store Selection | CLI | π |
| Retrieval Strategies | CLI | π |
| Rerankers | CLI | π |
| Index Types (Vector/Keyword/Hybrid) | CLI | π |
| Query Engines (Sub-Question, etc.) | CLI | π |
| Feature | Code | Docs |
|---|---|---|
| Deep Research Agents | Example | π |
| Query Rewriter Agent | Example | π |
| Native Web Search | Example | π |
| Built-in Search Tools | Example | π |
| Unified Web Search | Example | π |
| Web Fetch (Anthropic) | Example | π |
| Feature | Code | Docs |
|---|---|---|
| Planning Mode | Example | π |
| Planning Tools | Example | π |
| Planning Reasoning | Example | π |
| Prompt Chaining | Example | π |
| Evaluator Optimiser | Example | π |
| Orchestrator Workers | Example | π |
| Feature | Code | Docs |
|---|---|---|
| Data Analyst Agent | Example | π |
| Finance Agent | Example | π |
| Shopping Agent | Example | π |
| Recommendation Agent | Example | π |
| Wikipedia Agent | Example | π |
| Programming Agent | Example | π |
| Math Agents | Example | π |
| Markdown Agent | Example | π |
| Prompt Expander Agent | Example | π |
| Feature | Code | Docs |
|---|---|---|
| Image Generation Agent | Example | π |
| Image to Text Agent | Example | π |
| Video Agent | Example | π |
| Camera Integration | Example | π |
| Feature | Code | Docs |
|---|---|---|
| MCP Transports | Example | π |
| WebSocket MCP | Example | π |
| MCP Security | Example | π |
| MCP Resumability | Example | π |
| MCP Config Management | Docs | π |
| LangChain Integrated Agents | Example | π |
| Feature | Code | Docs |
|---|---|---|
| Guardrails | Example | π |
| Human Approval | Example | π |
| Rules & Instructions | Docs | π |
| Feature | Code | Docs |
|---|---|---|
| Async & Parallel Processing | Example | π |
| Parallelisation | Example | π |
| Repetitive Agents | Example | π |
| Agent Handoffs | Example | π |
| Stateful Agents | Example | π |
| Autonomous Workflow | Example | π |
| Structured Output Agents | Example | π |
| Model Router | Example | π |
| Prompt Caching | Example | π |
| Fast Context | Example | π |
| Feature | Code | Docs |
|---|---|---|
| 100+ Custom Tools | Example | π |
| YAML Configuration | Example | π |
| 100+ LLM Support | Example | π |
| Callback Agents | Example | π |
| Hooks | Example | π |
| Middleware System | Example | π |
| Configurable Model | Example | π |
| Rate Limiter | Example | π |
| Injected Tool State | Example | π |
| Shadow Git Checkpoints | Example | π |
| Background Tasks | Example | π |
| Policy Engine | Example | π |
| Thinking Budgets | Example | π |
| Output Styles | Example | π |
| Context Compaction | Example | π |
| Feature | Code | Docs |
|---|---|---|
| Sessions Management | Example | π |
| Auto-Save Sessions | Docs | π |
| History in Context | Docs | π |
| Telemetry | Example | π |
| Project Docs (.praison/docs/) | Docs | π |
| AI Commit Messages | Docs | π |
| @Mentions in Prompts | Docs | π |
| Feature | Code | Docs |
|---|---|---|
| Slash Commands | Example | π |
| Autonomy Modes | Example | π |
| Cost Tracking | Example | π |
| Repository Map | Example | π |
| Interactive TUI | Example | π |
| Git Integration | Example | π |
| Sandbox Execution | Example | π |
| CLI Compare | Example | π |
| Profile/Benchmark | Docs | π |
| Auto Mode | Docs | π |
| Init | Docs | π |
| File Input | Docs | π |
| Final Agent | Docs | π |
| Max Tokens | Docs | π |
| Feature | Code | Docs |
|---|---|---|
| Accuracy Evaluation | Example | π |
| Performance Evaluation | Example | π |
| Reliability Evaluation | Example | π |
| Criteria Evaluation | Example | π |
npm install praisonai
export OPENAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxx
const { Agent } = require('praisonai');
const agent = new Agent({ instructions: 'You are a helpful AI assistant' });
agent.start('Write a movie script about a robot in Mars');
Learn PraisonAI through our comprehensive video series:
We welcome contributions! Fork the repo, create a branch, and submit a PR β Contributing Guide.
Install the package:
pip install praisonaiagents
Ensure your API key is set:
export OPENAI_API_KEY=your_key_here
For other providers, see Models docs.
# Start Ollama server first
ollama serve
# Set environment variable
export OPENAI_BASE_URL=http://localhost:11434/v1
See Models docs for more details.
Use the db parameter:
from praisonaiagents import Agent, db
agent = Agent(
name="Assistant",
db=db(database_url="postgresql://localhost/mydb"),
session_id="my-session"
)
See Persistence docs for supported databases.
from praisonaiagents import Agent
agent = Agent(
name="Assistant",
memory=True, # Enables file-based memory (no extra deps!)
user_id="user123"
)
See Memory docs for more options.
from praisonaiagents import Agent, Agents
agent1 = Agent(instructions="Research topics")
agent2 = Agent(instructions="Summarize findings")
agents = Agents(agents=[agent1, agent2])
agents.start()
See Agents docs for more examples.
from praisonaiagents import Agent, MCP
agent = Agent(
tools=MCP("npx @modelcontextprotocol/server-memory")
)
See MCP docs for all transport options.
Made with β€οΈ by the PraisonAI Team
π Documentation β’ GitHub β’ βΆοΈ YouTube β’ π X β’ πΌ LinkedIn
Source-derived launch command. Check the maintainerβs required arguments and credentials before running:
uvx praisonaiMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-mervinpraison-praisonai": {
"command": "uvx",
"args": [
"praisonai"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the clientβs tool list, then try a read-only example from its documentation.
Claude Desktop setup referencepraisonaipypiPraisonAI works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.