Record Completed Run • AI Agent SDK
record_completed_run: Persist a pointer to the trace file of the just-completed run.
record_completed_run
Function
</div>
This function is defined in the last_run module.
Persist a pointer to the trace file of the just-completed run.
Signature
def record_completed_run(trace_path: Any, meta: Optional[Dict[str, Any]]) -> PathParameters
ParamField
AnyPath to the trace artifact (JSON or JSONL).
ParamField
OptionalOptional run metadata (agent name, status, etc.).
Returns
ResponseField
PathThe path the pointer was written to.
Uses
resolvePathtime.timelast_run_pointer_pathjson.dumps
Source
View on GitHubpraisonaiagents/trace/last_run.py at line 60