Skip to main content

How to Create a Custom Recipe from Scratch

1

Create Recipe Directory

Create a new directory for your recipe with the required structure:
mkdir -p my-recipe
cd my-recipe
2

Create agents.yaml

Create the main recipe configuration file:
# agents.yaml
framework: praisonai
topic: "{{task}}"

roles:
  researcher:
    role: Research Specialist
    goal: Research the given topic thoroughly
    backstory: Expert researcher with attention to detail
    tools:
      - internet_search
    tasks:
      research_task:
        description: |
          Research: {{task}}
          Provide comprehensive findings.
        expected_output: "Detailed research report"
3

Test Your Recipe Locally

Run your recipe to verify it works:
praisonai recipe run ./my-recipe --var task="AI trends 2024"

How to Create a Recipe with CLI

1

Initialize Recipe

praisonai recipe init my-new-recipe
2

Edit Generated Files

cd my-new-recipe
# Edit agents.yaml as needed
3

Validate Recipe

praisonai recipe validate ./my-new-recipe
4

Run Recipe

praisonai recipe run my-new-recipe --var task="Your task here"

Recipe File Structure

my-recipe/
├── agents.yaml        # Agent definitions and tasks
├── tools.py           # Optional: custom tools
└── README.md          # Optional: documentation

agents.yaml Schema

FieldTypeRequiredDescription
frameworkstringYesShould be praisonai
topicstringYesMain topic/task
rolesobjectYesAgent definitions
roles.*.rolestringYesAgent role name
roles.*.goalstringYesAgent goal
roles.*.toolsarrayNoTools for agent
roles.*.tasksobjectYesAgent tasks