PraisonAI について
PraisonAI は自己反省機能と MCP サポートを備えた AI エージェントフレームワークです。自律型エージェント、マルチエージェントチーム、ワークフローを構築する Python 開発者向けで、コアSDKは pip でインストールできます。
主な機能
- 01stdio、HTTP、WebSocket、SSE による MCP() 接続
- 02計画・実行・推論を行うプランニングモード
- 03専門サブエージェントへのハンドオフ
- 04エージェント制御のためのガードレール、承認、フック
- 05route、parallel、loop、repeat のワークフローパターン
- 06Docker や E2B などのサンドボックスでのツール実行
活用シーン
- 01調査、コーディング、データ処理向けのマルチエージェントワークフローの構築
- 02Telegram、Discord、Slack 上でのサポートエージェントの運用
- 03Claude Code や Gemini CLI などの外部エージェントのオーケストレーション
MCP 対応
MCP() を通じて MCP サーバーをツールとしてエージェントに接続し、stdio、HTTP、WebSocket、SSE のトランスポートに対応します。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
ツール
ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。
詳細
PraisonAI 🦞 — 24 時間 365 日稼働する AI ワークフォースを採用しましょう。 定型コードを書くのはやめて、アプリ間で調査、計画、タスク実行を行う、自律的で自己改善するエージェントをリリースしましょう。1 つのエージェントから組織全体まで、5 行のコードでデプロイできます。
curl -fsSL https://praison.ai/install.sh | bash
██████╗ ██████╗ █████╗ ██╗███████╗ ██████╗ ███╗ ██╗ █████╗ ██╗
██╔══██╗██╔══██╗██╔══██╗██║██╔════╝██╔═══██╗████╗ ██║ ██╔══██╗██║
██████╔╝██████╔╝███████║██║███████╗██║ ██║██╔██╗ ██║ ███████║██║
██╔═══╝ ██╔══██╗██╔══██║██║╚════██║██║ ██║██║╚██╗██║ ██╔══██║██║
██║ ██║ ██║██║ ██║██║███████║╚██████╔╝██║ ╚████║ ██║ ██║██║
╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝
pip install praisonai
🎯 ユースケース
さまざまな業界の現実世界の課題を解決する AI エージェント:
| ユースケース | 説明 |
|---|---|
| 🔍 調査と分析 | 複数の情報源から詳細な調査を行い、情報を収集し、インサイトを自動で生成します |
| 💻 コード生成 | コードベースと要件を理解する AI エージェントを使って、コードの作成、デバッグ、リファクタリングを行います |
| ✍️ コンテンツ作成 | マルチエージェントチームでブログ記事、ドキュメント、マーケティングコピー、技術文書を生成します |
| 📊 データパイプライン | API、データベース、Web ソースからデータを自動で抽出、変換、分析します |
| 🤖 カスタマーサポート | メモリを備え、ナレッジに基づく回答を提供する 24 時間 365 日対応のサポートボットを Telegram、Discord、Slack にデプロイします |
| ⚙️ ワークフロー自動化 | タスクを引き継ぎ、結果を検証し、自ら修正するエージェントで、複数ステップにわたるビジネスプロセスを自動化します |
🚀 最初のエージェントを動かす(1 分以内)
- 軽量なコア SDK をインストールします:
pip install praisonaiagents
export OPENAI_API_KEY="your-api-key"
- 最初の自律エージェントを実行します:
from praisonaiagents import Agent
# Give your agent a goal, and watch it work.
agent = Agent(instructions="You are a senior data analyst.")
agent.start("Analyze the top 3 tech trends of 2026 and format as a markdown table.")
🧬 5 層エージェントスタック
ほとんどのフレームワークは 1 つか 2 つの層を提供するだけで、残りは自分で実装するよう委ねます。PraisonAI は5 つすべてに加えて、エージェントが実際にどこで実行されるかを決める外側の層もカバーします。
各層は、その内側の層を包みます。エージェントの動作がおかしいときは、その層が調査すべき場所を教えてくれます。
┌─────────────────────────────────────────────────────────────────┐
│ ⬡ MANAGED AGENTS — Where does it actually run? │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ 5 · GRAPH — Who runs when, and who checks whom? │ │
│ │ ┌─────────────────────────────────────────────────────────┐ │ │
│ │ │ 4 · LOOP — When do we stop? │ │ │
│ │ │ ┌─────────────────────────────────────────────────────┐ │ │ │
│ │ │ │ 3 · HARNESS — Can it act, and be checked? │ │ │ │
│ │ │ │ ┌─────────────────────────────────────────────────┐ │ │ │ │
│ │ │ │ │ 2 · CONTEXT — Is the right thing in the window? │ │ │ │ │
│ │ │ │ │ ┌─────────────────────────────────────────────┐ │ │ │ │ │
│ │ │ │ │ │ 1 · PROMPT — Did I say it clearly? │ │ │ │ │ │
│ │ │ │ │ └─────────────────────────────────────────────┘ │ │ │ │ │
│ │ │ │ └─────────────────────────────────────────────────┘ │ │ │ │
│ │ │ └─────────────────────────────────────────────────────┘ │ │ │
│ │ └─────────────────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
| 層 | 答える問い | PraisonAI |
|---|---|---|
| 1 · プロンプト | 明確に伝えましたか? | instructions=、role/goal/backstory、output=、templates= |
| 2 · コンテキスト | ウィンドウに適切な情報がありますか? | memory=、knowledge=、context=、引き継ぎの ContextPolicy |
| 3 · ハーネス | 行動し、その結果を検証できますか? | tools=、MCP()、guardrails=、approval=、hooks=、sandbox= |
| 4 · ループ | いつ停止しますか? | execution=ExecutionConfig(...)、reflection=、autonomy=、無限ループ検出 |
| 5 · グラフ | 誰がいつ実行し、誰が誰をチェックしますか? | AgentFlow、route()、parallel()、loop()、repeat() |
| ⬡ マネージド | 実際にどこで実行されますか? | tools_run_on="docker" — ツール用の共有サンドボックス、またはエージェント全体を実行する run_on="anthropic" |
レイヤー 1 · プロンプト — 明確に伝えましたか?
役割、指示、例、出力形式です。
from praisonaiagents import Agent
agent = Agent(
role="Senior Data Analyst",
goal="Turn raw numbers into decisions",
output="verbose", # markdown-formatted output
)
agent.start("Summarise Q3 revenue trends")
レイヤー 2 · コンテキスト — ウィンドウに適切な情報がありますか?
書き込み、選択、圧縮、分離という 4 つのコンテキスト操作を、それぞれ 1 つのパラメーターで行います。
from praisonaiagents import Agent
agent = Agent(
instructions="You are a support engineer.",
memory={"user_id": "u-42"}, # write — persists across runs (needs a user_id)
knowledge=["docs/"], # select — retrieves only what's relevant
context="summarize", # compress — auto-compacts before the limit
)
分離は
handoffs=[specialist]です。サブエージェントが引き継ぐのは直近の数件のメッセージとツールの共通部分であり、会話履歴全体ではありません。📖 引き継ぎ
レイヤー 3 · ハーネス — 行動し、その結果を検証できますか?
エージェント = モデル + ハーネス。 ツールのディスパッチに加え、行動前に導くガイドと、行動後に観察するセンサーです。
from praisonaiagents import Agent, MCP, tool
@tool
def deploy(env: str) -> str:
"""Deploy the current build to an environment."""
return f"Deployed to {env}"
agent = Agent(
name="ReleaseEngineer",
instructions="You are a release engineer.",
tools=[deploy, MCP("npx -y @modelcontextprotocol/server-filesystem /tmp")],
approval=True, # guide — human gate before risky tools run
)
agent.start("Deploy to staging, then list the files you can read")
レイヤー 4 · ループ — いつ停止しますか?
反復回数の上限、予算の上限、進捗なしの検出、完了チェックなど、すべての停止条件が明示されています。
from praisonaiagents import Agent, ExecutionConfig
agent = Agent(
instructions="Fix the failing tests.",
execution=ExecutionConfig(max_iter=30, max_budget=0.50, on_budget_exceeded="stop"),
autonomy=True, # required to drive the loop with run_autonomous()
)
result = agent.run_autonomous("Refactor the auth module", max_iterations=5)
print(result.completion_reason)
# goal | no_tool_calls | max_iterations | timeout | doom_loop | needs_help | error
# (with on_budget_exceeded="stop", hitting the cap raises BudgetExceededError,
# surfaced here as completion_reason="error")
無限ループ検出はデフォルトで有効です。 同じツール呼び出しの繰り返しや A→B→A→B の振動を検出します。一方、出力が変化し続けるポーラーは検出されません。📖 無限ループ検出
レイヤー 5 · グラフ — 誰がいつ実行し、誰が誰をチェックしますか?
バージョン管理可能な成果物としてのトポロジーです。プロンプトの連鎖、ルーティング、並列化、オーケストレーターとワーカーを扱います。
from praisonaiagents import AgentFlow
from praisonaiagents.workflows import route, parallel, repeat
flow = AgentFlow(steps=[
classifier,
route({"bug": [bug_agent], "feature": [feature_agent], "default": [triage]}),
parallel([reviewer, tester]), # fan out, join automatically
repeat(editor, until=lambda ctx: "approved" in ctx.previous_result.lower(),
max_iterations=3), # evaluator–optimizer
])
flow.run("Ticket #123: login fails on Safari")
同じグラフは、Python をまったく使わずに YAML でも表現できます。📖 AgentFlow
⬡ スタックの外側:マネージドエージェント — 実際にはどこで実行されるのか?
ハーネスはコモディティ化しつつあります。次の成長の鍵は、エージェントをどこで実行するかです。ノート PC の CPU を使い切る代わりに、エージェントに短時間だけ使えるクラウドサンドボックスを割り当てましょう。リポジトリ、ツール、テストはそこで実行されます。
pip install praisonai
最も簡単な方法は tools_run_on= です。チーム全体またはワークフロー全体で1つのサンドボックスを共有するため、ステップ1で書き込んだファイルをステップ2で利用できます。思考処理はローカルマシン上で行われます。
from praisonaiagents import Agent, AgentFlow
writer = Agent(name="Writer", instructions="You write files.")
reader = Agent(name="Reader", instructions="You read files.")
flow = AgentFlow(tools_run_on="docker", steps=[writer, reader]) # or e2b | modal | daytona | flyio
flow.run("Write 'hello' to /workspace/note.txt, then read it back")
Python をまったく使わない場合も同じです。
name: remote-demo
tools_run_on: docker # every step shares one sandbox
agents:
writer: {role: Writer, goal: Write files}
reader: {role: Reader, goal: Read files}
steps:
- agent: writer
action: "Write 'hello' to /workspace/note.txt"
- agent: reader
action: "Read /workspace/note.txt"
単一のエージェントなら、2つの単語で指定できます。それぞれ、異なる質問に答えます。
from praisonaiagents import Agent
# A. Only the TOOLS move. Thinking stays on your machine.
agent = Agent(name="builder", instructions="You build things.",
tools_run_on="docker") # docker | e2b | modal | daytona | flyio
# tenki | sandlock | ssh | novita | subprocess
# B. The WHOLE agent moves — model calls, loop and tools
agent = Agent(name="teacher", instructions="You teach.", run_on="anthropic") # hosted
agent = Agent(name="builder", instructions="You build.", run_on="docker") # self-hosted
agent.start("Write a Python script that prints the first 10 primes, then run it")
どのオブジェクトにも実行場所を尋ねれば、教えてくれます。
>>> Agent(name="builder", instructions="x", tools_run_on="docker")
Agent(name='builder', thinks_on='this machine', tools_run_on='a Docker container')
>>> agent.where_does_it_run()
Thinking (the AI model calls) happens on this machine.
Tools run on a Docker container.
Your own tools (check_db) still run on this machine -- only shell, file and
code tools move. They read and write this machine's files.
目的を果たせない場所を指定した場合は、好みではなく入力ミスなので、その旨が示されます。
>>> Agent(name="x", instructions="i", run_on="e2b")
TypeError: Agent(run_on='e2b') is not valid: run_on= places the whole agent
-- model calls, loop and tools -- on a managed runtime, and 'e2b' runs
commands but cannot host an agent loop.
To run only the tools there: Agent(tools_run_on='e2b')
コードブロックを1つだけ別の場所で実行するには、その呼び出しで場所を指定します。
agent.execute_code_sync("print(6 * 7)", run_in="sandlock") # kernel-enforced
実行中のものを確認して、不要なものを停止しましょう。
praisonai managed ps # list running sandboxes
praisonai managed stop --all # reclaim them
サンドボックスはアイドル状態になると自動的にシャットダウンします(auto_shutdown、idle_timeout_s)。セットアップ後のスナップショットが再利用されるため、次回の実行ではイメージの取得と依存関係のインストールが省略されます。.praisonai/environment.yaml をコミットすれば、環境をリポジトリと一緒に持ち運べます。
📖 実行可能な20の例 ·
praisonai managed sessions list <agent-id>またはpraisonai managed sessions resume <session-id> "<prompt>"でセッションを管理できます
スタックの構成は、The Five-Layer Agent Stack と Agent Harnesses vs Orbs を参考にしています。
🌌 PraisonAI エコシステム
コア SDK から始めて、準備ができたら、ビジュアルビルダーやダッシュボードに機能を拡張できます。
- コア SDK(
praisonaiagents):純粋な Python 開発向けです。pip install praisonaiagents - 💻 PraisonAI CLI(
praisonai):ターミナルで開発する方向けです。pip install praisonai - 🦞 Claw ダッシュボード:エージェントを Telegram、Slack、Discord に直接接続できます。
pip install "praisonai[claw]" - 🔗 Flow ビジュアルビルダー:ドラッグ&ドロップでワークフローを作成できます。
pip install "praisonai[flow]" - 🤖 PraisonAI UI:シンプルなチャットインターフェースです。
pip install "praisonai[ui]"
JavaScript SDK
npm install praisonai
🧠 対応プロバイダーと機能
100以上の LLM(OpenAI、Anthropic、Gemini、ローカルモデル)を利用できます。
View all 24 providers with examples
| プロバイダー | 例 |
|---|---|
| OpenAI | 例 |
| Anthropic | 例 |
| Google Gemini | 例 |
| Ollama | 例 |
| Groq | 例 |
| DeepSeek | 例 |
| xAI Grok | 例 |
| Mistral | 例 |
| Cohere | 例 |
| Perplexity | 例 |
| Fireworks | 例 |
| Together AI | 例 |
| OpenRouter | 例 |
| HuggingFace | 例 |
| Azure OpenAI | 例 |
| AWS Bedrock | 例 |
| Google Vertex | 例 |
| Databricks | 例 |
| Cloudflare | 例 |
| AI21 | 例 |
| Replicate | 例 |
| SageMaker | 例 |
| Moonshot | 例 |
| vLLM | 例 |
「Grok 3 カスタマーサポート」 — Elon Musk が PraisonAI のチュートリアルを引用
🌟 PraisonAI を選ぶ理由
| 機能 | 方法 | |
|---|---|---|
| 🔌 | MCP プロトコル — stdio、HTTP、WebSocket、SSE | tools=MCP("npx ...") |
| 🧠 | プランニングモード — 計画 → 実行 → 推論 | planning=True |
| 🔍 | ディープリサーチ — 複数ステップの自律的な調査 | ドキュメント |
| 🤖 | 外部エージェント — Claude Code、Gemini CLI、Codex をオーケストレーション | ドキュメント |
| 🔄 | エージェントの引き継ぎ — シームレスな会話の受け渡し | handoffs=[other_agent] |
| 🛡️ | ガードレール — 入力/出力の検証 | ドキュメント |
| ウェブ検索 + 取得 — ネイティブなブラウジング | web=True | |
| 🪞 | 自己リフレクション — エージェントが自身の出力を確認 | ドキュメント |
| 🔀 | ワークフローパターン — ルーティング、並列、ループ、繰り返し | ドキュメント |
| 🧠 | メモリ(依存関係ゼロ) — すぐに利用可能 | memory=True |
25 の機能をすべて表示
| 機能 | 方法 | |
|---|---|---|
| 💡 | プロンプトキャッシュ — レイテンシとコストを削減 | caching=True |
| 💾 | セッション + 自動保存 — 再起動後も状態を保持 | auto_save="my-project" |
| 💭 | 思考予算 — 推論の深さを制御 | agent.thinking_budget = 1024 |
| 📚 | RAG + 品質ベースの RAG — 品質スコアに基づく自動検索 | ドキュメント |
| 📊 | モデルルーター — 能力を満たす最も安価なモデルへ自動ルーティング | ドキュメント |
| 🧊 | Shadow Git チェックポイント — 失敗時に自動ロールバック | ドキュメント |
| 📡 | A2A プロトコル — エージェント間の相互運用 | ドキュメント |
| 📏 | コンテキストの圧縮 — トークン上限に達しない | ドキュメント |
| 📡 | テレメトリ — OpenTelemetry のトレース、スパン、メトリクス | ドキュメント |
| 📜 | ポリシーエンジン — 宣言型のエージェント動作制御 | ドキュメント |
| 🔄 | バックグラウンドタスク — 実行を開始し、完了を待たないエージェント | ドキュメント |
| 🔁 | 無限ループ検出 — 停滞したエージェントを自動復旧 | ドキュメント |
| 🕸️ | グラフメモリ — Neo4j のような関係性の追跡 | ドキュメント |
| 🏖️ | サンドボックス実行 — 分離されたコード実行 | ドキュメント |
| 🖥️ | ボットゲートウェイ — チャネルをまたぐマルチエージェントのルーティング | ドキュメント |
📘 Python コードの使用
結果がバグなのか、モデルのランダム性によるものなのか分からない場合は、
stream、メモリの事前取得、構造化出力、チーム、AG-UI について記載された SDK 動作マトリックスを確認してください。
1. 単一エージェント
from praisonaiagents import Agent
agent = Agent(instructions="You are a helpful AI assistant")
agent.start("Write a movie script about a robot in Mars")
2. 複数エージェント
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()
3. MCP(Model Context Protocol)
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"}
)
)
📖 MCP の全ドキュメント — stdio、HTTP、WebSocket、SSE トランスポート
4. カスタムツール
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:
"""Safely evaluate a numeric arithmetic expression."""
import ast
import operator
# Define allowed operations
_OPS = {
ast.Add: operator.add,
ast.Sub: operator.sub,
ast.Mult: operator.mul,
ast.Div: operator.truediv,
ast.Pow: operator.pow,
ast.USub: operator.neg,
ast.UAdd: operator.pos,
}
def _safe_eval(node):
if isinstance(node, ast.Constant) and isinstance(node.value, (int, float)):
return node.value
elif isinstance(node, ast.BinOp) and type(node.op) in _OPS:
return _OPS[type(node.op)](_safe_eval(node.left), _safe_eval(node.right))
elif isinstance(node, ast.UnaryOp) and type(node.op) in _OPS:
return _OPS[type(node.op)](_safe_eval(node.operand))
else:
raise ValueError("Unsupported expression")
try:
return _safe_eval(ast.parse(expression, mode="eval").body)
except (ValueError, SyntaxError, TypeError, ZeroDivisionError, OverflowError):
raise ValueError("Invalid arithmetic expression")
agent = Agent(
instructions="You are a helpful assistant",
tools=[search, calculate]
)
agent.start("Search for AI news and calculate 15*4")
⚠️ セキュリティに関する注意: LLM が生成した入力やユーザーが提供した入力を処理するツール関数では、
eval()、exec()、subprocessを絶対に使用しないでください。コードインジェクション攻撃を防ぐため、必ず入力を検証し、サニタイズしてください。 📖 ツールの全ドキュメント — BaseTool、ツールパッケージ、100 種類以上の組み込みツール
5. 永続化(データベース)
from praisonaiagents import Agent, db
agent = Agent(
name="Assistant",
memory={
"db": db(database_url="postgresql://localhost/mydb"),
"session_id": "my-session",
},
)
agent.chat("Hello!") # Auto-persists messages, runs, traces
📖 永続化の全ドキュメント — PostgreSQL、MySQL、SQLite、MongoDB、Redis など、20 種類以上
6. PraisonAI Claw 🦞(ダッシュボード UI)
AI エージェントを Telegram、Discord、Slack、WhatsApp などに、単一のコマンドで接続できます。
pip install "praisonai[claw]"
praisonai claw
必須の環境変数
.env.example を .env にコピーし、以下の変数を設定します。
| 変数 | 必須 | 説明 |
|---|---|---|
OPENAI_API_KEY | はい | すべての LLM 呼び出しに使用する OpenAI API キー |
TAVILY_API_KEY | はい(Claw) | 組み込みのウェブ検索ツール用の Tavily キーです。https://app.tavily.com で無料のキーを取得できます |
http://localhost:8082 を開くと、13 個の組み込みページ(Chat、Agents、Memory、Knowledge、Channels、Guardrails、Cron など)を備えたダッシュボードが表示されます。メッセージングチャネルは UI から直接追加できます。
📖 Claw の全ドキュメント — プラットフォームのトークン、CLI オプション、Docker、YAML エージェントモード
7. Langflow 連携 🔗(ビジュアルフロービルダー)
Langflow のコンポーネントを ドラッグ&ドロップ して、マルチエージェントのワークフローを視覚的に構築できます。
pip install "praisonai[flow]"
praisonai flow
http://localhost:7861 を開き、Agent および Agent Team コンポーネントを使って、順次または並列のワークフローを作成します。Chat Input → Agent Team → Chat Output を接続すると、マルチエージェントのパイプラインをすぐに利用できます。
📖 Flow の全ドキュメント — ビジュアルエージェントの構築、コンポーネントリファレンス、デプロイ
8. PraisonAI UI 🤖(シンプルなチャット)
AI エージェント向けの軽量なチャットインターフェースです。
pip install "praisonai[ui]"
praisonai ui
📄 YAML を使用する(コード不要)
例 1:2 つのエージェントが連携して動作する
agents.yaml を作成します。
framework: praisonai
topic: "Write a blog post about AI"
agents:
researcher:
role: Research Analyst
goal: Research AI trends and gather information
instructions: "Find accurate information about AI trends"
writer:
role: Content Writer
goal: Write engaging blog posts
instructions: "Write clear, engaging content based on research"
次のコマンドで実行します。
praisonai agents.yaml
エージェントは自動的に順次連携して動作します
例 2:カスタムツールを使うエージェント
同じフォルダー内に次の 2 つのファイルを作成します。
agents.yaml:
framework: praisonai
topic: "Calculate the sum of 25 and 15"
agents:
calculator_agent:
role: Calculator
goal: Perform calculations
instructions: "Use the add_numbers tool to help with calculations"
tools:
- add_numbers
tools.py:
def add_numbers(a: float, b: float) -> float:
"""
Add two numbers together.
Args:
a: First number
b: Second number
Returns:
The sum of a and b
"""
return a + b
次のコマンドで実行します。
praisonai agents.yaml
💡 ヒント:
- ツールのリストには、ファイル名ではなく関数名(例:
add_numbers)を指定しますtools.py内のツールは自動的に検出されます- 関数の docstring は、AI がその使い方を理解するのに役立ちます
🎯 CLI クイックリファレンス
| カテゴリー | コマンド |
|---|---|
| 実行 | praisonai、--auto、--interactive、--chat |
| 調査 | research、--query-rewrite、--deep-research |
| 計画 | --planning、--planning-tools、--planning-reasoning |
| ワークフロー | workflow run、workflow list、workflow auto |
| メモリ | memory show、memory add、memory search、memory clear |
| ナレッジ | knowledge add、knowledge query、knowledge list |
| セッション | session list、session resume、session delete |
| ツール | tools list、tools info、tools search |
| MCP | mcp list、mcp create、mcp enable |
| 開発 | commit、docs、checkpoint、hooks |
| スケジュール設定 | schedule start、schedule list、schedule stop |
✨ 主な機能
🤖 コアエージェント
| 機能 | コード | ドキュメント |
|---|---|---|
| 単一エージェント | 例 | 📖 |
| 複数エージェント | 例 | 📖 |
| 自動エージェント | 例 | 📖 |
| 自己省察型 AI エージェント | 例 | 📖 |
| 推論型 AI エージェント | 例 | 📖 |
| マルチモーダル AI エージェント | 例 | 📖 |
🔄 ワークフロー
| 機能 | コード | ドキュメント | |---------|:----:|:----:| | シンプルなワークフロー | [例](examples/python/workflows/simple_workflow.py) | [📖](https://docs.praison.ai/docs/concepts/agentflow) | | エージェントを含むワークフロー | [例](examples/python/workflows/workflow_with_agents.py) | [📖](https://docs.praison.ai/docs/concepts/agentflow) | | エージェントによるルーティング(`route()`) | [例](examples/python/workflows/workflow_routing.py) | [📖](https://docs.praison.ai/docs/features/routing) | | 並列実行(`parallel()`) | [例](examples/python/workflows/workflow_parallel.py) | [📖](https://docs.praison.ai/docs/features/parallelisation) | | リスト/CSV のループ(`loop()`) | [例](examples/python/workflows/workflow_loop_csv.py) | [📖](https://docs.praison.ai/docs/features/repetitive) | | 評価器と最適化器(`repeat()`) | [例](examples/python/workflows/workflow_repeat.py) | [📖](https://docs.praison.ai/docs/concepts/evaluation) | | 条件付きステップ | [例](examples/python/workflows/workflow_conditional.py) | [📖](https://docs.praison.ai/docs/concepts/agentflow) | | ワークフローの分岐 | [例](examples/python/workflows/workflow_branching.py) | [📖](https://docs.praison.ai/docs/concepts/agentflow) | | ワークフローの早期停止 | [例](examples/python/workflows/workflow_early_stop.py) | [📖](https://docs.praison.ai/docs/concepts/agentflow) | | ワークフローのチェックポイント | [例](examples/python/workflows/workflow_checkpoints.py) | [📖](https://docs.praison.ai/docs/concepts/agentflow) |💻 コードと開発
| 機能 | コード | ドキュメント |
|---|---|---|
| コードインタープリターエージェント | 例 | 📖 |
| AI コード編集ツール | 例 | 📖 |
| 外部エージェント(すべて) | 例 | 📖 |
| Claude Code CLI | 例 | 📖 |
| Gemini CLI | 例 | 📖 |
| Codex CLI | 例 | 📖 |
| Cursor CLI | 例 | 📖 |
🧠 メモリとナレッジ
| 機能 | コード | ドキュメント | |---------|:----:|:----:| | メモリ(短期・長期) | [Example](examples/python/general/memory_example.py) | [📖](https://docs.praison.ai/docs/concepts/memory) | | ファイルベースのメモリ | [Example](examples/python/general/memory_example.py) | [📖](https://docs.praison.ai/docs/concepts/memory) | | Claude メモリツール | [Example](examples/python/memory/claude_memory_example.py) | [📖](https://docs.praison.ai/docs/features/claude-memory-tool) | | カスタムナレッジの追加 | [Example](examples/python/concepts/knowledge-agents.py) | [📖](https://docs.praison.ai/docs/concepts/knowledge) | | RAG エージェント | [Example](examples/python/concepts/rag-agents.py) | [📖](https://docs.praison.ai/docs/concepts/rag) | | PDF とチャットするエージェント | [Example](examples/python/concepts/chat-with-pdf.py) | [📖](https://docs.praison.ai/docs/features/chat-with-pdf) | | データリーダー(PDF、DOCX など) | [CLI](https://docs.praison.ai/docs/cli/knowledge) | [📖](https://docs.praison.ai/docs/features/chunking-strategies) | | ベクトルストアの選択 | [CLI](https://docs.praison.ai/docs/cli/knowledge) | [📖](https://docs.praison.ai/docs/features/knowledge-backends) | | 検索戦略 | [CLI](https://docs.praison.ai/docs/cli/knowledge) | [📖](https://docs.praison.ai/docs/features/retrieval-strategies) | | リランカー | [CLI](https://docs.praison.ai/docs/cli/knowledge) | [📖](https://docs.praison.ai/docs/features/smart-retrieval) | | インデックスの種類(ベクトル/キーワード/ハイブリッド) | [CLI](https://docs.praison.ai/docs/cli/knowledge) | [📖](https://docs.praison.ai/docs/features/incremental-indexing) | | クエリエンジン(サブクエスチョンなど) | [CLI](https://docs.praison.ai/docs/cli/knowledge) | [📖](https://docs.praison.ai/docs/features/retrieval) |🔬 リサーチとインテリジェンス
| 機能 | コード | ドキュメント |
|---|---|---|
| ディープリサーチエージェント | Example | 📖 |
| クエリリライターエージェント | Example | 📖 |
| ネイティブ Web 検索 | Example | 📖 |
| 組み込み検索ツール | Example | 📖 |
| 統合 Web 検索 | Example | 📖 |
| Web Fetch(Anthropic) | Example | 📖 |
📋 プランニングと実行
| 機能 | コード | ドキュメント |
|---|---|---|
| プランニングモード | Example | 📖 |
| プランニングツール | Example | 📖 |
| プランニング推論 | Example | 📖 |
| プロンプトチェイニング | Example | 📖 |
| エバリュエーター・オプティマイザー | Example | 📖 |
| オーケストレーター・ワーカー | Example | 📖 |
👥 特化型エージェント
| 機能 | コード | ドキュメント | |---------|:----:|:----:| | データアナリストエージェント | [サンプル](examples/python/agents/data-analyst-agent.py) | [📖](https://docs.praison.ai/docs/agents/data-analyst) | | ファイナンスエージェント | [サンプル](examples/python/agents/finance-agent.py) | [📖](https://docs.praison.ai/docs/agents/finance) | | ショッピングエージェント | [サンプル](examples/python/agents/shopping-agent.py) | [📖](https://docs.praison.ai/docs/agents/shopping) | | レコメンデーションエージェント | [サンプル](examples/python/agents/recommendation-agent.py) | [📖](https://docs.praison.ai/docs/agents/recommendation) | | Wikipedia エージェント | [サンプル](examples/python/agents/wikipedia-agent.py) | [📖](https://docs.praison.ai/docs/agents/wikipedia) | | プログラミングエージェント | [サンプル](examples/python/agents/programming-agent.py) | [📖](https://docs.praison.ai/docs/agents/programming) | | 数学エージェント | [サンプル](examples/python/agents/math-agent.py) | [📖](https://docs.praison.ai/docs/features/mathagent) | | Markdown エージェント | [サンプル](examples/python/agents/markdown-agent.py) | [📖](https://docs.praison.ai/docs/agents/markdown) | | プロンプト拡張エージェント | [サンプル](examples/python/agents/prompt-expander-agent.py) | [📖](https://docs.praison.ai/docs/agents/prompt-expander) |🔌 プロトコルと統合
| 機能 | コード | ドキュメント |
|---|---|---|
| MCP トランスポート | サンプル | 📖 |
| WebSocket MCP | サンプル | 📖 |
| MCP セキュリティ | サンプル | 📖 |
| MCP 再開可能性 | サンプル | 📖 |
| MCP 設定管理 | ドキュメント | 📖 |
| LangChain 統合エージェント | サンプル | 📖 |
⚙️ 高度な機能
| Feature | Code | Docs | |---------|:----:|:----:| | Async & Parallel Processing | [Example](examples/python/general/async_example.py) | [📖](https://docs.praison.ai/docs/features/async) | | Parallelisation | [Example](examples/python/general/parallelisation.py) | [📖](https://docs.praison.ai/docs/features/parallelisation) | | Repetitive Agents | [Example](examples/python/concepts/repetitive-agents.py) | [📖](https://docs.praison.ai/docs/features/repetitive) | | Agent Handoffs | [Example](examples/python/handoff/handoff_basic.py) | [📖](https://docs.praison.ai/docs/concepts/handoffs) | | Stateful Agents | [Example](examples/python/stateful/workflow-state-example.py) | [📖](https://docs.praison.ai/docs/features/stateful-agents) | | Autonomous Workflow | [Example](examples/python/general/autonomous-agent.py) | [📖](https://docs.praison.ai/docs/concepts/autonomy) | | Structured Output Agents | [Example](examples/python/general/structured_agents_example.py) | [📖](https://docs.praison.ai/docs/features/structured) | | Model Router | [Example](examples/python/agents/router-agent-cost-optimization.py) | [📖](https://docs.praison.ai/docs/features/model-router) | | Prompt Caching | [Example](examples/python/agents/prompt-caching-agent.py) | [📖](https://docs.praison.ai/docs/features/model-capabilities) | | Fast Context | [Example](examples/context/00_agent_fast_context_basic.py) | [📖](https://docs.praison.ai/docs/features/fast-context) |🛠️ Tools & Configuration
| 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 | 📖 |
📊 Monitoring & Management
| Feature | Code | Docs |
|---|---|---|
| Sessions Management | Example | 📖 |
| Auto-Save Sessions | Docs | 📖 |
| History in Context | Docs | 📖 |
| Telemetry | Example | 📖 |
| Langfuse Tracing | Docs | 📖 |
| Project Docs (.praison/docs/) | Docs | 📖 |
| AI Commit Messages | Docs | 📖 |
| @Mentions in Prompts | Docs | 📖 |
🖥️ CLI Features
| 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 | 📖 |
🧪 Evaluation
| Feature | Code | Docs |
|---|---|---|
| Accuracy Evaluation | Example | 📖 |
| Performance Evaluation | Example | 📖 |
| Reliability Evaluation | Example | 📖 |
| Criteria Evaluation | Example | 📖 |
💻 JavaScript コードの使用
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');
⚡ パフォーマンス
PraisonAI のフレームワークのオーバーヘッドはマイクロ秒単位です。Agent(ツール1つ、LLM 呼び出しなし)の作成にかかった時間は、2026-10-15 の実行で平均 46 μs でした。そのため、マルチエージェントのワークロードでは、エージェントごとのセットアップ時間はモデルのレイテンシーと比べてごくわずかです。
| パフォーマンス指標 | PraisonAI | 測定日 |
|---|---|---|
| エージェントの平均インスタンス化時間(ツール1つ、1000回の反復) | 46 μs | 2026-10-15 · praisonaiagents 1.7.12 |
手法、比較、再現方法:benchmarks/BENCHMARK_RESULTS.md · ドキュメント
⭐ スター履歴
* export TAVILY_API_KEY=xxxxx
🔍 Langfuse トレーシング
pip install "praisonai[langfuse]"
praisonai langfuse
🎓 動画チュートリアル
充実した動画シリーズで PraisonAI について学びましょう。
22 本の動画チュートリアルをすべて表示
👥 貢献
皆さまからの貢献を歓迎します!リポジトリをフォークし、ブランチを作成して、PR を送信してください → 貢献ガイド。
❓ FAQ とトラブルシューティング
ModuleNotFoundError: No module named 'praisonaiagents'
パッケージをインストールしてください:
pip install praisonaiagents
API キーが見つからない/認証エラー
API キーが設定されていることを確認してください:
export OPENAI_API_KEY=your_key_here
その他のプロバイダーについては、モデルのドキュメントをご覧ください。
ローカルモデル(Ollama)を使うにはどうすればよいですか?
# Start Ollama and pull a model
ollama serve
ollama pull llama3.2
from praisonaiagents import Agent
agent = Agent(instructions="You are a helpful assistant", llm="ollama/llama3.2")
agent.start("Why is the sky blue?")
ollama/ プレフィックスによって、Ollama 用の処理が選択されます。ツール呼び出しの修復、ツール結果のフォーマット、小規模なローカルモデルに必要なストリーミングルールが適用されます。環境変数で設定することもできます:
export OPENAI_MODEL_NAME=ollama/llama3.2
OPENAI_BASE_URL だけを設定しても不十分です。モデル名を指定しない場合、OpenAI のデフォルト(gpt-4o-mini)が Ollama に送信され、404 model 'gpt-4o-mini' not found が返されます。必ずモデル名を指定してください。
デフォルト以外のホストを指定するには、base_url= または OLLAMA_HOST を使います:
agent = Agent(instructions="...", llm="ollama/llama3.2", base_url="http://192.168.1.10:11434")
同じ形式は、ほかのローカルランタイムでも使えます。lm_studio/、vllm/、hosted_vllm/ と、それぞれのサーバーの base_url を指定してください。
詳しくは、モデルのドキュメントをご覧ください。
会話をデータベースに保存するにはどうすればよいですか?
db パラメーターを使います:
from praisonaiagents import Agent, db
agent = Agent(
name="Assistant",
memory={
"db": db(database_url="postgresql://localhost/mydb"),
"session_id": "my-session",
},
)
対応データベースについては、永続化のドキュメントをご覧ください。
エージェントのメモリを有効にするにはどうすればよいですか?
from praisonaiagents import Agent
agent = Agent(
name="Assistant",
# Enables file-based memory (no extra deps!)
memory={"user_id": "user123"},
)
その他のオプションについては、メモリのドキュメントをご覧ください。
複数のエージェントを一緒に実行するにはどうすればよいですか?
from praisonaiagents import Agent, Agents
agent1 = Agent(instructions="Research topics")
agent2 = Agent(instructions="Summarize findings")
agents = Agents(agents=[agent1, agent2])
agents.start()
その他の例については、エージェントのドキュメントをご覧ください。
MCP ツールを使うにはどうすればよいですか?
from praisonaiagents import Agent, MCP
agent = Agent(
tools=MCP("npx @modelcontextprotocol/server-memory")
)
すべてのトランスポートオプションについては、MCP のドキュメントをご覧ください。
ヘルプを受ける
PraisonAI チームが ❤️ を込めて作成
📚 ドキュメント • GitHub • ▶️ YouTube • 𝕏 X • 💼 LinkedIn
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。





















