โ† Open Source

Private AI agents for highly regulated teams, and for anyone who wants AI on their own computer. Open-source Python agent framework that runs fully offline.

AI EngineeringPrompt & ScaffoldPython
Momentum
+8stars in 24 hours+0.1%
9.87k
Stars
1.64k
Forks
+139
This week
100
Contributors
Created 2024-03-19 ยท Updated 2026-12-06 ยท #1568 today
Top developers
README

PraisonAI

AI agents that run on your own computers, even fully offline.

2M+ downloads ยท 9.3K stars ยท 600+ releases in the last year ยท 80+ contributors ยท MIT

Private AI (early access)
Private AI that earns trust one task at a time. Each task moves to your own AI only after it passes a test. If quality slips, it moves back automatically, and every step is recorded for regulators. For banks, insurers and hospitals.
How the handover works ยท What's new
Agents
Python agent framework: teams, workflows, memory, tools.
pip install praisonaiagents
Your first agent
Bot
Your agent on Telegram, Discord, Slack and WhatsApp, 24/7.
pip install "praisonai-bot[gateway,bot]"
praisonai-bot onboard
Code
An agent in your terminal that reads and edits your code.
pip install praisonai-code
praisonai-code code
MCP
Your agents and tools inside Cursor, Claude Desktop and other MCP clients.
pip install praisonai-mcp
praisonai-mcp connect cursor
Train
Fine-tune an open model on your own GPUs, and train agents on past runs.
pip install "praisonai-train[llm]"
praisonai-train --help
All of it
CLI, bots, dashboard and integrations in one install.
pip install "praisonai[dashboard]"
praisonai setup


A real run with pip install praisonai: a local Llama 3.2 model through Ollama, with no API key set.

How it fits together

Quick start

Set a key for any supported provider (OpenAI shown here), or skip the key and use a local model as in the next section.

pip install praisonai
export OPENAI_API_KEY="your-api-key"
from praisonai import Agent

agent = Agent(instructions="You are a helpful assistant.")
print(agent.start("In two sentences, why do some companies keep their data on their own computers?"))

Only want the lightweight core? pip install praisonaiagents and write from praisonaiagents import Agent; the rest of the code is the same.

Run fully offline

Run the same agent on a model on your own computer with Ollama. You need no API key, and your prompts and answers stay on the machine.

Install the package and pull the model while you still have internet; after that, the agent runs with no network at all. pip install praisonai includes local-model support; with only the core library, use pip install "praisonaiagents[llm]".

# Start Ollama first (the app, or "ollama serve" in another terminal)
ollama pull llama3.2
export DO_NOT_TRACK=true   # keeps telemetry off (PraisonAI sends none unless you turn it on)
from praisonai import Agent

agent = Agent(instructions="You are a helpful assistant.", model="ollama/llama3.2")
print(agent.start("Why is the sky blue?"))

If Ollama runs on another computer on your network, pass base_url (or set OLLAMA_API_BASE):

agent = Agent(instructions="...", model="ollama/llama3.2", base_url="http://192.168.1.10:11434")

vLLM and LM Studio work the same way: use hosted_vllm/ (vLLM) or lm_studio/ with your server's base_url. More in the Ollama guide and Models docs.

What you can build


Bots
Telegram, Discord, Slack and WhatsApp, with memory. Gateway

Dashboard
Chat, agents, memory, knowledge and channels in one app.

Your agents in Cursor
praisonai-mcp connect cursor: 85 tools, one command. A real run.
Multi-agent teams
Handoffs, route, parallel, loop and repeat.
Memory and RAG
Memory, knowledge and sessions, with zero extra deps to start.
Tools and MCP
Your own @tool or any MCP server.
Coding agent
praisonai code, run and chat in your terminal.
Browser automation
An agent that uses websites for you.
Sandboxes
Run tools in Docker, E2B, Modal and more.
Fine-tuning
Train an open model on your own past work.
YAML, no code
Agents and workflows from one file.
Deploy
Ship agents as APIs or to the cloud.

Open Products โ€” Built directly on PraisonAI with zero duplicated code: PraisonAI Ship (OpenShip) โ€” open-source PR shipping, self-review, PR Steward, and declarative .praisonai/approvals.yml on any LLM or local Ollama (draft PRs only; never merges). Browse all products/.

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 The question it answers PraisonAI
1 ยท Prompt Did I say it clearly? instructions=, role/goal/backstory, output=, templates=
2 ยท Context Is the right thing in the window? memory=, knowledge=, context=, handoff ContextPolicy
3 ยท Harness Can it act, and be checked? tools=, MCP(), guardrails=, approval=, hooks=, sandbox=
4 ยท Loop When do we stop? execution=ExecutionConfig(...), reflection=, autonomy=, doom-loop detection
5 ยท Graph Who runs when, and who checks whom? AgentFlow, route(), parallel(), loop(), repeat()
โฌก Managed Where does it actually run? tools_run_on="docker" โ€” one shared sandbox for the tools, or run_on="anthropic" for the whole agent
Show an example for each layer, and Managed Agents

Layer 1 ยท Prompt โ€” Did I say it clearly?

Role, instructions, examples, output format.

from praisonai 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")

Layer 2 ยท Context โ€” Is the right thing in the window?

Write, select, compress, isolate โ€” the four context operations, one parameter each.

from praisonai 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
)

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.

from praisonai 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")

Layer 4 ยท Loop โ€” When do we stop?

Hard iteration caps, budget ceilings, no-progress detection and completion checks โ€” every brake is explicit.

from praisonai 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")

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.

from praisonai import AgentFlow
from praisonai 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")

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.

pip install praisonai

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:

from praisonai 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")

Same thing with no Python at all:

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"

For a single agent, two words cover it โ€” and they answer different questions:

from praisonai 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")

Ask any object where it runs, and it will tell you:

>>> 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.

Naming a place that cannot do the job is a typo, not a preference, so it says so:

>>> 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')

To run one block of code somewhere else, name the place on that call:

agent.execute_code_sync("print(6 * 7)", run_in="sandlock")   # kernel-enforced

See what is running and reclaim strays:

praisonai managed ps          # list running sandboxes
praisonai managed stop --all  # reclaim them

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> or praisonai managed sessions resume <session-id> "<prompt>"

Stack framing adapted from The Five-Layer Agent Stack and Agent Harnesses vs Orbs.

How the main features work

Multi-agent patterns. One AgentFlow, seven ways to run its steps. Docs

Agent teams. One AgentTeam, three ways to run the same tasks: in order, under a manager agent, or as a workflow. Docs

PraisonAI Ship (OpenShip). From feature branch to reviewed, CI-green draft PR on any LLM or local Ollama, while you keep the merge. Quickstart ยท Docs

One agent turn. What happens between your prompt and the answer, and what stops it. Docs

Bot gateway. Ten channels in, one agent, team or flow behind them. Docs

MCP both ways. Your agents use MCP servers, and your editor uses your agents. Docs

How the handover works (early access)

  1. Watch: records how each task is done today.
  2. Test: your own AI takes an exam made from real past work it never studied.
  3. Hand over: a task moves to your own AI only when it passes.
  4. Roll back: if quality drops, the task moves back automatically.
  5. Record: every handover leaves a record your regulator can check.


An illustration with example tasks, not customer data.

What is "your own AI"? An open model, such as Llama, Qwen or Gemma, running on your own computers. Use it as it is, or train it on your own past work with PraisonAI Train on your own GPU servers. Your team decides when to train; nothing trains automatically. Either way, a task moves to it only after it passes that exam.

Why now. Highly regulated teams, such as banks, insurers and hospitals, want AI but can't send customer data to outside models. The largest banks built private AI in-house; most mid-size banks and insurers can't fund a team to do that. From 6 January 2027, OpenAI also takes no new self-serve fine-tuning jobs (notice), so teams that customise models need models they own.

The handover is built on parts of this framework that are live today: tracing, evaluation, fine-tuning, model routing and local models. It is in early access, and we are taking on our first design partners. The framework stays free and MIT-licensed. Design partners, investors and press: enterprise@praison.ai or praison.ai/enterprise.

JavaScript and TypeScript

npm install praisonai

The TypeScript and JavaScript SDK has its own guide at praison.ai/docs/js.

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');

Install

Desktop app

ย ย  ย ย 

Other ways to install

One-line installer:

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

The full praisonai package, with the CLI and integrations. Add the [dashboard] extra for bots and the dashboard (pip install "praisonai[dashboard]"):

 โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—
 โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•‘    โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘
 โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘
 โ–ˆโ–ˆโ•”โ•โ•โ•โ• โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ•šโ•โ•โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘    โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘
 โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•‘    โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘
 โ•šโ•โ•     โ•šโ•โ•  โ•šโ•โ•โ•šโ•โ•  โ•šโ•โ•โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•  โ•šโ•โ•โ•โ•    โ•šโ•โ•  โ•šโ•โ•โ•šโ•โ•

 pip install praisonai

Docs, community and licence


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
  • ๐Ÿฆ… PraisonAI Dashboard: Chat, agents, memory and knowledge, and connect agents to Telegram, Slack, or Discord. pip install "praisonai[dashboard]"
  • ๐Ÿ”— Flow Visual Builder: Drag-and-drop workflow creation. pip install "praisonai[flow]"
  • ๐Ÿค– PraisonAI UI: Chat with a canvas for the tables and code your agents write. pip install "praisonai[ui]"

JavaScript SDK

npm install praisonai

Supported Providers & Features

Powered by 100+ LLMs (OpenAI, Anthropic, Gemini & local models).

View all 24 providers with examples
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

Why PraisonAI?

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 handoffs=[other_agent]
๐Ÿ›ก๏ธ Guardrails โ€” input/output validation Docs
Web Search + Fetch โ€” native browsing web=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
View all 25 features
Feature How
๐Ÿ’ก Prompt Caching โ€” reduce latency + cost caching=True
๐Ÿ’พ Sessions + Auto-Save โ€” persistent state across restarts auto_save="my-project"
๐Ÿ’ญ Thinking Budgets โ€” control reasoning depth agent.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

Using Python Code

Show Python examples: single agent, multi-agent, MCP, tools, databases, Claw, Langflow, UI

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

from praisonai import Agent
agent = Agent(instructions="You are a helpful AI assistant")
agent.start("Write a movie script about a robot in Mars")

2. Multi Agents

from praisonai 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 praisonai 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

4. Custom Tools

from praisonai 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")

โš ๏ธ Security Note: Never use eval(), exec(), or subprocess in 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)

from praisonai 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

๐Ÿ“– Full persistence docs โ€” PostgreSQL, MySQL, SQLite, MongoDB, Redis, and 20+ more

6. PraisonAI Dashboard

Connect your AI agents to Telegram, Discord, Slack, WhatsApp and more โ€” all from a single command.

pip install "praisonai[dashboard]"   # or: "praisonai[claw]" (the same extra)
praisonai dashboard                 # or: praisonai claw (the same app)

Required Environment Variables

Copy .env.example to .env and configure the following variables:

Variable Required Description
OPENAI_API_KEY Yes OpenAI API key for all LLM calls
TAVILY_API_KEY Yes (Dashboard) Tavily key for the built-in web-search tool. Get one free at https://app.tavily.com

Open http://localhost:8082 โ€” the dashboard opens in Chat + Canvas: the chat on the left, and the tables, code and files your agents write on a canvas beside it (sort, copy, download, compare versions). Every other page (Agents, Memory, Knowledge, Channels, Guardrails, Cron, and more) is in the sidebar or the command palette (โŒ˜K). Add messaging channels directly from the UI.

๐Ÿ“– Full Dashboard 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.

pip install "praisonai[flow]"
praisonai flow

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 (Chat + Canvas)

Chat with your AI agents; the tables and code they write open on a canvas beside the chat.

pip install "praisonai[ui]"
praisonai ui            # chat           โ†’ http://localhost:8081
praisonai ui agents     # YAML agents
praisonai ui bot        # bot interface
praisonai ui realtime   # realtime voice

  • Welcome: each app greets you in the new-chat hero, in every layout. Set the text with UIPreset(welcome=...) or your own @aiui.welcome handler.
  • Layout: Chat + Canvas by default. Pick another for one run with AIUI_LAYOUT=chat (no canvas), workbench, command, guided or mission, or switch from the command palette (โŒ˜K).
  • Look: light and dark follow the toggle in the top bar; โŒ˜K โ†’ Switch look: Pro swaps the Paper look for the plain one.
  • Stop: the Stop button cancels the agent's reply. A reply that sends nothing for 10 minutes is cancelled too (AIUI_REPLY_IDLE_TIMEOUT, in seconds; 0 turns it off).
  • Uploads: request bodies are capped at 25 MiB (AIUI_MAX_BODY_MB; 0 turns it off).
  • Data: chat history is saved by PraisonAI under ~/.praisonai/sessions (set PRAISONAI_HOME to move it); the UI's own settings live in ~/.praisonaiui (set AIUI_DATA_DIR to move them). To keep both on a mounted volume, set both variables.
  • An existing ~/.praisonai/claw/app.py from an older install keeps aiui's own default layout (Chat, no canvas) and has no welcome greeting; delete it to get the new default app, or add layout="chat-canvas" to its configure_host(...) call.

Using YAML (No Code)

Show YAML examples

Example 1: Two Agents Working Together

Create 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"

Run with:

praisonai agents.yaml

The agents automatically work together sequentially

Example 2: Agent with Custom Tool

Create two files in the same folder:

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

Run with:

praisonai agents.yaml

๐Ÿ’ก Tips:

  • Use the function name (e.g., add_numbers) in the tools list, not the file name
  • Tools in tools.py are automatically discovered
  • The function's docstring helps the AI understand how to use it

CLI Quick Reference

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


Key Features

Show all features by category
๐Ÿค– Core Agents
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 ๐Ÿ“–
๐Ÿ”„ Workflows
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 ๐Ÿ“–
๐Ÿ’ป Code & Development
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 ๐Ÿ“–
๐Ÿง  Memory & Knowledge
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 ๐Ÿ“–
๐Ÿ”ฌ Research & Intelligence
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 ๐Ÿ“–
๐Ÿ“‹ Planning & Execution
Feature Code Docs
Planning Mode Example ๐Ÿ“–
Planning Tools Example ๐Ÿ“–
Planning Reasoning Example ๐Ÿ“–
Prompt Chaining Example ๐Ÿ“–
Evaluator Optimiser Example ๐Ÿ“–
Orchestrator Workers Example ๐Ÿ“–
๐Ÿ‘ฅ Specialized Agents
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 ๐Ÿ“–
๐ŸŽจ Media & Multimodal
Feature Code Docs
Image Generation Agent Example ๐Ÿ“–
Image to Text Agent Example ๐Ÿ“–
Video Agent Example ๐Ÿ“–
Camera Integration Example ๐Ÿ“–
๐Ÿ”Œ Protocols & Integration
Feature Code Docs
MCP Transports Example ๐Ÿ“–
WebSocket MCP Example ๐Ÿ“–
MCP Security Example ๐Ÿ“–
MCP Resumability Example ๐Ÿ“–
MCP Config Management Docs ๐Ÿ“–
LangChain Integrated Agents Example ๐Ÿ“–
๐Ÿ›ก๏ธ Safety & Control
Feature Code Docs
Guardrails Example ๐Ÿ“–
Human Approval Example ๐Ÿ“–
Rules & Instructions Docs ๐Ÿ“–
โš™๏ธ Advanced Features
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 ๐Ÿ“–
๐Ÿ› ๏ธ 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 ๐Ÿ“–
๐ŸŽฏ Agent Skills
Feature Code Docs
Skills Management Example ๐Ÿ“–
Custom Skills Example ๐Ÿ“–
โฐ 24/7 Scheduling
Feature Code Docs
Agent Scheduler Example ๐Ÿ“–

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.

Performance Metric PraisonAI Measured
Avg Agent instantiation (1 tool, 1000 iterations) 46 ฮผs 2026-10-15 ยท praisonaiagents 1.7.12

Methodology, comparisons and how to reproduce: benchmarks/BENCHMARK_RESULTS.md ยท docs



Langfuse Tracing

pip install "praisonai[langfuse]"
praisonai langfuse


Video Tutorials

Learn PraisonAI through our comprehensive video series:

View all 22 video tutorials
Topic Video
AI Agents with Self Reflection
Reasoning Data Generating Agent
AI Agents with Reasoning
Multimodal AI Agents
AI Agents Workflow
Async AI Agents
Mini AI Agents
AI Agents with Memory
Repetitive Agents
Introduction
Tools Overview
Custom Tools
Firecrawl Integration
User Interface
Crawl4AI Integration
Chat Interface
Code Interface
Mem0 Integration
Training
Realtime Voice Interface
Call Interface
Reasoning Extract Agents

Contributing

We welcome contributions! Fork the repo, create a branch, and submit a PR โ†’ Contributing Guide.


FAQ & Troubleshooting

Show FAQ and troubleshooting
ModuleNotFoundError: No module named 'praisonai'

Install the package:

pip install praisonai

Using only the core library? pip install praisonaiagents and import from praisonaiagents instead.

API key not found / Authentication error

Ensure your API key is set:

export OPENAI_API_KEY=your_key_here

For other providers, see Models docs.

How do I use a local model (Ollama)?
# Start Ollama and pull a model
ollama serve
ollama pull llama3.2
from praisonai import Agent

agent = Agent(instructions="You are a helpful assistant", llm="ollama/llama3.2")
agent.start("Why is the sky blue?")

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:

export OPENAI_MODEL_NAME=ollama/llama3.2

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:

agent = Agent(instructions="...", llm="ollama/llama3.2", base_url="http://192.168.1.10:11434")

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:

from praisonai import Agent, db

agent = Agent(
    name="Assistant",
    memory={
        "db": db(database_url="postgresql://localhost/mydb"),
        "session_id": "my-session",
    },
)

See Persistence docs for supported databases.

How do I enable agent memory?
from praisonai import Agent

agent = Agent(
    name="Assistant",
    # Enables file-based memory (no extra deps!)
    memory={"user_id": "user123"},
)

See Memory docs for more options.

How do I run multiple agents together?
from praisonai 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.

How do I use MCP tools?
from praisonai import Agent, MCP

agent = Agent(
    tools=MCP("npx @modelcontextprotocol/server-memory")
)

See MCP docs for all transport options.

Getting Help


Made with โค๏ธ by the PraisonAI Team

๐Ÿ“š Documentation โ€ข GitHub โ€ข โ–ถ๏ธ YouTube โ€ข ๐• X โ€ข ๐Ÿ’ผ LinkedIn


What's new

What's new What it is
Six products, one framework Bot, Code, MCP and Train now install on their own: pip install praisonai-bot, praisonai-code, praisonai-mcp, praisonai-train. pip install praisonai still installs everything.
praisonai connect One command puts your agents and 85 tools in 22 MCP clients: Cursor, VS Code, Claude Desktop, Claude Code, Codex, Zed and more.
Replay Record any agent run, then replay it step by step, rerun from a node, or export it to HTML, Mermaid or OpenTelemetry.
Dashboard Chat + Canvas, a microphone in the composer, and a Connect page for MCP clients. pip install "praisonai[dashboard]"
v4.8.0 A security hardening release. 608 releases in the last 12 months.

Star History

Nearby in the ranking
Similar items

AI Rank for iPhone

Follow AI model rankings

Download on the App Store