Skip to main content
The session store owns committed multi-turn conversation history and JSON-safe application state. It does not own an active framework run; checkpoints handle that separately. Every application resolves exactly one session factory across its root and Runtime Plugin extensions. This example assumes the shared PostgresStore from lib/state.py in the storage overview:
extensions/sessions.py
Committed session state survives an ADK ↔ LangGraph switch when both compiled applications use compatible session storage. Active framework checkpoints do not move with it.

Store session-scoped data

Use context.session for values that should persist with a session without entering prompts or model-visible history:
lib/exports.py
Session writes are scoped to the authenticated user and session. They emit payload-free OTEL audit events.

Register a domain repository

Custom storage is for business data that needs a typed repository. It is not a session store or framework checkpointer.
extensions/users.py
lib/user_profiles.py
A custom store must provide async start() and close() methods. Prefer domain methods over exposing a raw connection to agent code. Sessions and checkpoints never appear in context.storage.

Register asset stores

Declare one or more named stores for session-owned media:
extensions/assets.py
context.assets selects default; context.assets("generated") selects a named store. An AssetRef retains its store and optional domain label, so later reads cannot silently switch backends. See Store and retrieve media.

Configure checkpoints separately

Add active-run persistence and recovery without exposing checkpoint state to agent code.