Skip to main content
Every compiled agent needs one session store and one checkpointer. Multimodal agents also use an asset store for session-owned media. Harnest allows one running or waiting invocation per session. Atomic status updates prevent two replicas from resuming the same run.

Choose a backend

Harnest supplies compatible asyncpg and redis drivers in the compiled environment. The default MemoryAssetStore is for development. Configure one root @lifecycle.asset_store factory for durable media storage. See Typed multimodal contracts.

Configure a managed agent

Create one store and return it from both lifecycle factories:
Harnest starts the shared object once and closes it with the application.
MemoryStore is for development. Replace it before running more than one process or keeping user state across restarts.

Give agent code direct access

Storage stays private unless you publish it as a context resource:
Agent code can then call context.resource("storage").

Advanced framework ownership

Advanced LangGraph can use Harnest storage:
Or wrap a native saver and return the same wrapper from the lifecycle:
For ADK-native ownership, create one ADKStore(session_service) and return that same object from both storage factories.

Framework switches and recovery

Finish or cancel active runs before switching frameworks. Give side-effecting tools an idempotency key derived from the run and tool-call identities. Harnest traces storage outcomes, never checkpoint payloads, prompts, arguments, credentials, or results.