Use Existing Recipes

Step-by-step guide to running and using existing PraisonAI recipes

Discover community or built-in recipes and run them with your own inputs.

python
from praisonaiagents import Agent

agent = Agent(name="Recipe Operator", instructions="Help run existing PraisonAI recipes.")
agent.start("List steps to run an existing recipe with custom variables.")

The user lists recipes, passes --var flags, and collects outputs from each task.

Diagram

Use Recipes

📋 List & Pick

⚙️ Run with –var

✅ Task Output

How It Works

Diagram
RecipeCLIUserRecipeCLIUserpraisonai recipe run <name> –var …Load recipe, bind variablesTask outputsResult files or text

How to Run an Existing Recipe

  1. List Available Recipes
    bash
    praisonai recipe list
  2. Get Recipe Info
    bash
    praisonai recipe info ai-video-editor
  3. Run Recipe with Variables
    bash
    praisonai recipe run ai-video-editor --var input=video.mp4 --var output=edited.mp4
  4. View Output

    Check the generated output in your working directory or specified output path.

How to Run Recipes from GitHub

  1. Run Directly from GitHub
    bash
    praisonai recipe run github:MervinPraison/Agent-Recipes/ai-video-editor
  2. Run with Custom Branch
    bash
    praisonai recipe run github:MervinPraison/Agent-Recipes/ai-video-editor@main
  3. Run with Variables
    bash
    praisonai recipe run github:MervinPraison/Agent-Recipes/ai-video-editor --var input=video.mp4

How to Run Recipes with Python

  1. Import and Run
    python
    from praisonaiagents import Agent, AgentTeam
    import yaml
    
    # Load recipe
    with open("agents.yaml") as f:
        config = yaml.safe_load(f)
    
    # Run agents based on config

Common Recipe Variables

RecipeVariablesExample
ai-video-editor--var input, --var output--var input=video.mp4
research-agent--var topic, --var depth--var topic="AI trends"
code-reviewer--var repo, --var branch--var repo=./myproject

CLI Options

bash
praisonai recipe run <recipe> [OPTIONS]

Options:
  --var KEY=VALUE        Set variable value
  --verbose              Enable verbose output

Best Practices

Read recipe info before running

praisonai recipe info <name> lists the variables a recipe expects, so you pass the right --var flags on the first try.

Pin a branch when running from GitHub

Append @main (or a tag) to a github: recipe reference so runs stay reproducible even as the upstream repo changes.

Add –verbose when output looks wrong

Verbose mode shows each task and tool call, making it clear where an unexpected result came from.


Related