journal
AI Agent Durable run-state journal for resumable agent execution. The existing stores persist three unlinked things:- workspace files —
checkpoints/(shadow-git),snapshot/; - finished conversation messages —
session/store.py;
run_id, that records an event at every meaningful boundary (model decision,
tool call, tool result, iteration index, approval decision). On resume, the loop
is re-driven from the top and journalled steps return their recorded results
instantly — no re-execution of side-effecting tools and no re-billing of LLM
calls — while real work restarts at the first un-journalled step.
Design notes
- Reuses the zero-dependency stdlib
sqlite3persistence pattern already used by :mod:praisonaiagents.runs.sqlite_ledgerand :mod:praisonaiagents.session(WAL,busy_timeout, a single re-entrant-lock-guarded shared connection). - Default-off / zero-overhead: nothing writes to the journal unless a run
opts in (e.g.
Agent(..., durable=True)). This module is lazy-imported from :mod:praisonaiagents.runtime, so importing the package stays cheap. - Complements — does not replace — :mod:
praisonaiagents.runs, which tracks run status (queued/running/…); this tracks the per-event cursor.
Import
Classes
JournalEvent
A single append-only journal event.
RunMeta
Durable metadata that binds the three stores under one
run_id.RunJournal
Append-only, restart-safe run-state journal backed by SQLite.

