Blog
What is agent memory?
A customer opens your bank’s support chat and tells the billing agent, “For future refunds, I prefer bank transfer rather than PayPal.”
The following week, the same customer asks a different agent—the refunds agent—where their money is. If that agent cannot retrieve the customer’s preference, the customer has to explain everything again. Each repetition makes the experience less seamless and can weaken the customer’s trust.
Agent memory helps prevent this. It is a system outside the model that preserves important information from one conversation and makes it available in another—even when a different agent serves the customer.
This article explains what agent memory stores, why a larger context window does not replace it, and how responsibility is divided between your application and the memory system.
Why a larger context window is not memory
A language model does not retain information between calls. Everything it needs to know about a customer must be supplied as context for the current turn.
A larger context window lets you include more information, but it does not decide what belongs there. When a customer starts a new conversation, your application must reconstruct the relevant context.
You could include every previous conversation in every prompt. However, this becomes expensive as conversations accumulate and can bury an important fact—such as a new refund preference—among months of unrelated messages.
A transcript also gives you no simple way to manage an individual fact. If the customer later switches back to PayPal, the bank-transfer preference still appears in an earlier conversation.
A long-term memory layer addresses this problem by extracting durable information into separate, searchable records. The application can recall the information relevant to the current request and update or delete an individual memory when necessary.
Session memory and long-term memory
Many agent-memory designs distinguish between two kinds of memory because conversations and the durable information extracted from them have different requirements.
Session memory preserves the ordered events in a conversation: who said what and when. It allows an agent to understand references such as “that account,” meaning the account mentioned three messages earlier.
In Redis Agent Memory, automatic summarization can condense older events after a conversation reaches a configured threshold while preserving recent events in full.
Long-term memory stores information that remains useful after the conversation ends, such as a customer’s refund preference. Each memory is stored separately and can be retrieved through semantic search and structured filters, without requiring the agent to read earlier conversations.
The two tiers can also have different retention periods. A conversation transcript might be useful for only a day, while a customer preference might need to remain available much longer. Separate time-to-live settings allow old sessions to expire without immediately deleting the durable information extracted from them.
Ownership and authorization
A memory without an owner creates a privacy risk. One customer’s refund preference must never appear in another customer’s conversation.
Redis Agent Memory associates sessions and long-term memories with an owner. Personal and shared namespaces can further organize memories for different users, teams, or applications.
The application remains responsible for authorization. It should derive identity from the authenticated user—not from untrusted request content—and verify that every session or memory retrieval is permitted.
Memory also provides context, not authority. Recalling that a customer prefers bank transfer should not, by itself, authorize a payment or account change. The application must continue to enforce the bank’s identity-verification, approval, and transaction policies.
Provenance and debugging
A memory without a source creates a debugging problem.
Memory extraction uses a model, and models can make mistakes. If an agent retrieves an incorrect refund preference, the team needs to identify which conversation or document produced it, inspect the evidence, and correct or delete the memory.
Redis Agent Memory provenance links extracted memories to their inputs. Session evidence identifies the events supplied during extraction, while document evidence can identify MemoryETL ingestions, chunks, and source spans.
These links show what input the extraction process received. They are useful evidence, but they do not guarantee that every statement in the resulting memory is a direct quotation or an objectively correct fact.
When a file is enough
Not every agent needs a memory service.
If one person uses the agent, the number of facts is small, and those facts rarely change, a Markdown file can work well. A coding assistant that remembers a project’s conventions is a good example. You can inspect the file, edit it manually, and see exactly what the agent has been told.
A file becomes less practical when an agent serves many customers:
- Each customer’s memories must remain isolated.
- Facts must be updated in one authoritative place.
- Several agents may need access to the same customer context.
- Access must be authorized on every request.
- Data-deletion requests must remove all memories associated with an owner.
These requirements call for a dedicated memory service.
How Redis Agent Memory divides the work
Here is how the process works in Redis Agent Memory, part of Redis Iris.
Your application records conversation events. As the conversation happens, the application appends each user and assistant message to session memory. The first event’s actorId establishes the session owner.
The session write is synchronous, but it does not wait for summarization or long-term-memory extraction.
Redis Agent Memory summarizes and extracts in the background. When enabled, it summarizes older events after the conversation reaches a configured threshold. It also extracts long-term memories according to the configured extraction cadence.
Extraction reads the session’s accumulated events—not only the latest message—so it can resolve references such as “switch it to bank transfer.” It compares candidate memories with existing ones to determine whether the information is duplicated or new.
When an application already knows the authoritative value of a fact, it can also create, update, or replace the corresponding long-term memory directly.
Redis Agent Memory preserves source evidence. Extracted memories can be traced to the session events or document inputs supplied during extraction. If a memory is incorrect, the team can inspect its evidence and correct or delete the record.
Your application recalls relevant information. During the later refund conversation, the application searches long-term memory using the authenticated customer’s owner ID. It can include the retrieved preference in the agent’s context.
The refunds agent can then acknowledge the preference and follow the bank’s approved verification and payout workflow. It should not execute the transfer solely because the preference appeared in memory.
Redis Agent Memory applies the configured retention periods. Session memory and long-term memory have independent TTL settings. The earlier chat can therefore expire while the extracted preference remains available for as long as the business requires.
Beyond recall
Redis Iris includes other services that complement Agent Memory.
With Lens configured, teams can trace an agent turn from retrieval through prompt construction, model calls, and tool calls. Agent Memory calls appear in the trace, helping teams understand whether the right memory was recalled and whether it reached the model.
Agent Playbooks provides a governed path for turning suggested answers and procedures into reusable content. Applications and agents can submit proposals, and supported deployments can extract FAQ proposals from Agent Memory sessions. A reviewer must inspect and accept the proposal, then publish the resulting entry before agents using the playbook can retrieve it.
To see what happens to a single fact from capture through expiration, follow one memory through its complete lifecycle.
To choose a memory system for your own agent, compare the available approaches side by side.
Try Redis Agent Memory.
Get started with Redis today
Speak to a Redis expert and learn more about enterprise-grade Redis today.




