The recording
You were last reading slide 1.
Section 0
Approaches to agentic memory
Information retrieval for AI
2 November 2026
Seong Joon Oh - KAIST AI
Upcoming sessions
4 November - REFLECT discussion
Read sections 1-3 and limitations. Preparation is due 3 November, 18:00 KST.
9 November - agentic memory continuation
11 November - project workshop
Workshop task and instructions will follow.
100 words per answer
For the REFLECT preparation due tomorrow, Tuesday 3 November, 18:00 KST, aim for 100 words in each answer: the main argument, the reasoning and evidence, and the remaining question. You can still submit more, but words beyond 100 show in red and may not be read.
- I am not testing your typing, or your ability to generate long text.
- Good writing is short. Play text golf: use your editorial skills to cut every part your writing does not need.
Last lecture - what should agentic memory do?
1. Representation and organisation - represent past experiences, avoid duplicates, resolve conflicts.
2. Memory maintenance - when to write, how to handle stale information, how to recover from failed operations.
3. Human control - can people understand and edit what the agent remembers?
4. Need for memory - would unlimited context remove the need for memory?
Today we cover desiderata 1 and 2 one by one. We then turn to RL methods that learn representation and maintenance decisions end to end from task reward. That reward does not measure human control, which we cover next.
Need for memory is left for the discussion session on 18 November - Is RAW-RAG enough now and in the future?
We will cover as much as possible today. The remaining material continues next lecture.
What changes during adaptation?
- Stored facts can be corrected.
- Reusable instructions can be revised.
- Model weights can remain fixed during these changes.
Boundary case: MemRL uses reward to update stored utility estimates without changing LLM weights. RL is broader than neural weight updates.
ACE (ICLR 2026), §3; MemRL (arXiv 2026), §§3-4.
Section 1
Representation and organisation
Experience streams, stored formats, and supported searches.
From experience to stored information
Experience stream → memory construction → stored information
Compare what enters, what remains (and in which representation), and how a later query can access it.
What arrives at the memory system?
| Input stream | Arrival pattern | Information available |
|---|---|---|
| Conversation | New turns and exchanges | Statements, preferences, and conversational context |
| Agent execution | A completed task trajectory | Observations, actions, and outcome signals |
The input unit and cadence affect what the memory constructor can interpret together.
Mem0 (ECAI 2025), §2; ReasoningBank (ICLR 2026), §3.

Generative Agents: observations
Input: events and interactions in a simulated environment.
Stored object: a natural-language observation, its creation time, and its most recent access time.
Example - selected entries from Isabella’s memory stream:
2023-02-13 22:48:20: desk is idle
2023-02-13 22:48:10: Isabella Rodriguez is stretching
2023-02-13 22:33:30: desk is neat and organized
2023-02-13 22:33:10: Isabella Rodriguez is writing in her journal
2023-02-13 21:48:10: Isabella Rodriguez is watching a movie
The figure shows each description with its creation time. The most recent access time is also stored but not displayed; retrieval updates it.
An observation records an event the agent perceived. Plans and derived reflections also enter the memory stream.
Generative Agents (UIST 2023), §§4.1-4.3, PDF pp. 8-11; example entries from Figure 6, PDF p. 9.

From observations to reflections
The system derives higher-level statements from stored experiences.
When: the summed importance of the latest perceived events exceeds a threshold (150). The agents reflected roughly two or three times a day.
Which observations form one reflection:
- The LLM reads the 100 most recent records and proposes the three most salient high-level questions, e.g. What topic is Klaus Mueller passionate about?
- Each question becomes a retrieval query. The retrieved memories, including earlier reflections, form the candidate group.
- The LLM infers five insights from that group and cites its evidence, e.g. Klaus Mueller is dedicated to his research on gentrification (because of 1, 2, 8, 15).
- The reflection is stored with pointers to the cited records. These are its children in the tree.
A reflection can also support a later reflection. Observed event and inferred statement have different evidential status.
Generative Agents (UIST 2023), §4.2 and Figure 7, PDF pp. 9-10. Original reflection tree.
How does the agent retrieve?
Generative Agents combines relevance, recency, and importance:
- Relevance uses embedding similarity to the query.
- Recency depends on the last retrieval time.
- The LLM assigns importance when the record is created.
Observations and reflections can be retrieved together.
Generative Agents (UIST 2023), §4.1, PDF p. 9. Scores are normalised before combination.

Mem0: conversation to factual memories
What is stored: only the salient facts in each new exchange. Generative Agents records every perceived event; Mem0 decides at write time what is worth keeping.
Context at write time: the extractor reads the new message pair together with a conversation summary and recent messages. Each fact is written with the wider conversation in view.
What the compact store buys (LoCoMo, LLM-judge score J):
| Stored or read per conversation | J | p95 total latency | |
|---|---|---|---|
| Mem0 facts | ~7k tokens stored | 66.9% | 1.44 s |
| Best RAG over raw chunks | - | 61.0% | - |
| Full raw conversation | ~26k tokens read | 72.9% | 17.1 s |
Facts beat retrieving raw chunks. Full context still answers better, at about twelve times the latency.
Mem0 (ECAI 2025), §2.1, PDF pp. 3-4; Table 2 and §§4.3, 4.5, PDF pp. 11-14.
What Mem0 stores from a conversation
Constructed example
Input to the extractor
Summary The user plans social events with the assistant's help.
Recent Assistant: Shall I book the steakhouse again for Sara's birthday?
New pair User: No, I've gone vegetarian since my trip to India.
Find somewhere else for her on Friday.
Assistant: Got it. I'll look for vegetarian places.
Stored memories
[2026-11-02] User has been vegetarian since a trip to India.
[2026-11-02] Sara's birthday dinner is on Friday.
The recent message resolves her to Sara and supplies the birthday. The assistant’s acknowledgement adds no new fact, so nothing is stored for it. Each memory keeps a timestamp, so on Friday can later be resolved to a date.
Pipeline from Mem0 (ECAI 2025), §2.1, PDF pp. 3-4; timestamped memories as in the answer prompt, Appendix, PDF p. 19. The dialogue and facts are illustrative, not system output.

Mem0g: entities and relationships
Stored information: typed entities, labelled relationships, embeddings, and metadata.
Later access: match an entity and explore its relationships, or retrieve semantically similar triples.
The graph makes relationships explicit rather than leaving them inside an isolated sentence.
Constructed example - the birthday-dinner exchange, stored as a graph:
Nodes user (Person) Sara (Person)
vegetarian_food (Diet) steakhouse (Restaurant)
India (Location) birthday_dinner (Event)
Edges (user, prefers, vegetarian_food)
(user, visited, India)
(birthday_dinner, celebrates, Sara)
(birthday_dinner, happened_on, Friday)
Invalid (user, prefers, steakhouse)
Each node also carries an embedding and a creation timestamp. The old steakhouse preference is marked invalid, not deleted.
What the graph adds (LoCoMo, LLM-judge score J):
| Mem0 facts | Mem0g graph | |
|---|---|---|
| Single-hop | 67.1 | 65.7 |
| Multi-hop | 51.2 | 47.2 |
| Open-domain | 72.9 | 75.7 |
| Temporal | 55.5 | 58.1 |
| Overall | 66.9 | 68.4 |
| Memory per conversation | ~7k tokens | ~14k tokens |
| p95 total latency | 1.44 s | 2.59 s |
The graph helps temporal and open-domain questions but not single-hop or multi-hop ones. It doubles the store and adds over a second of latency.
Mem0 (ECAI 2025), §2.2 and Figure 3, PDF pp. 5-6. Original graph-memory architecture. Example nodes and edges are illustrative. Scores from Tables 1-2, PDF pp. 9 and 11; memory size from §4.5, PDF p. 14.

A-MEM: enriched, linked notes
Textual interactions become notes with original content, timestamp, contextual description, keywords, tags, an embedding, and links.
Similarity search uses the enriched representations. Links do not imply Mem0g’s entity-centred read procedure.
Constructed example - the birthday-dinner exchange, stored as a note:
content User: No, I've gone vegetarian since my trip to India.
Find somewhere else for her on Friday.
Assistant: Got it. I'll look for vegetarian places.
time 2026-11-02
keywords vegetarian, diet change, birthday, restaurant booking
tags food preferences, social plans, scheduling
context After a trip to India the user has turned vegetarian and
wants a new venue for Sara's birthday dinner on Friday.
links -> note on last year's steakhouse booking, -> note on Sara
Unlike Mem0, the note keeps the original exchange. The LLM adds keywords, tags, and a description around it, and links it to related notes.
A-MEM (NeurIPS 2025), sections 3.1-3.4, PDF pp. 4-5; note fields from Eq. 1. Example values are illustrative.

ReasoningBank: trajectories to strategies
Input: a completed agent task with its observations and actions.
An LLM judge labels the attempt as successful or failed. Extraction uses that judgement to derive reusable guidance.
Stored record: title, description, and strategy content.
The record captures how to approach a task, beyond the facts mentioned during it.
Constructed example - a failed comparison becomes a strategy:
Task Which run has higher nDCG@10, run A or run B?
Trajectory open run_A results -> nDCG@10 0.41, corpus v1
open run_B results -> nDCG@10 0.44, corpus v2
answer "run B is better"
Judge failure - the runs used different corpus versions
Title Check the dataset manifest before comparing runs
Description Scores are comparable only when runs share a corpus version.
Content 1. Read each run's manifest.
2. Confirm that corpus version and query set match.
3. If they differ, report the mismatch, not a winner.
ReasoningBank (ICLR 2026), §§3.1-3.2, PDF pp. 4-5. Outcome labels are self-judged, not ground-truth feedback at test time. Record format from the extraction prompt, Appendix A.1; example values are illustrative.
Retrieve guidance for a later task
New task → embedding search → relevant strategy records → agent context
The original trajectory and the distilled strategy are different representations of experience.
Constructed strategy: “Check the dataset manifest before comparing evaluation runs.”
Its usefulness depends on whether it applies to the new task. No model-weight update is needed to supply it as context.
ReasoningBank (ICLR 2026), §3.2. The dataset-manifest instruction is a teaching example.
Compare the input, stored information, and search
| Method | Input | Stored information | Search |
|---|---|---|---|
| Generative Agents | Simulated experiences | Observations and reflections | Relevance, recency, importance |
| Mem0 | Conversational exchanges | Facts | Semantic similarity |
| Mem0g | Conversational exchanges | Entity relationships | Entity and triple search |
| A-MEM | Textual interactions | Enriched, linked notes | Note similarity |
| ReasoningBank | Completed task trajectories | Reusable strategies | Embedding similarity |
Sources are the method sections cited on the preceding slides. This compares mechanisms, not benchmark performance.
Which method stores which record?
Constructed records from the birthday-dinner exchange and the failed run comparison.
Connect each method to one context. Select a method, then a context. One point per correct match; submit once.
Your connections
Sign in with your course account to submit.
Section 2
Memory maintenance
Consistency, growth, and context pressure.
The maintenance module
Current memory + elapsed time + events → revised memory
Events may include new information, retrieval, feedback, or a capacity limit.
A change in the evaluation corpus
Constructed example
The assistant initially records “Use corpus v1.” The instruction appears in messages, planning notes, and a summary.
Later: “Use corpus v2 for final evaluation. Keep the pilot results on v1.”
The intended memory must preserve the pilot history and the current instruction.
Memory maintenance
Keep stored knowledge consistent
Repetition and independent evidence
| Stored text | Origin |
|---|---|
| “Use corpus v1.” | Original instruction |
| “Evaluation uses v1.” | Note derived from that instruction |
| “The project uses v1.” | Summary of the note |
The copies have a shared origin. More retrieval hits do not establish independent support.
Constructed records from the running example.

Mem0: choose an operation on related records
Candidate fact → retrieve similar memories → LLM operation → revised store
| Operation | Decision described in the paper |
|---|---|
| ADD | Create a new memory |
| UPDATE | Augment an existing memory |
| DELETE | Remove a memory contradicted by new information |
| NOOP | Make no change |
The retrieved records determine which existing knowledge the model can consider.
Mem0 (ECAI 2025), §2.1, PDF p. 4.

Superseded does not mean historically false
Mem0g’s update resolver can mark an obsolete relationship invalid rather than physically removing it. The store keeps historical information while distinguishing it from current relationships.
Desired state in the constructed example
| Information | Interpretation after the change |
|---|---|
| Pilot results used corpus v1. | Valid historical record |
| Final evaluation should use corpus v1. | Superseded instruction |
| Final evaluation should use corpus v2. | Current instruction |
Replacing every mention of v1 would destroy a distinction the project still needs. The decision still depends on recognising the correct entities, relationship, and new evidence.
Mem0 (ECAI 2025), §2.2, PDF p. 6. The corpus example is constructed.

MindMemOS: consolidate accumulated records
Online writes leave redundant, outdated, or conflicting records. Offline dreaming consolidates them around each entity.
- Scope - start from recent writes and gather the active memories about the same entity.
- Detect - an LLM finds conflicts, duplicates, complementary fragments, or ambiguous relations.
- Act - a second LLM call merges, updates, archives, or links records, keeping links to their sources. When identity or order is uncertain, it prefers links over archival.
Example (MemoryAgentBench, where the later fact counts as true). M1 (later) says Nobuhiro Watsuki is famous for The Fairly OddParents; M2 (earlier) says Rurouni Kenshin. Before dreaming, retrieval returns both and the model answers Rurouni Kenshin. Dreaming archives M2 as superseded by M1, so the same query returns The Fairly OddParents.
| Answer model | Accuracy before dreaming | After dreaming | Active memories archived |
|---|---|---|---|
| gpt-4o-mini | 0.377 | 0.459 | 20.4% |
| gpt-5-mini | 0.545 | 0.585 | 22.5% |
The conflict is settled in stored state, so the answer model no longer has to compare timestamps.
MindMemOS (arXiv 2026), section 3.4, PDF p. 9; section 5.1 and Figure 12, PDF pp. 18-20; overall FactConsolidation accuracy (SubEM) from Table 3 and section 4, PDF p. 17. Timestamps were removed from the retrieved context during evaluation.

ACE: local updates to a playbook
ACE represents a playbook as identified entries with content and metadata. A Generator produces task trajectories, a Reflector extracts insights, and a Curator proposes delta updates. Lightweight non-LLM logic merges the updates, so a correction targets selected entries rather than requiring a complete rewrite.
Example - constructed playbook revision
- Before: “Compare the new run with the previous results.”
- After: “Check the dataset manifest and evaluation stage before comparing runs.”
This changes task guidance. It does not necessarily change the procedure that maintains memory.
A successful write can leave inconsistent knowledge. The system writes “Final evaluation uses v2” and the database reports success. A project summary still says “Final evaluation uses v1”, and retrieval later returns it. Check which records were revised and which derived claims remain current.
ACE (ICLR 2026), §§3.1-3.2, PDF pp. 4-5. The revision and the failure are constructed examples.
Memory maintenance
Control memory growth and context bloat

Consistency does not control growth
A store can remain consistent as its records outgrow storage or active context. Compression can also discard useful information.
ACE’s AppWorld case illustrates context collapse under repeated rewriting. It does not measure storage capacity or deduplication.
ACE (ICLR 2026), Figure 2, PDF p. 3.

MemoryBank: forgetting and reinforcement
Inspired by the Ebbinghaus forgetting curve, MemoryBank models retention as:
Recall increases strength and resets elapsed time. Without recall, retention declines as time passes.
This is the paper’s simplified psychology-inspired rule.
MemoryBank (AAAI 2024), §2.3, PDF p. 4.

MemGPT and MemoryOS manage limited context differently
Both borrow from operating systems. A small, fast space (the prompt) sits above larger, slower storage.
| MemGPT | MemoryOS | |
|---|---|---|
| Levels | Prompt (instructions, working context, message queue) above external recall and archival storage | Short-term turns, mid-term topics, long-term user and assistant profile |
| Who moves information | The model, through function calls | Fixed rules |
| When space runs short | At about 70% of the context window the model is warned and can save what matters; at 100% older messages leave the prompt | When the short-term queue is full, the oldest turn moves to mid-term |
| What happens to old information | Messages that leave the prompt stay in recall storage | When mid-term space runs out, the least-used topics are deleted |
| Bringing it back | The model calls a search function | Each query retrieves from all three levels |
MemGPT (arXiv 2023), §§2.1-2.4 and Figure 3, PDF pp. 2-4; MemoryOS (EMNLP 2025), sections 3.2-3.4 and Figure 1, PDF pp. 3-5.
Quiz: revise a changed preference
In March, the user told the agent, “I love the steakhouse on Main Street.” In October, the user says, “I’ve gone vegetarian.”
Next month, the user may ask, “Book somewhere for dinner,” or “Why did you book the steakhouse last spring?”
Which revision of the March record keeps both answers correct?
Sign in with your course account to choose. The lecturer will reveal responses and the answer.
What representation and maintenance have shown
Representation and organisation
- Methods differ in what they keep and how they represent knowledge: every observation (Generative Agents), salient facts (Mem0), an entity graph (Mem0g), enriched and linked notes (A-MEM), or reusable strategies (ReasoningBank).
- The format decides which later questions are easy.
Memory maintenance
- Keeping knowledge consistent: Mem0 and Mem0g update or invalidate records as they write, MindMemOS consolidates them offline, and ACE edits individual playbook entries.
- Controlling growth: MemoryBank lets unrecalled memories fade, MemGPT moves messages out of the prompt but keeps them, and MemoryOS deletes rarely used topics.
In all of these methods, a designer prescribes the memory decisions. Next, we let the system learn them from reward.