> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aion.to/llms.txt
> Use this file to discover all available pages before exploring further.

# ADK Session Storage

> How ADK session backends are selected in the Python SDK.

The ADK plugin selects a session backend at initialization time based on whether a database
connection is available. Sessions map to the A2A `context_id` and hold conversation history and
agent state between turns.

## In-Memory Backend

* Default when no database connection is configured.
* Best for local development and stateless testing.
* Session data is lost on process restart.

## Database Backend

* Used when a database connection is available.
* Best for persistent sessions and multi-instance environments where conversation continuity across
  restarts is required.
* Requires `POSTGRES_URL` to be configured.

## Operational Guidance

* Use in-memory session storage for local development.
* Use PostgreSQL-backed session storage for production session continuity.
