Complete Reference

Comprehensive reference documentation for PraisonAI including all features, diagrams, and examples.

Next

PraisonAI Logo PraisonAI Logo
Total Downloads
GitHub Stars
GitHub Forks
MervinPraison/PraisonAI | Trendshift

Key Features

Install

Code

  1. Install Package
    bash
    pip install praisonaiagents
  2. Set API Key
    bash
    export OPENAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxx
  3. Create File

    Create app.py file

    ## Code Example

    Single Agent
    from praisonaiagents import Agent
    
    agent = Agent(instructions="Your are a helpful AI assistant")
    agent.start("Write a movie script about a robot in Mars")
    Multi Agents
    from praisonaiagents import Agent, AgentTeam
    
    research_agent = Agent(instructions="Research about AI")
    summarise_agent = Agent(instructions="Summarise research agent's findings")
    
    agents = AgentTeam(agents=[research_agent, summarise_agent])
    agents.start()
  4. Run Script
    bash
    python app.py

No Code

  1. Install Package

    Install the No Code PraisonAI Package:

    bash
    pip install praisonaiagents
  2. Set API Key
    bash
    export OPENAI_API_KEY=your_openai_key
  3. Create Config

    Create agents.yaml:

    Single Agent
    agents:  # Canonical
      summarise_agent:
        instructions: Summarise Photosynthesis
    Multiple Agents
    agents:  # Canonical
      diet_agent:
        instructions: Give me 5 healthy food recipes
      blog_agent:
        instructions: Write a blog post about the food recipes
  4. Run Agents

    Execute your config:

    bash
    praisonai agents.yaml

JavaScript

  1. Install Package
    bash
    npm install praisonai
  2. Set API Key
    bash
    export OPENAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxx
  3. Create File

    Create app.js file

    ## Code Example

    Single Agent
    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');
    Multi AgentTeam
    const { Agent, AgentTeam } = require('praisonai');
    
    const researchAgent = new Agent({ instructions: 'Research about AI' });
    const summariseAgent = new Agent({ instructions: 'Summarise research agent\'s findings' });
    
    const agents = new AgentTeam({ agents: [researchAgent, summariseAgent] });
    agents.start();
  4. Run Script
    bash
    node app.js

TypeScript

  1. Install Package
    npm
    npm install praisonai
    yarn
    yarn add praisonai
  2. Set API Key
    bash
    export OPENAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxx
  3. Create File

    Create app.ts file

    ## Code Example

    Single Agent
    import { Agent } from 'praisonai';
    
    const agent = new Agent({ 
      instructions: `You are a creative writer who writes short stories with emojis.`,
      name: "StoryWriter"
    });
    
    agent.start("Write a story about a time traveler")
    Multi AgentTeam
    import { Agent, AgentTeam } from 'praisonai';
    
    const storyAgent = new Agent({
      instructions: "Generate a very short story (2-3 sentences) about artificial intelligence with emojis.",
      name: "StoryAgent"
    });
    
    const summaryAgent = new Agent({
      instructions: "Summarize the provided AI story in one sentence with emojis.",
      name: "SummaryAgent"
    });
    
    const agents = new AgentTeam({
      agents: [storyAgent, summaryAgent]
    });
    
    agents.start()
  4. Run Script
    bash
    npx ts-node app.ts

How Execution Works

PraisonAI offers multiple ways to run AI agents. Choose the approach that fits your use case.

1. Agent Execution

The simplest way to run AI—create an agent and give it a task.

python
from praisonaiagents import Agent

agent = Agent(instructions="You are a helpful assistant")
agent.start("Summarize the latest AI news")
Diagram

Yes

No

User Input

AI Agent

LLM Call

Use Tools?

Execute Tool

Response

Learn more about Agents

Create single agents, configure instructions, add tools, and enable memory.

2. Workflow Execution

For complex tasks, use workflows to chain multiple agents together.

python
from praisonaiagents import Agent, AgentFlow

researcher = Agent(name="Researcher", instructions="Research topics")
writer = Agent(name="Writer", instructions="Write content")

workflow = AgentFlow(steps=[researcher, writer])
result = workflow.start("Write an article about AI trends")
Diagram

Workflow Patterns

Sequential

Parallel

Routing

Loop

Input

Agent 1

Agent 2

Agent 3

Output

Learn more about Workflows

Build multi-step workflows with routing, parallel execution, loops, and conditionals.

3. Agent Recipes

Recipes are pre-built, production-ready AI tools you can run instantly. 55+ recipes available.

bash
# List available recipes
praisonai recipe list

# Run a recipe
praisonai recipe run ai-blog-generator --input '{"topic": "AI trends"}'
Diagram

Recipe Discovery

Custom Recipes

~/.praisonai/templates

Built-in Recipes

Recipe Runner

Validate Input

Execute

JSON Output

Browse Agent Recipes

55+ production-ready AI tools for video, documents, images, code, and more.

4. Custom Tools

Extend agent capabilities by creating custom tools.

python
from praisonaiagents import Agent

def search_web(query: str) -> str:
    """Search the web for information."""
    return f"Results for: {query}"

agent = Agent(
    instructions="You are a research assistant",
    tools=[search_web]
)
agent.start("Find the latest news about Python")
Diagram

Yes

No

Tool Types

Search

File I/O

Database

API Calls

AI Agent

Need External Data?

Select Tool

Execute Tool

Tool Result

Generate Response

Learn more about Tools

Create custom tools, use built-in tools, and integrate with external APIs.


Feature Map

Python SDK (praisonaiagents)

Tools Ecosystem

MCP (Model Context Protocol)

Deploy

JavaScript/TypeScript SDK


CLI at a Glance

bash
# Install CLI
pip install praisonai

# Run an agent with a prompt
praisonai "Summarize the latest AI news"

# Run agents from YAML config
praisonai agents.yaml

# Start interactive mode
praisonai --auto

# Deep research mode
praisonai --deep-research "What are the latest AI trends?"

# List available recipes
praisonai recipe list

# Start agent server
praisonai serve
CommandDescription
praisonai "prompt"Run agent with prompt
praisonai agents.yamlRun from YAML config
praisonai --autoInteractive auto mode
praisonai --deep-researchDeep research mode
praisonai recipe listList recipes
praisonai recipe runRun a recipe
praisonai serveStart HTTP server
praisonai mcp listList MCP servers
Full CLI Reference

Complete documentation for all CLI commands and options.


AI Agents Flow

Diagram

📋 Task

🤖 AI Agent

🔧 Tools

📋 Task

🤖 AI Agent

🔧 Tools

▶ Start

⚙ Process

✓ Output

AI Agents with Tools

Create AI agents that can use tools to interact with external systems and perform actions.

Diagram

Agents

Tools

Internet Search

Code Execution

Formatting

Input

Agent 1

Agent 2

Agent 3

Output

AI Agents with Memory

Create AI agents with memory capabilities for maintaining context and information across tasks.

Diagram

Agents

Store

Vector DB

Memory

Short Term

Long Term

Input

Agent 1

Agent 2

Agent 3

Output

AI Agents with Different Processes

Sequential Process

The simplest form of task execution where tasks are performed one after another.

Diagram

Agents

Input

Agent 1

Agent 2

Agent 3

Output

Hierarchical Process

Uses a manager agent to coordinate task execution and agent assignments.

Diagram

Agents

Workers

Input

Manager Agent

Worker 1

Worker 2

Worker 3

Output

Workflow Process

Advanced process type supporting complex task relationships and conditional execution.

Diagram

Workflow

Yes

No

Input

Start

Condition

Agent 1

Agent 2

Join

Agent 3

Output

Agentic Routing Workflow

Create AI agents that can dynamically route tasks to specialized LLM instances.

Diagram

In

LLM Call Router

LLM Call 1

LLM Call 2

LLM Call 3

Out

Agentic Orchestrator Worker

Create AI agents that orchestrate and distribute tasks among specialized workers.

Diagram

In

LLM Call Router

LLM Call 1

LLM Call 2

LLM Call 3

Synthesizer

Out

Agentic Autonomous Workflow

Create AI agents that can autonomously monitor, act, and adapt based on environment feedback.

Diagram

ACTION

FEEDBACK

Human

LLM Call

Environment

Stop

Agentic Parallelization

Create AI agents that can execute tasks in parallel for improved performance.

Diagram

In

LLM Call 2

LLM Call 1

LLM Call 3

Aggregator

Out

Agentic Prompt Chaining

Create AI agents with sequential prompt chaining for complex workflows.

Diagram

Pass

Output 2

Fail

In

LLM Call 1

Gate

LLM Call 2

LLM Call 3

Out

Exit

Agentic Evaluator Optimizer

Create AI agents that can generate and optimize solutions through iterative feedback.

Diagram

SOLUTION

ACCEPTED

REJECTED + FEEDBACK

In

LLM Call Generator

LLM Call Evaluator

Out

Repetitive Agents

Create AI agents that can efficiently handle repetitive tasks through automated loops.

Diagram

Next iteration

Done

Input

Looping Agent

Task

Output


Integration Options

Ollama Integration

Name the model with the ollama/ prefix — it resolves the base URL automatically and routes through the OllamaAdapter:

bash
export OPENAI_MODEL_NAME=ollama/llama3.2

Or pass it directly to the agent:

python
from praisonaiagents import Agent

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

Setting only OPENAI_BASE_URL with no model sends the OpenAI default gpt-4o-mini to Ollama and fails with 404 model 'gpt-4o-mini' not found. See Ollama.

Groq Integration
bash
export OPENAI_API_KEY=xxxxxxxxxxx
export OPENAI_BASE_URL=https://api.groq.com/openai/v1
Logging Configuration
bash
# Basic logging
export LOGLEVEL=info

# Advanced logging
export LOGLEVEL=debug

Use Cases

Praison AI Package Overall Features

PraisonAI Features PraisonAI Features

Features

User Interfaces

Total Downloads
Latest Stable Version
License
GitHub Stars
GitHub Forks

Video Tutorials

TopicVideo
AI Agents with Self Reflection![Self Reflection](https://www.youtube.com/watch?v=vLXobEN2Vc8)
Reasoning Data Generating Agent![Reasoning Data](https://www.youtube.com/watch?v=fUT332Y2zA8)
AI Agents with Reasoning![Reasoning](https://www.youtube.com/watch?v=KNDVWGN3TpM)
Multimodal AI Agents![Multimodal](https://www.youtube.com/watch?v=hjAWmUT1qqY)
AI Agents Workflow![Workflow](https://www.youtube.com/watch?v=yWTH44QPl2A)
Async AI Agents![Async](https://www.youtube.com/watch?v=VhVQfgo00LE)
Mini AI Agents![Mini](https://www.youtube.com/watch?v=OkvYp5aAGSg)
AI Agents with Memory![Memory](https://www.youtube.com/watch?v=1hVfVxvPnnQ)
Repetitive Agents![Repetitive](https://www.youtube.com/watch?v=dAYGxsjDOPg)
Introduction![Introduction](https://www.youtube.com/watch?v=Fn1lQjC0GO0)
Tools Overview![Tools Overview](https://www.youtube.com/watch?v=XaQRgRpV7jo)
Custom Tools![Custom Tools](https://www.youtube.com/watch?v=JSU2Rndh06c)
Firecrawl Integration![Firecrawl](https://www.youtube.com/watch?v=UoqUDcLcOYo)
User Interface![UI](https://www.youtube.com/watch?v=tg-ZjNl3OCg)
Crawl4AI Integration![Crawl4AI](https://www.youtube.com/watch?v=KAvuVUh0XU8)
Chat Interface![Chat](https://www.youtube.com/watch?v=sw3uDqn2h1Y)
Code Interface![Code](https://www.youtube.com/watch?v=_5jQayO-MQY)
Mem0 Integration![Mem0](https://www.youtube.com/watch?v=KIGSgRxf1cY)
Training![Training](https://www.youtube.com/watch?v=aLawE8kwCrI)
Realtime Voice Interface![Realtime](https://www.youtube.com/watch?v=frRHfevTCSw)
Call Interface![Call](https://www.youtube.com/watch?v=m1cwrUG2iAk)
Reasoning Extract Agents![Reasoning Extract](https://www.youtube.com/watch?v=2PPamsADjJA)