
PraisonAI
io.github.MervinPraison由 GitHub 账号 MervinPraison 发布v2.3.42更新于 Oct 24, 2026
AI Agents Framework with Self Reflection and MCP support
概览
PraisonAI 是一个以本地 MCP 服务器形式提供的 Python 智能体框架,让助手构建并运行带工具、记忆和反思能力的自主多智能体工作流。
- 可以做什么
- 用 Python、JavaScript 或 YAML 构建并运行单智能体或多智能体工作流,支持规划、自我反思和智能体交接。挂载工具,包括通过 stdio、HTTP、WebSocket 或 SSE 连接的其他 MCP 服务器,以及自定义 Python 工具。加入记忆、知识和 RAG 检索,并可选持久化到 PostgreSQL、SQLite、Redis 等数据库。在 Docker、e2b、Modal 等运行时上运行受管沙箱以执行工具或代码。提供聊天面板以及 Telegram、Discord、Slack 等消息渠道。
- 适用场景
- 适合需要助手编排多步骤智能体团队、在一个框架后接入多个 MCP 服务器,或运行带明确迭代与预算上限的自主研究、编码和工作流任务的场景。
- 运行要求
- 作为本地进程在桌面运行;需安装 praisonai Python 包(核心 SDK 为 praisonaiagents)。需要 LLM 提供方 API 密钥,例如 OPENAI_API_KEY,面板还需 TAVILY_API_KEY。使用托管模型提供方需要网络访问;Docker 等沙箱选项需要相应运行时。
安装
在 SourceWeft 中
- 打开 控制台中的 PraisonAI,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
[Total Downloads] [Latest Stable Version] [License]
PraisonAI 🦞
PraisonAI 🦞 — Hire a 24/7 AI Workforce. Stop writing boilerplate and start shipping autonomous, self-improving agents that research, plan, and execute tasks across your apps. From one agent to an entire organization, deployed in 5 lines of code.
🎯 Use Cases
AI agents solving real-world problems across industries:
🚀 Meet your first Agent (Under 1 Minute)
- Install the lightweight core SDK:
- Run your first autonomous agent:
🧬 The Five-Layer Agent Stack
Most frameworks hand you one or two layers and leave the rest as homework. PraisonAI covers all five — plus the outer layer that decides where your agent actually runs.
Each layer wraps the one inside it. When an agent misbehaves, the layer tells you where to look.
Layer 1 · Prompt — Did I say it clearly?
Role, instructions, examples, output format.
Layer 2 · Context — Is the right thing in the window?
Write, select, compress, isolate — the four context operations, one parameter each.
Isolate is
handoffs=[specialist]— a sub-agent inherits the last few messages and the intersection of your tools, not your whole transcript. 📖 Handoffs
Layer 3 · Harness — Can it act, and be checked?
Agent = Model + Harness. Tool dispatch, plus the guides that steer before acting and the sensors that observe after.
Layer 4 · Loop — When do we stop?
Hard iteration caps, budget ceilings, no-progress detection and completion checks — every brake is explicit.
Doom-loop detection is on by default. Repeated identical tool calls and A→B→A→B oscillation get caught — while a poller whose output keeps changing does not. 📖 Doom Loop Detection
Layer 5 · Graph — Who runs when, and who checks whom?
Topology as a versionable artifact: prompt chaining, routing, parallelisation, orchestrator-worker.
The same graph is expressible in YAML with no Python at all. 📖 AgentFlow
⬡ Outside the stack: Managed Agents — Where does it actually run?
The harness is commoditising; where the agent executes is the next multiplier. Rather than burning your laptop's CPU, hand an agent a short-lived cloud sandbox — repo, tools and tests run there.
The simplest way in is tools_run_on= — one whole team or workflow shares one sandbox, so a file written by step 1 is there for step 2. Thinking stays on your machine:
Same thing with no Python at all:
For a single agent, two words cover it — and they answer different questions:
Ask any object where it runs, and it will tell you:
Naming a place that cannot do the job is a typo, not a preference, so it says so:
To run one block of code somewhere else, name the place on that call:
See what is running and reclaim strays:
Sandboxes shut themselves down when idle (auto_shutdown, idle_timeout_s), and a post-setup snapshot is reused so the next run skips the image pull and dependency install. Commit a .praisonai/environment.yaml and the environment travels with the repo.
📖 20 runnable examples · manage sessions with
praisonai managed sessions list <agent-id>orpraisonai managed sessions resume <session-id> "<prompt>"
Stack framing adapted from The Five-Layer Agent Stack and Agent Harnesses vs Orbs.
🌌 The PraisonAI Ecosystem
Start simple with the core SDK, or expand to full visual builders and dashboards when you're ready.
- Core SDK (
praisonaiagents): For pure Python development.pip install praisonaiagents - 💻 PraisonAI CLI (
praisonai): For terminal-based developers.pip install praisonai - 🦞 Claw Dashboard: Connect agents directly to Telegram, Slack, or Discord.
pip install "praisonai[claw]" - 🔗 Flow Visual Builder: Drag-and-drop workflow creation.
pip install "praisonai[flow]" - 🤖 PraisonAI UI: Clean chat interface.
pip install "praisonai[ui]"
JavaScript SDK
🧠 Supported Providers & Features
Powered by 100+ LLMs (OpenAI, Anthropic, Gemini & local models).
[OpenAI] [Anthropic] [Google Gemini] [DeepSeek] [Azure] [Ollama] [Groq] [Mistral] [Cerebras] [Cohere] [OpenRouter] [Perplexity] [Fireworks] [AWS Bedrock] [xAI Grok] [Vertex AI] [HuggingFace] [Together AI] [Databricks] [Replicate] [Cloudflare]
View all 24 providers with examples
"Grok 3 customer support" — Elon Musk quoting PraisonAI's tutorial
🌟 Why PraisonAI?
View all 25 features
📘 Using Python Code
Unsure whether a result is a bug or model randomness? Check the SDK Behavior Matrix for
stream, memory prefetch, structured output, teams and AG-UI.
1. Single Agent
2. Multi Agents
3. MCP (Model Context Protocol)
📖 Full MCP docs — stdio, HTTP, WebSocket, SSE transports
4. Custom Tools
⚠️ Security Note: Never use
eval(),exec(), orsubprocessin tool functions that process LLM-generated or user-supplied input. Always validate and sanitize inputs to prevent code injection attacks. 📖 Full tools docs — BaseTool, tool packages, 100+ built-in tools
5. Persistence (Databases)
📖 Full persistence docs — PostgreSQL, MySQL, SQLite, MongoDB, Redis, and 20+ more
6. PraisonAI Claw 🦞 (Dashboard UI)
Connect your AI agents to Telegram, Discord, Slack, WhatsApp and more — all from a single command.
Required Environment Variables
Copy .env.example to .env and configure the following variables:
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
7. Langflow Integration 🔗 (Visual Flow Builder)
Build multi-agent workflows visually with drag-and-drop components in Langflow.
Open http://localhost:7861 — use the Agent and Agent Team components to create sequential or parallel workflows. Connect Chat Input → Agent Team → Chat Output for instant multi-agent pipelines.
📖 Full Flow docs — visual agent building, component reference, and deployment
8. PraisonAI UI 🤖 (Clean Chat)
Lightweight chat interface for your AI agents.
📄 Using YAML (No Code)
Example 1: Two Agents Working Together
Create agents.yaml:
Run with:
The agents automatically work together sequentially
Example 2: Agent with Custom Tool
Create two files in the same folder:
agents.yaml:
tools.py:
Run with:
💡 Tips:
- Use the function name (e.g.,
add_numbers) in the tools list, not the file name- Tools in
tools.pyare automatically discovered- The function's docstring helps the AI understand how to use it
🎯 CLI Quick Reference
✨ Key Features
🤖 Core Agents
🔄 Workflows
💻 Code & Development
🧠 Memory & Knowledge
🔬 Research & Intelligence
📋 Planning & Execution
👥 Specialized Agents
🎨 Media & Multimodal
🔌 Protocols & Integration
🛡️ Safety & Control
⚙️ Advanced Features
🛠️ Tools & Configuration
📊 Monitoring & Management
🖥️ CLI Features
🧪 Evaluation
🎯 Agent Skills
⏰ 24/7 Scheduling
💻 Using JavaScript Code
⚡ Performance
PraisonAI keeps framework overhead microsecond-class: creating an Agent (one tool, no LLM call) averaged 46 μs in our 2026-10-15 run, so per-agent setup is negligible next to model latency in multi-agent workloads.
Methodology, comparisons and how to reproduce: benchmarks/BENCHMARK_RESULTS.md · docs
⭐ Star History
* export TAVILY_API_KEY=xxxxx
🔍 Langfuse Tracing
🎓 Video Tutorials
Learn PraisonAI through our comprehensive video series:
View all 22 video tutorials
👥 Contributing
We welcome contributions! Fork the repo, create a branch, and submit a PR → Contributing Guide.
❓ FAQ & Troubleshooting
ModuleNotFoundError: No module named 'praisonaiagents'
Install the package:
API key not found / Authentication error
Ensure your API key is set:
For other providers, see Models docs.
How do I use a local model (Ollama)?
The ollama/ prefix is what selects Ollama's handling — tool-call repair,
tool-result formatting and the streaming rules small local models need. Or set
it by environment instead:
Setting only OPENAI_BASE_URL is not enough: with no model named, the OpenAI
default (gpt-4o-mini) is sent to Ollama, which answers
404 model 'gpt-4o-mini' not found. Always name the model.
Point at a non-default host with base_url= or OLLAMA_HOST:
The same shape works for other local runtimes — lm_studio/, vllm/ and
hosted_vllm/ with their server's base_url.
See Models docs for more details.
How do I persist conversations to a database?
Use the db parameter:
See Persistence docs for supported databases.
How do I enable agent memory?
See Memory docs for more options.
How do I run multiple agents together?
See Agents docs for more examples.
How do I use MCP tools?
See MCP docs for all transport options.
Getting Help
Made with ❤️ by the PraisonAI Team
📚 Documentation • GitHub • ▶️ YouTube • 𝕏 X • 💼 LinkedIn
来源:README.md,提交 e7076d0
工具
0版本历史
1- v2.3.42最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分