Recipe

Recipe management for reusable agent configurations

The recipe command manages reusable agent recipes.

Usage

bash
praisonai recipe [OPTIONS] COMMAND [ARGS]...

Commands

CommandDescription
listList available recipes
runRun a recipe
runsList recipe run history (feeds recipe judge <run-id>)
createCreate recipe from natural language goal
optimizeOptimize existing recipe with AI feedback
initInitialize a new recipe project
judgeJudge a trace with LLM
applyApply fixes from a judge plan

Run Options

OptionDescription
--input, -iInput JSON or file path
--config, -cConfig JSON overrides
--session, -sSession ID for state grouping
--output, -oOutput mode: silent, status, trace, verbose, debug, json
--jsonOutput JSON (for parsing)
--streamStream output events (SSE-like)
--dry-runValidate without executing
--explainShow execution plan
--verbose, -vAlias for --output verbose
--timeout <sec>Timeout in seconds (default: 300)

Output Modes

ModeDescription
silentNo output (default, best performance)
statusShows tool calls inline: ▸ tool → result ✓
traceTimestamped execution trace: [HH:MM:SS] ▸ tool → result [0.2s] ✓
verboseFull interactive output with panels
debugTrace + metrics (tokens, cost, model)
jsonMachine-readable JSONL events

Examples

List recipes

bash
praisonai recipe list

Run a recipe

bash
praisonai recipe run my-recipe

Run with status output

bash
praisonai recipe run my-recipe --output status

Run with trace output

bash
praisonai recipe run my-recipe --output trace

Run with input

bash
praisonai recipe run my-recipe --input '{"query": "Hello"}'

List Recent Runs

Every run is recorded automatically. List past runs to find a Run ID for recipe judge.

bash
praisonai recipe runs                                  # last 20 runs
praisonai recipe runs my-recipe --status failed        # filter
praisonai recipe runs --session session-abc123 --json  # JSON output

See Run History for full options.

Judge a Trace

Score a recorded trace (or run ID) with an LLM judge. Use -g/--goal to state what the recipe was supposed to achieve.

bash
praisonai recipe judge trace.jsonl --goal "Analyze the image and create a blog post"
praisonai recipe judge run-abc123 -g "Explain the error and suggest a fix"

Create Recipe from Goal

Create a complete recipe from a natural language goal. The AI automatically:

  • Generates agents.yaml with appropriate agents
  • Selects relevant tools based on the goal
  • Creates TEMPLATE.yaml metadata
  • Runs optimization loop (3 iterations by default)
Diagram

🎯 Goal

🤖 AI Generator

📁 Recipe Folder

🔄 Optimize Loop

✅ Ready

  1. Run Create Command
    bash
    praisonai recipe create "Build a web scraper for news articles"
  2. Recipe Generated

    Creates folder with agents.yaml, TEMPLATE.yaml, and tools.py

  3. Auto-Optimization

    Runs 3 optimization iterations with AI judge feedback

Create Options

OptionDescription
--output, -oOutput directory (default: current)
--no-optimizeSkip optimization loop
--iterationsNumber of optimization iterations (default: 3)
--thresholdScore threshold to stop (default: 8.0)

Examples

Basic
praisonai recipe create "Research AI trends and summarize"
Skip Optimization
praisonai recipe create "Build a calculator" --no-optimize
Custom Iterations
praisonai recipe create "Analyze stock data" --iterations 5 --threshold 9.0

Optimize Existing Recipe

Improve an existing recipe using AI judge feedback. Runs the recipe, evaluates output, and applies improvements.

Diagram

📁 Recipe

▶️ Run

⚖️ Judge

💡 Improve

✅ Done

  1. Run Optimize
    bash
    praisonai recipe optimize my-recipe
  2. Target Specific Area
    bash
    praisonai recipe optimize my-recipe "improve error handling"

Optimize Options

OptionDescription
--iterationsMax optimization iterations (default: 3)
--thresholdScore threshold to stop (default: 8.0)
--input, -iInput data for recipe runs

See Also