Memory & state
Persist and manage durable state with sub-10ms access latency using event sourcing and key-value patterns. This use case covers how to model stateful entities, maintain conversation memory, build queryable views over your data, and choose the right persistence pattern for your application’s needs.
Overview
When to Use This Pattern
-
You need durable, low-latency state that survives restarts and scales horizontally
-
Your application requires event sourcing for full audit trails and temporal queries
-
You want simple key-value storage for session memory, caches, or configuration
-
You need to build read-optimized views that aggregate data across multiple entities
Sample Projects
The following sample projects demonstrate this pattern:
-
travel-planning-agent — session memory for multi-turn travel planning conversations
-
shopping-cart-quickstart — event sourced shopping cart with views
-
event-sourced-customer-registry — event sourced entity pattern for customer data