Why it matters

State loss makes agents feel broken. Understanding persistence options is essential.

Advertisement

The architecture

InMemorySessionService: dev only.

VertexAiSessionService: Google-managed. Scales, HA.

State persistence optionsIn-memorydev onlyVertex AImanagedCustom (DB)for portabilityCustom backend implements SessionService interface; use for Postgres, DynamoDB, etc.
SessionService options.
Advertisement

How it works end to end

Custom backend: implement SessionService against your DB. Postgres, DynamoDB, etc.

Migration: switching backends requires migration of existing sessions.

Consistency: transactions per session update matter for correctness under concurrency.