Recipe Examples

10 beginner-friendly, real-world recipe creation examples with step-by-step guides

Next

Recipe Examples

This section provides 10 beginner-friendly, real-world recipe examples designed for Recipe Authors. Each example is a complete, end-to-end tutorial covering creation, testing, local usage, and deployment across all six integration models.

Personas

Integration Models Overview

PraisonAI recipes can be consumed via six integration models. Each example in this section demonstrates all six.

Diagram

📦 Recipe

Model 1: SDK

Model 2: CLI

Model 3: Plugin

Model 4: Sidecar

Model 5: Remote

Model 6: Event

Python App

Any Language

IDE/CMS

Microservice

Cloud App

Queue Worker

Quick Comparison

ModelLatencyBest ForLanguage
1. Embedded SDKLowestPython apps, notebooksPython
2. CLI InvocationLowScripts, CI/CDAny
3. Plugin ModeLowIDE/CMS extensionsAny
4. Local HTTP SidecarMediumMicroservices, polyglotAny
5. Remote Managed RunnerMediumMulti-tenant, cloudAny
6. Event-DrivenVariableAsync workflows, batchAny

Decision Guide

Diagram

Yes

No

Yes

No

Yes

No

Yes

No

Yes

No

Start

Python app?

Model 1: Embedded SDK

Script or CI/CD?

Model 2: CLI Invocation

Local microservice?

Model 4: HTTP Sidecar

Async/batch processing?

Model 6: Event-Driven

IDE or CMS plugin?

Model 3: Plugin Mode

Model 5: Remote Runner

Feature Matrix

FeatureSDKCLIPluginSidecarRemoteEvent
Streaming✅✅✅✅✅❌
Multi-tenant❌❌❌❌✅✅
Auth built-in❌❌❌✅✅✅
Async native✅❌✅✅✅✅
Process isolation❌✅✅✅✅✅
Hot reload❌✅✅✅✅❌

Recipe Discovery Paths

Recipes are discovered from these directories in order of precedence:

PriorityPathDescription
1~/.praisonai/templates/User-local recipes
2~/.config/praisonai/templates/XDG config location
3./.praisonai/templates/Project-local recipes
4Built-in Agent-RecipesBundled recipes

Examples

Recipe Author Workflow

Diagram
Unsupported markdown: list
Unsupported markdown: list
Unsupported markdown: list
Unsupported markdown: list
Unsupported markdown: list
Unsupported markdown: list
  1. Define the Problem

    Identify the task to automate, target user, and expected inputs/outputs.

  2. Create Recipe Structure

    Initialize the recipe directory with TEMPLATE.yaml, recipe.py, and README.md.

  3. Implement the Recipe

    Write the run() function with proper input validation and error handling.

  4. Write Tests

    Create unit tests and integration tests with proper markers.

  5. Document

    Write comprehensive README with examples, inputs/outputs tables, and troubleshooting.

  6. Release

    Complete the release checklist and publish to your chosen distribution method.

Quick Start

Create your first recipe in under 5 minutes:

bash
# Create recipe directory
mkdir -p ~/.praisonai/templates/my-first-recipe
cd ~/.praisonai/templates/my-first-recipe

# Create the required files
touch TEMPLATE.yaml recipe.py README.md test_recipe.py

Then follow any of the 10 examples in this section for a complete walkthrough.

Next Steps