Skip to main content

Overview

The Recipe Workflow provides a complete cycle for running, evaluating, and improving agent configurations.

Commands

Run a Recipe

praisonai recipe run <recipe-name> [OPTIONS]
OptionDescription
--saveSave execution trace
--name NAMECustom trace name
--var KEY=VALUESet variables
--debugEnable debug output
--verboseVerbose output
Example:
praisonai recipe run ai-topic-gatherer --save --name my-trace --var topic="AI 2026"

Judge a Trace

praisonai recipe judge <trace-id> [OPTIONS]
OptionDescription
--yaml FILEYAML for context-aware evaluation
--output FILEOutput plan file
--model MODELJudge model (default: gpt-4o-mini)
Example:
praisonai recipe judge my-trace --yaml agents.yaml --output plan.yaml

Apply Improvements

praisonai recipe apply <plan-file> [OPTIONS]
OptionDescription
--confirm / -cApply without confirmation
--dry-runPreview only
--fix-ids IDSApply specific fixes
--no-backupSkip backup
Example:
# Preview changes
praisonai recipe apply plan.yaml --dry-run

# Apply with confirmation
praisonai recipe apply plan.yaml --confirm

Complete Workflow

1

Run Recipe with Trace

praisonai recipe run ai-wordpress-post-generator \
  --save --name wp-test \
  --var topic="AI News"
2

Judge the Execution

praisonai recipe judge wp-test \
  --yaml agents.yaml \
  --output improvements.yaml
3

Review Suggestions

praisonai recipe apply improvements.yaml --dry-run
4

Apply Improvements

praisonai recipe apply improvements.yaml --confirm
5

Re-run and Verify

praisonai recipe run ai-wordpress-post-generator \
  --save --name wp-test-v2 \
  --var topic="AI News"

Evaluation Metrics

The judge evaluates each agent on 6 criteria:
MetricDescription
Task AchievementDid the agent complete its goal?
Context UtilizationWas context effectively used?
Output QualityIs output high quality?
Instruction FollowingDid agent follow instructions?
Hallucination10=accurate, 1=fabricated
Error HandlingHow well were errors handled?

Fix Types

The judge generates actionable fixes:
TypeDescription
append_instructionAdd guidance to instructions
add_expected_outputSpecify output format
modify_context_configAdjust context settings
suggestionGeneral improvement

Example Output

Judge Report

============================================================
  LLM JUDGE REPORT: wp-test
============================================================

  Overall Score: 7.86/10
  Agents Evaluated: 6

  AGENT SCORES:
    Research Agent:
      Task Achievement: 8.0/10
      Context Utilization: 7.0/10
      Output Quality: 8.0/10
      Instruction Following: 9.0/10
      Hallucination: 8.0/10
      Error Handling: 10.0/10
      Overall: 8.33/10

  CONTEXT FLOW:
    Research Agent → Writer Agent: 10.0/10 ✓
    Writer Agent → Publisher: 10.0/10 ✓

  RECOMMENDATIONS:
    - Research Agent: Include specific citations
    - Writer Agent: Ensure all sections complete
============================================================

Plan Preview

============================================================
  PREVIEW: Changes to be applied
============================================================

  [MEDIUM] fix_abc123
    Agent: Research Agent
    Type: append_instruction
    Path: agents.Research Agent.instructions
    New: IMPROVEMENT: Include specific citations...

  [LOW] fix_def456
    Agent: Writer Agent
    Type: append_instruction
    New: IMPROVEMENT: Ensure sections complete...

============================================================

Best Practices

Save All Runs

Always use --save to capture traces for analysis

Name Your Traces

Use --name for easy identification

Preview First

Always --dry-run before applying

Iterate

Run → Judge → Apply → Repeat

Viewing Traces

Use the replay commands to inspect traces:
# List all traces
praisonai replay list

# View trace details
praisonai replay context my-trace --dump

# Full content (no truncation)
praisonai replay context my-trace --dump --full

# Statistics
praisonai replay context my-trace --stats