Recipe Run History
Every recipe run is recorded automatically — list, filter, and judge past runs
Every recipe run is recorded automatically. Use recipe runs to see what happened, and recipe judge <run-id> to evaluate it.
from praisonaiagents import Agent
agent = Agent(
name="Recipe Historian",
instructions="After running a recipe, list the last 5 runs and pick the most recent success to judge."
)
agent.start("Show me my recent recipe runs and grade the newest successful one.")Quick Start
- Run a recipe
Every run is recorded automatically — no
--saveneeded.bash praisonai recipe run ai-url-blog-generator --var url="https://example.com/article" - List past runs
bash praisonai recipe runs - Judge a run
Copy a Run ID from the table and evaluate it.
bash praisonai recipe judge run-abc123
How It Works
Each run returns a RecipeResult, which is persisted to history before the result is returned.
| Behavior | Detail |
|---|---|
| Recorded on | Every run() and run_stream() execution |
| Terminal statuses | success, failed, missing_deps, policy_denied, dry_run, timeout |
| Failure mode | History write errors log a warning; the run still succeeds |
| Registry-independent | Runs for deleted or unknown recipes are still listed |
Configuration
Persistence is on by default and controlled by one environment variable.
| Setting | Value | Effect |
|---|---|---|
PRAISONAI_RECIPE_HISTORY | unset / true / 1 | Enabled (default) |
PRAISONAI_RECIPE_HISTORY | 0, false, no, off | Disabled |
Disable persistence:
export PRAISONAI_RECIPE_HISTORY=false
praisonai recipe run my-recipe # not recordedRe-enable (default):
unset PRAISONAI_RECIPE_HISTORYCommon Patterns
Find and judge the last failure:
praisonai recipe runs --status failed --limit 1
praisonai recipe judge run-abc123Filter by session for a JSON pipeline:
praisonai recipe runs --session session-abc123 --jsonList runs with the Python API:
from praisonai.recipe.history import list_runs
runs = list_runs(recipe="my-recipe", status="success", limit=5)
for run in runs:
print(run["run_id"], run["status"], run["stored_at"])Best Practices
Let history run by default
Leave PRAISONAI_RECIPE_HISTORY unset so every run is captured. Disable it only in ephemeral CI where run records add no value.
Use runs as the entry point to judge
Start with praisonai recipe runs, copy a Run ID, then praisonai recipe judge <run-id>. This avoids guessing trace names.
Filter before you scan
Combine NAME, --status, and --session to narrow results instead of increasing --limit.
Add –save for deep debugging
History captures Run IDs, statuses, and timings. Add --save to recipe run only when you need a full replay trace.