gateway.yaml and every gateway agent journals its turns, so a gateway restart resumes an interrupted run instead of re-firing side-effecting tools or re-billing LLM calls.
Quick Start
1
Enable for every gateway agent
One flag opts every gateway agent into durable runs β each agent is constructed with Restart the gateway mid-run and the interrupted turn resumes β recorded tool results replay from the
execution=ExecutionConfig(durable=True):RunJournal instead of re-charging the card or re-billing the model.2
Override per agent
A per-agent
durable flag wins in both directions β opt one agent in even when the gateway default is off, or opt one out even when itβs on:3
Wire it from the environment
gateway.durable_runs accepts an ${ENV_VAR}-substituted string. Because ${DURABLE} renders as a string, the value is coerced explicitly β "true"/"1"/"yes"/"on" enable, and "false"/"0"/"no"/"off"/"" disable:How It Works
Each gateway agent journals its turn to the coreRunJournal; a restart re-drives the loop from the top, replaying journalled steps and running only the un-journalled ones.
The
durable_runs value is passed through on every load path β initial load, full-restart reload, and selective reload β so restarting the gateway keeps durability wired.Zero overhead when off. With neither flag set the execution hot path is unchanged and
ExecutionConfig is never imported.Graceful degrade. If
ExecutionConfig canβt be imported (an older core), the gateway logs a warning and the agent runs non-durably β the gateway never fails to start over durability.Configuration Options
The underlying agent primitive is
ExecutionConfig(durable=True) β see that page for journal_path, resume_run_id, and the resume contract.
Common Patterns
Fleet-wide durability with a chit-chat escape hatch β journal the agents that touch money or ship goods, skip the ones that only make small talk:Best Practices
Point journal_path at a persistent volume in containers
Point journal_path at a persistent volume in containers
The default
~/.praisonai/runs/journal.db is lost when a container is recreated. Configure a mounted volume so the journal survives restarts β see Durable Tool Runs.Use ${DURABLE} from the environment
Use ${DURABLE} from the environment
Wire
durable_runs: ${DURABLE} and toggle per environment. Remember the string "false" really disables durability here β the coercion exists precisely so bool("false") never silently enables it.Per-agent durable is your escape hatch
Per-agent durable is your escape hatch
Small-talk agents donβt need journalling. Set
durable: false on them even when the gateway default is on, keeping the hot path clean for stateless turns.Compose with session persistence
Compose with session persistence
Durable gateway runs and session persistence are different layers β one resumes the in-flight turn, the other restores conversation history. Both survive a restart and work together.
Related
Durable Tool Runs
The underlying agent primitive β
ExecutionConfig(durable=True).Run-State Journal
The SQLite journal durable runs write to.
Gateway Session Persistence
Sibling gateway-side durability for conversation state.
Gateway Overview
The full gateway config surface.

