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.

python
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.")
Diagram

on default

off

▶ recipe run

🧠 Execute

📦 RecipeResult

PRAISONAI_RECIPE_HISTORY?

💾 ~/.praison/runs

⏭ Skip

📋 recipe runs

⚖ recipe judge run-id

Quick Start

  1. Run a recipe

    Every run is recorded automatically — no --save needed.

    bash
    praisonai recipe run ai-url-blog-generator --var url="https://example.com/article"
  2. List past runs
    bash
    praisonai recipe runs
  3. 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.

Diagram
~/.praison/runsrecipe.run()recipe runUser~/.praison/runsrecipe.run()recipe runUserpraisonai recipe run my-recipeexecutebuild RecipeResultstore_run(result)ok (warn only on failure)RecipeResultpraisonai recipe runslist_runs(…)Recipe · Status · Run ID
BehaviorDetail
Recorded onEvery run() and run_stream() execution
Terminal statusessuccess, failed, missing_deps, policy_denied, dry_run, timeout
Failure modeHistory write errors log a warning; the run still succeeds
Registry-independentRuns for deleted or unknown recipes are still listed

Configuration

Persistence is on by default and controlled by one environment variable.

SettingValueEffect
PRAISONAI_RECIPE_HISTORYunset / true / 1Enabled (default)
PRAISONAI_RECIPE_HISTORY0, false, no, offDisabled

Disable persistence:

bash
export PRAISONAI_RECIPE_HISTORY=false
praisonai recipe run my-recipe   # not recorded

Re-enable (default):

bash
unset PRAISONAI_RECIPE_HISTORY

Common Patterns

Find and judge the last failure:

bash
praisonai recipe runs --status failed --limit 1
praisonai recipe judge run-abc123

Filter by session for a JSON pipeline:

bash
praisonai recipe runs --session session-abc123 --json

List runs with the Python API:

python
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.


Related