Skip to main content
Each application needs one session store for committed data and one checkpointer for in-progress execution. Both roles can share a backend.

Reuse a backend without merging roles

Put a shared connection in lib/, then declare each responsibility in its own extension file:
1

lib/state.py

2

lifecycle/sessions.py

3

lifecycle/checkpoints.py

Harnest starts the shared object once and closes it once. Separate factories make ownership visible even when the physical backend is the same. If one small factory intentionally owns both roles, you can stack the two decorators.

Choose a backend

Sessions and application storage

Configure conversation state, context.session, assets, and domain repositories.

Checkpoints

Configure active-run recovery, framework adapters, and replica safety.