Agent state and memory
Agents need persistent storage to maintain context across turns and sessions. Lakebase Autoscaling provides a fully managed Postgres backend for storing agent state and memory, integrating natively with Databricks authentication and scaling automatically with your workload.
Short-term vs. long-term memory
Short-term memory | Long-term memory |
|---|---|
Captures context within a single conversation session using thread IDs and checkpointing. Lets agents answer follow-up questions with awareness of earlier turns. | Extracts and stores key insights across multiple conversations. Enables personalized responses based on past interactions. Builds a user knowledge base that improves over time. |
You can implement either or both memory types in the same agent.
Deployment options
Lakebase-backed agent memory is supported on two Databricks deployment targets:
Databricks Apps: Deploy agents as interactive applications with short-term or long-term memory, using LangGraph checkpointers or the OpenAI Agents SDK. Databricks handles authentication between the app and Lakebase automatically.
See Self-managed agent memory (Lakebase).
Model Serving: Deploy agents to Model Serving endpoints with Lakebase-backed checkpoints. Supports LangGraph time travel to resume or fork conversations from any checkpoint. See Agent memory (Model Serving).
Implementation
For full setup instructions, app templates, and notebook examples, see: