The agent looks it up and replies. Then the user asks, “Okay, what about the other one?”


- Runner — the processing loop. You hand it an incoming message and it orchestrates the agent workflow, emitting a stream of records called events for each step.
- Session service — the persistent filing cabinet. It creates, stores, retrieves sessions and records every event and state change.

- ID — locate the session later
- App name and user ID — identify the owning application and user
- State — the current snapshot of values the conversation must remember
- Events — an ordered history of what happened

- User message
- Agent reply
- Tool call and tool result
- A change in user tier (e.g., free → premium)
- Tool timeouts and errors
- State is the current snapshot: fields like
customer_tier: "premium", whether an order number is known, or that the workflow is awaiting approval. - Events are the full chronological trail. When state changes, ADK records a state delta inside an event (what changed and to what). The session service applies that delta to the in-session state and stores the event in the history.

root_agent and msg with your actual agent and incoming message.)
Rewind does not erase history. The rewind request itself is recorded in the session events so you retain a full audit trail for debugging and compliance.
output and node_info) to support the internal engine. If your storage layer assumed a fixed set of columns, the extra fields could break existing schemas.
A robust storage strategy is to store each event as a single blob (for example, JSON). That allows new fields to appear without schema migrations.

If you map every event field to separate database columns, plan for schema evolution. Prefer storing the entire event as a JSON blob or use a flexible column type (e.g., JSONB) to avoid breaking changes when ADK adds fields.
Summary
- Session = conversation thread you can resume and inspect.
- Events = the chronological log of everything that happened.
- State = the current snapshot of values needed by the conversation.
- Runner + Session service = the runtime machinery that produces events and stores state.