Raw input from the guest
AI Models & Assistants / Knowledge library
Agent Memory
State retained or retrieved to support an agent across steps or sessions
Why learn Agent Memory?
Memory supports continuity and personalization, but stale or cross-user memories can cause serious errors.
Where it came from
Agent memory can include current working state, durable records, and retrieved past events. Reliable designs define what is stored, scoped, updated, and deleted.
Build your understanding
Work through these exercises in order. Try the task before opening a reference.
- Distinguish memory types: Which item is durable episodic memory rather than the current prompt context?
- Enforce memory scope: What must a multi-user agent do before retrieving memories?
- Control memory writes: Why should an agent not store every model statement as fact?
- Handle stale memory: A customer's address changes. Which design prevents the old value from silently winning?
- Evaluate memory value: Which comparison measures whether memory helps rather than merely adds tokens?
Documentation and sources
- Primary reference (arxiv.org)
Connect the ideas
Explore next
Real World Example
Adaptive Concierge for Long-Term Guest Relations
Luxury boutique hotels managing repeat guest preferences across multiple years.
The business problem
Front-desk agents fail to recall specific, non-obvious guest preferences (e.g., preferred room temperature or dietary nuances) from visits occurring months or years apart, leading to a fragmented service experience.
How this topic solves it
Implementing an agent memory architecture allows the system to store a persistent record of guest interactions as natural language observations, synthesize these into higher-level reflections, and retrieve relevant historical context during new booking inquiries.
- Initialize a persistent memory stream to record every guest interaction as a timestamped observation.
- Implement a reflection mechanism that periodically scans the memory stream to synthesize high-level insights about guest preferences.
- Configure a retrieval function that queries both raw observations and synthesized reflections based on the current guest context.
- Integrate the retrieved memory into the agent's planning phase to generate personalized responses.
This diagram illustrates how guest data flows through the memory system to inform agent behavior.
Storage of all past experiences
Synthesizes high-level insights
Fetches context for the agent
Personalized output
- Guest Interaction → Stores → Memory Stream
- Memory Stream → Summarizes → Reflection Engine
- Memory Stream → Queries → Retrieval Module
- Reflection Engine → Enriches → Retrieval Module
- Retrieval Module → Informs → Agent Response
Expected business outcome
The agent provides consistent, personalized service by demonstrating awareness of historical preferences, fostering a sense of continuity and recognition for the guest.
Limitations and checks
The primary limitation is memory bloat, where the accumulation of irrelevant historical data degrades retrieval precision; this can be checked by monitoring the relevance scores of retrieved context against the current interaction intent.