Last Run • AI Agent SDK
Last-run trace pointer for PraisonAI Agents.
last_run
AI Agent
Last-run trace pointer for PraisonAI Agents.
Persists a tiny pointer to the most recently completed traced run so tools (e.g. `praisonai eval last-trace`) can grade the last run without a manual JSON export. Uses only stdlib for zero dependencies and writes atomically.
Usage:
from praisonaiagents.trace.last_run import record_completed_run, load_last_run_pointer
record_completed_run("trace.jsonl", meta={"agent": "researcher"})
pointer = load_last_run_pointer() # -> {"path": "...", "meta": {...}} or NoneImport
from praisonaiagents.trace import last_runFunctions
last_run_pointer_path()
Absolute path to the last-run pointer file.
record_completed_run()Persist a pointer to the trace file of the just-completed run.
load_last_run_pointer()Load the last-run pointer, or `None` if none has been recorded.
Constants
| Name | Value |
|---|---|
POINTER_SCHEMA_VERSION | '1.0' |