> ## Documentation Index
> Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Custom Recipes

> Step-by-step guide to creating your own PraisonAI recipes

## How to Create a Custom Recipe from Scratch

<Steps>
  <Step title="Create Recipe Directory">
    Create a new directory for your recipe with the required structure:

    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    mkdir -p my-recipe
    cd my-recipe
    ```
  </Step>

  <Step title="Create agents.yaml">
    Create the main recipe configuration file:

    ```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    # 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"
    ```
  </Step>

  <Step title="Test Your Recipe Locally">
    Run your recipe to verify it works:

    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai recipe run ./my-recipe --var task="AI trends 2024"
    ```
  </Step>
</Steps>

## How to Create a Recipe with CLI

<Steps>
  <Step title="Initialize Recipe">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai recipe init my-new-recipe
    ```
  </Step>

  <Step title="Edit Generated Files">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    cd my-new-recipe
    # Edit agents.yaml as needed
    ```
  </Step>

  <Step title="Validate Recipe">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai recipe validate ./my-new-recipe
    ```
  </Step>

  <Step title="Run Recipe">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai recipe run my-new-recipe --var task="Your task here"
    ```
  </Step>
</Steps>

## Recipe File Structure

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

## agents.yaml Schema

| Field           | Type   | Required | Description           |
| --------------- | ------ | -------- | --------------------- |
| `framework`     | string | Yes      | Should be `praisonai` |
| `topic`         | string | Yes      | Main topic/task       |
| `roles`         | object | Yes      | Agent definitions     |
| `roles.*.role`  | string | Yes      | Agent role name       |
| `roles.*.goal`  | string | Yes      | Agent goal            |
| `roles.*.tools` | array  | No       | Tools for agent       |
| `roles.*.tasks` | object | Yes      | Agent tasks           |
