Agent Templates

Pre-built AI agent blueprints you can use instantly or customize

Agent Recipes are ready-to-use AI agent blueprints. Think of them like cooking recipes – follow the steps and get reliable results every time.

Diagram

What is a Recipe?

🍳 Recipe\n(Blueprint)

🤖 Agents\n(Workers)

📋 Tasks\n(Instructions)

🔧 Tools\n(Capabilities)

▶️ Run

✅ Result


Why Use Recipes?


Quick Start

  1. Install PraisonAI
    bash
    pip install praisonai
  2. Set Your API Key
    bash
    export OPENAI_API_KEY=your_key_here
  3. Run a Recipe
    bash
    praisonai recipe run research-agent --var topic="AI trends 2024"

How Recipes Work

Diagram
ResultToolsAgentsRecipeYouResultToolsAgentsRecipeYouRun with variablesCreate agents from blueprintUse configured toolsReturn resultsCombine outputsFinal result
StepWhat Happens
1. You provide inputTell the recipe what to work on
2. Agents are createdThe blueprint builds specialized workers
3. Tasks executeEach agent completes their job
4. Tools helpAgents use search, files, etc.
5. You get resultsCombined output from all agents

Popular Recipes


Recipe Commands

What you want to doCommand
See all recipespraisonai recipe list
Get recipe detailspraisonai recipe info <name>
Run a recipepraisonai recipe run <name>
Run with optionspraisonai recipe run <name> --var key=value
Create your ownpraisonai recipe init my-recipe

Anatomy of a Recipe

Every recipe is just a folder with a configuration file:

my-recipe/
├── agents.yaml    ← The blueprint
├── tools.py       ← Optional: custom tools
└── README.md      ← Optional: documentation

The agents.yaml File

This is where the magic happens. Here’s a simple example:

yaml
framework: praisonai
topic: "{{task}}"

roles:
  researcher:
    role: Research Specialist
    goal: Find accurate information
    tools:
      - internet_search
    tasks:
      research:
        description: "Research {{task}} and provide key findings"
        expected_output: "Summary with sources"

Customizing Recipes

Option 1: Change Variables

Most recipes have built-in options you can adjust:

bash
# See what options are available
praisonai recipe info research-agent

# Run with your settings
praisonai recipe run research-agent \
  --var topic="Renewable energy" \
  --var depth="comprehensive"

Option 2: Edit the Blueprint

For bigger changes, modify the agents.yaml file:

  1. Find or create a recipe folder
  2. Edit the agents.yaml file
  3. Run your modified recipe
yaml
# agents.yaml - add another agent!
roles:
  researcher:
    role: Researcher
    goal: Find information
    tasks:
      research:
        description: "Research {{topic}}"

  writer:  # ← Add this!
    role: Writer
    goal: Write engaging content
    tasks:
      write:
        description: "Write about the research findings"

Creating Your Own Recipe

  1. Initialize
    bash
    praisonai recipe init my-awesome-recipe
    cd my-awesome-recipe
  2. Edit agents.yaml

    Define your agents and what they should do:

    yaml
    framework: praisonai
    topic: "{{task}}"
    
    roles:
      helper:
        role: Helpful Assistant
        goal: Complete the user's task
        tasks:
          main:
            description: "{{task}}"
            expected_output: "Task completed successfully"
  3. Test It
    bash
    praisonai recipe run . --var task="Say hello world"

Recipe Variables

Variables let you customize recipes without editing files:

In the YAML fileHow to use it
{{topic}}--var topic="Your topic"
{{input}}--var input="file.txt"
{{output}}--var output="result.txt"

Adding Tools to Recipes

Tools give your agents superpowers:

yaml
roles:
  agent:
    role: My Agent
    tools:
      - internet_search    # Search the web
      - file_read_tool     # Read files
      - shell_tool         # Run commands

Available Tools

ToolWhat it does
internet_searchSearch the web for information
file_read_toolRead files from disk
file_write_toolWrite files to disk
shell_toolRun terminal commands

Running Recipes from GitHub

Share and use recipes from anywhere:

bash
# Run directly from GitHub
praisonai recipe run github:MervinPraison/Agent-Recipes/research-agent

# From a specific branch
praisonai recipe run github:MervinPraison/Agent-Recipes/research-agent@main

Troubleshooting

Recipe not found

Make sure you’re in the right directory or use the full path:

bash
praisonai recipe run ./my-recipe
Tool not working

Check if the tool is available:

bash
praisonai tools list
Variable not substituted

Make sure you’re using the correct variable name with --var:

bash
praisonai recipe run my-recipe --var topic="My topic"
Need more details

Enable verbose mode to see what’s happening:

bash
praisonai recipe run my-recipe --verbose

Best Practices

Start with existing recipes

Browse the recipe library first – someone may have already built what you need!

Keep it simple

Start with one agent, then add more as needed. Simpler is usually better.

Use clear task descriptions

Tell your agents exactly what you want in the task description.

Test incrementally

Test your recipe after each change to catch issues early.


Related