# Cross-Session Memory

> Persist user-specific facts, preferences, and prior context across all sessions, threads, and devices — so the agent actually remembers who you are.

- **Category**: Agentic AI
- **Subcategory**: Memory
- **Canonical URL**: https://designpattern.fyi/patterns/cross_session_memory/

---

## Description
**Intent**: Persist user-specific facts, preferences, and prior context across all sessions, threads, and devices.
**Context**: Users expect continuity between visits — they mentioned a preference last Tuesday, named a project two weeks ago, shared personal context a month ago. Today they expect the assistant to remember without being re-told. Per-thread memory alone makes the assistant feel amnesic.
**Solution**: Maintain a per-user store of distilled facts (preferences, prior context, names, projects). Load relevant slices into each session's context. Provide explicit add/forget tools. Audit and surface memory entries to the user. Include deletion controls and a user-visible memory inspector (delete / disable / export) to satisfy regulatory and trust requirements.



## Use Cases
- Per-thread memory is losing important user-specific facts between sessions and the assistant feels amnesic.
- A per-user store of distilled facts can be maintained with audit, deletion, and forget controls.
- Loaded memory slices meaningfully improve responses across sessions.






## Trade-offs


### Advantages

- Continuity across sessions and devices — the agent remembers who you are.

- Compounding usefulness over time as more context accumulates.




### Considerations & Drawbacks

- Privacy obligations — stored facts require retention policies, deletion rights, and audit.

- Memory hallucinations are stickier than chat hallucinations — a wrong persisted fact poisons every future session until corrected.







---
**Reference**: [Original Source](https://www.agentpatternscatalog.org/patterns/cross-session-memory/)

