mcpField
P
PraisonAI

PraisonAI

ローカル
github.com/MervinPraisonAI・エージェント9.3k今日更新

PraisonAI について

PraisonAI は自己反省機能と MCP サポートを備えた AI エージェントフレームワークです。自律型エージェント、マルチエージェントチーム、ワークフローを構築する Python 開発者向けで、コアSDKは pip でインストールできます。

主な機能

  1. 01stdio、HTTP、WebSocket、SSE による MCP() 接続
  2. 02計画・実行・推論を行うプランニングモード
  3. 03専門サブエージェントへのハンドオフ
  4. 04エージェント制御のためのガードレール、承認、フック
  5. 05route、parallel、loop、repeat のワークフローパターン
  6. 06Docker や E2B などのサンドボックスでのツール実行

活用シーン

  1. 01調査、コーディング、データ処理向けのマルチエージェントワークフローの構築
  2. 02Telegram、Discord、Slack 上でのサポートエージェントの運用
  3. 03Claude Code や Gemini CLI などの外部エージェントのオーケストレーション

MCP 対応

MCP() を通じて MCP サーバーをツールとしてエージェントに接続し、stdio、HTTP、WebSocket、SSE のトランスポートに対応します。

設定

ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。

mcp.json · 共通設定
{
"mcpServers": {
"mervinpraison-praisonai": {
"command": "uvx",
"args": [
"praisonai"
]
}
}
}
起動コマンドuvx praisonai

ローカルサーバーにはマシン上の実行環境(Node.js 18 以上など)が必要です。設定ファイルの場所はクライアントごとに異なります。

パッケージ
pypipraisonai2.3.42

ツール

ツール一覧はまだ取得されていません

ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。

詳細

PraisonAI ロゴ

合計ダウンロード数 最新の安定版 ライセンス

PraisonAI 🦞

MervinPraison%2FPraisonAI | Trendshift

PraisonAI 🦞 — 24 時間 365 日稼働する AI ワークフォースを採用しましょう。 定型コードを書くのはやめて、アプリ間で調査、計画、タスク実行を行う、自律的で自己改善するエージェントをリリースしましょう。1 つのエージェントから組織全体まで、5 行のコードでデプロイできます。

curl -fsSL https://praison.ai/install.sh | bash

イーロン・マスクに取り上げられました

macOS 版をダウンロード    Windows 版をダウンロード    Linux 版をダウンロード

PraisonAI ダッシュボード

 ██████╗ ██████╗  █████╗ ██╗███████╗ ██████╗ ███╗   ██╗     █████╗ ██╗
 ██╔══██╗██╔══██╗██╔══██╗██║██╔════╝██╔═══██╗████╗  ██║    ██╔══██╗██║
 ██████╔╝██████╔╝███████║██║███████╗██║   ██║██╔██╗ ██║    ███████║██║
 ██╔═══╝ ██╔══██╗██╔══██║██║╚════██║██║   ██║██║╚██╗██║    ██╔══██║██║
 ██║     ██║  ██║██║  ██║██║███████║╚██████╔╝██║ ╚████║    ██║  ██║██║
 ╚═╝     ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝╚══════╝ ╚═════╝ ╚═╝  ╚═══╝    ╚═╝  ╚═╝╚═╝

 pip install praisonai

🎯 ユースケース

さまざまな業界の現実世界の課題を解決する AI エージェント:

ユースケース説明
🔍 調査と分析複数の情報源から詳細な調査を行い、情報を収集し、インサイトを自動で生成します
💻 コード生成コードベースと要件を理解する AI エージェントを使って、コードの作成、デバッグ、リファクタリングを行います
✍️ コンテンツ作成マルチエージェントチームでブログ記事、ドキュメント、マーケティングコピー、技術文書を生成します
📊 データパイプラインAPI、データベース、Web ソースからデータを自動で抽出、変換、分析します
🤖 カスタマーサポートメモリを備え、ナレッジに基づく回答を提供する 24 時間 365 日対応のサポートボットを Telegram、Discord、Slack にデプロイします
⚙️ ワークフロー自動化タスクを引き継ぎ、結果を検証し、自ら修正するエージェントで、複数ステップにわたるビジネスプロセスを自動化します

🚀 最初のエージェントを動かす(1 分以内)

  1. 軽量なコア SDK をインストールします:
pip install praisonaiagents
export OPENAI_API_KEY="your-api-key"
  1. 最初の自律エージェントを実行します:
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、ローカルモデル)を利用できます。

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
プロバイダー例
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例
Elon Musk が注目

「Grok 3 カスタマーサポート」 — Elon Musk が PraisonAI のチュートリアルを引用



🌟 PraisonAI を選ぶ理由

機能方法
🔌MCP プロトコル — stdio、HTTP、WebSocket、SSEtools=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
MCPmcp list、mcp create、mcp enable
開発commit、docs、checkpoint、hooks
スケジュール設定schedule start、schedule list、schedule stop

📖 CLI の全リファレンス


✨ 主な機能

🤖 コアエージェント
機能コードドキュメント
単一エージェント例📖
複数エージェント例📖
自動エージェント例📖
自己省察型 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
FeatureCodeDocs
100+ Custom ToolsExample📖
YAML ConfigurationExample📖
100+ LLM SupportExample📖
Callback AgentsExample📖
HooksExample📖
Middleware SystemExample📖
Configurable ModelExample📖
Rate LimiterExample📖
Injected Tool StateExample📖
Shadow Git CheckpointsExample📖
Background TasksExample📖
Policy EngineExample📖
Thinking BudgetsExample📖
Output StylesExample📖
Context CompactionExample📖
📊 Monitoring & Management
FeatureCodeDocs
Sessions ManagementExample📖
Auto-Save SessionsDocs📖
History in ContextDocs📖
TelemetryExample📖
Langfuse TracingDocs📖
Project Docs (.praison/docs/)Docs📖
AI Commit MessagesDocs📖
@Mentions in PromptsDocs📖
🖥️ CLI Features
FeatureCodeDocs
Slash CommandsExample📖
Autonomy ModesExample📖
Cost TrackingExample📖
Repository MapExample📖
Interactive TUIExample📖
Git IntegrationExample📖
Sandbox ExecutionExample📖
CLI CompareExample📖
Profile/BenchmarkDocs📖
Auto ModeDocs📖
InitDocs📖
File InputDocs📖
Final AgentDocs📖
Max TokensDocs📖
🧪 Evaluation
FeatureCodeDocs
Accuracy EvaluationExample📖
Performance EvaluationExample📖
Reliability EvaluationExample📖
Criteria EvaluationExample📖
🎯 Agent Skills
FeatureCodeDocs
Skills ManagementExample📖
Custom SkillsExample📖
⏰ 24時間365日のスケジューリング
機能コードドキュメント
エージェントスケジューラー例📖

💻 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 μs2026-10-15 · praisonaiagents 1.7.12

手法、比較、再現方法:benchmarks/BENCHMARK_RESULTS.md · ドキュメント



⭐ スター履歴

スター履歴チャート


PraisonAI AgentFlow

PraisonAI コマンド実行

* export TAVILY_API_KEY=xxxxx

🔍 Langfuse トレーシング

pip install "praisonai[langfuse]"
praisonai langfuse

PraisonAI Langfuse トレーシング


🎓 動画チュートリアル

充実した動画シリーズで PraisonAI について学びましょう。

22 本の動画チュートリアルをすべて表示
トピック動画
自己反省機能を備えた AI エージェント自己反省
推論データ生成エージェント推論データ
推論機能を備えた AI エージェント推論
マルチモーダル AI エージェントマルチモーダル
AI エージェントのワークフローワークフロー
非同期 AI エージェント非同期
ミニ AI エージェントミニ
メモリ機能を備えた AI エージェントメモリ
反復エージェント反復
はじめにはじめに
ツールの概要ツールの概要
カスタムツールカスタムツール
Firecrawl の統合Firecrawl
ユーザーインターフェースUI
Crawl4AI の統合Crawl4AI
チャットインターフェースチャット
コードインターフェースコード
Mem0 の統合Mem0
トレーニングトレーニング
リアルタイム音声インターフェースリアルタイム
通話インターフェース通話
推論抽出エージェント推論抽出

👥 貢献

皆さまからの貢献を歓迎します!リポジトリをフォークし、ブランチを作成して、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

コメント

MCP は初めてですか?

プロトコルの概要から最初のサーバーの導入まで、よくある疑問にまとめて答えます。

AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。