Run Journal • AI Agent SDK
RunJournal: Append-only, restart-safe run-state journal backed by SQLite.
RunJournal
Defined in the journal module.
AI Agent
Append-only, restart-safe run-state journal backed by SQLite.
Thread-safe: a single re-entrant lock guards a shared connection opened with `check_same_thread=False, mirroring :class:~praisonaiagents.runs. sqlite_ledger.SQLiteRunLedger`.
Constructor
Optional[str]No description available.
Methods
Register `run_id as running` (idempotent).
Bind the latest files checkpoint to `run_id` for resume.
Mark `run_id` terminal so it is no longer resumed on restart.
Remove `run_id` and all its journal events.
Return the :class:RunMeta for `run_id or None` if unknown.
Return ids of runs still `running` — resume candidates on restart.
Append `ev to the journal (idempotent on run_id/seq/kind`).
Return all journal events for `run_id ordered by (seq, kind)`.
Return a `(seq, kind): payload` lookup for memoised replay.
Return the highest journalled iteration index, or `None`.
Determinism guardrail: fail loud if replay diverges from the journal.
close()Close the underlying database connection.
Source
View on GitHubpraisonaiagents/runtime/journal.py at line 170