- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2026 05:12 PM
Use two layers:
- Short-term: LangGraph checkpointer for thread/session state.
- Long-term: for your case, prefer Databricks Managed Memory if available; otherwise use self-managed Lakebase. Managed memory is the simplest cross-session option and works with LangGraph; short-term should still stay in the LangGraph checkpointer.
Delta design for long-term memory
If you specifically want Delta tables, keep them simple and semantic:
user_memoriesuser_idmemory_type(preference,fact,summary)topic(timezone, formatting, project, etc.)memory_textsource_session_idimportanceconfidencecreated_atupdated_atexpires_atnullableis_active
Optional:
memory_eventsfor raw append-only writes/auditsession_summariesfor one summary per conversation/session
Design rule: store distilled facts/preferences/summaries, not every message. Databricks internal guidance also separates semantic memory such as facts/preferences from short-term session state and recommends fewer long-term objects than short-term ones.
Short-term → long-term: what and when
Save to long-term only when the info is:
- stable user preference
- reusable fact
- durable project context
- end-of-session summary
Do not save transient tool output or every turn. Internal notes explicitly say long-term write does not need to happen every step and should be smaller than short-term memory.
Good trigger points:
- explicit user statement: “I prefer…”, “Remember that…”
- session end
- after task completion
- periodic background summarization/consolidation job
Load long-term on next login
At app start:
- identify
user_id - fetch top memories for that user
- inject only the most relevant ones into the prompt/context
- keep the rest searchable as a tool
For managed memory, Databricks recommends per-user scope and searching within that scope; one agent can also read personal scope plus shared org scope.
Best references
- Managed agent memory docs — best current reference for cross-session memory with scope/path model.
- agent-langgraph-advanced template — shows
AsyncCheckpointSaverfor short-term andAsyncDatabricksStorefor long-term in LangGraph. - Lakebase AI Integration hands-on lab — explicitly covers short-term with
CheckpointSaverand long-term withDatabricksStorefor LangGraph.
Recommendation
For classic compute + LangGraph:
- use LangGraph checkpointer for short-term
- if allowed, use Managed Memory for long-term
- if you must build it yourself in Delta, use one distilled
user_memoriestable + optionalsession_summariestable, and write only curated memories