Cross-Session Memory

aka Persistent User Memory, Long-Lived User Profile, Beat Agent Amnesia, No-Forget Memory, Agent Forgets Between Sessions, Session-to-Session Memory

category: memory · status: mature

Intent

Persist user-specific facts, preferences, and prior context across all sessions, threads, and devices.

Context

User-facing assistants where users expect continuity beyond a single conversation.

Problem

Per-thread memory loses everything between sessions; users repeat themselves; the assistant feels amnesic.

Forces

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. Deletion controls and a user-visible memory inspector (delete / disable / export) satisfy regulatory and trust requirements.

Variants

Profile facts (key-value)

Distil each session into a small set of stable user facts (preferences, goals, constraints). Inject the facts into every new session's system prompt.

Distinguishing factor: structured key-value distillation

When to use: User-facing assistants where personalisation is the point and facts are short and stable.

Per-session narrative summary

Each session is summarised into a paragraph; recent summaries are retrieved and prepended to the new session's context.

Distinguishing factor: narrative summaries

When to use: Conversational continuity matters more than fact extraction; users expect the agent to 'remember the conversation'.

See also: episodic-summaries

Embedded session retrieval

Past sessions are embedded and stored in a vector index; each new turn retrieves relevant past content by similarity.

Distinguishing factor: retrieval-time relevance

When to use: Memory is large and only a small fraction is relevant to any one new turn.

Tiered cascade

Combines profile facts, episodic summaries, and vector memory at different tiers; each tier retrieves at its own rate.

Distinguishing factor: multi-tier composition

When to use: Long-running personalised agents where no single memory shape is enough.

See also: five-tier-memory-cascade

Constrains

Memory entries must be added through declared tools; the model cannot silently mutate persistent user state.

Consequences

Benefits

Liabilities

Known Uses

Related Patterns

References