
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 分