Once upon a time, a little robot forgot everything
Once upon a time, in a cozy village called Promptington, there lived a little robot named Pip. Pip was the kindest helper in the whole village. Pip could bake bread, fix fences, and answer any question you asked. But Pip had one big, sad secret: every morning, Pip woke up and forgot everything.
On Monday, Baker Rosa told Pip, "I'm allergic to walnuts!" On Tuesday, Pip cheerfully handed her a walnut muffin. On Wednesday, Farmer Tom explained where the lost sheep usually hide. On Thursday, Pip searched the wrong hill all day. The villagers loved Pip, but they were getting a little tired of telling Pip the same things over and over again.
So one evening, Pip climbed the hill to visit the Wise Old Owl, who lived in the tallest tree in the forest. "Owl," said Pip, "how can I remember things?" The Owl blinked slowly and smiled. "Little one," she said, "remembering isn't just one trick. It's a whole toolbox. Let me introduce you to my friends."
And that is the story of how Pip met a Mole with a lantern, a Spider who weaves webs, a Tortoise who reads tables of contents, and a great big Village Book that anyone can write in. By the end, Pip never forgot Rosa's walnut allergy again.
If you build AI agents, you are building Pip. Large language models wake up every conversation with no memory at all. This post explains, story first and code second, the memory tricks people are combining in 2026: Google's Memory Bank, RAG, GraphRAG, vectorless RAG, and the Open Knowledge Format (OKF).
In this story:
- The different kinds of memory
- The Wise Owl's Memory Bank
- Mole the Librarian (RAG)
- Weaver the Spider (GraphRAG)
- Tortoise and the Table of Contents (vectorless RAG)
- The Great Village Book (OKF)
- Everyone works together (hybrid memory)
- Pip's memory quiz (testing memory)
- Forgetting on purpose (deleting memories)
Chapter 1: The different kinds of memory
Before we meet the Owl's friends, we need to know what kinds of remembering there are. People who study brains (and people who build agents) use a few special words.
Short-term (working) memory: Pip's little chalkboard
Like I'm 5: It's the little chalkboard Pip carries around. Pip can write a few things on it while talking to you, but at bedtime it gets wiped clean.
For an AI agent, this is the context window: the text the model can "see" right now in the current conversation. It's fast and precise, but small, and it disappears when the session ends.
Long-term memory: Pip's treasure chest
Like I'm 5: It's a treasure chest where Pip puts important things so they're still there tomorrow, and next week, and next year.
For agents, long-term memory is anything stored outside the model and the chat: a database, files, a vector store, a knowledge graph. The hard part isn't storing things. It's choosing what to save and finding the right thing later.
Long-term memory comes in three flavours:
Episodic memory: the diary.
Like I'm 5: "On Monday, Rosa told me she's allergic to walnuts." It remembers things that happened, with a when and a who.
In agents: past conversations, events, and interactions, usually with timestamps.
Semantic memory: the encyclopedia.
Like I'm 5: "Walnuts are nuts. Sheep like the shady side of the hill." Facts that are true no matter when you learned them.
In agents: facts, preferences, and knowledge about the world or the user ("Rosa is allergic to walnuts", "the user prefers Python").
Procedural memory: riding a bicycle.
Like I'm 5: You don't remember learning to ride your bike. You just know how.
In agents: skills, workflows, and instructions, like a prompt template or a SKILLS.md file that tells the agent how to do a task.
Here's the key idea: episodic memories turn into semantic memories. Rosa saying "I'm allergic to walnuts" on Monday (an episode) should become the lasting fact "Rosa: walnut allergy" (semantic). That conversion step is exactly what Google's Memory Bank does for you.
Chapter 2: The Wise Owl's Memory Bank (Google Memory Bank)
Every evening, the Owl listened to Pip's day. She didn't save everything. She picked out the important bits, wrote each one on a small card, and dropped it into a big glass jar labeled with the villager's name. If a new card disagreed with an old one ("Tom's sheep now hide by the pond, not on the hill!"), the Owl tidied up the jar so it never held two stories that disagreed.
Like I'm 5: Memory Bank is a wise owl who listens to your chats, writes the important parts on cards, and keeps one neat jar of cards for each person.
The technical version: Vertex AI Agent Engine Memory Bank is Google Cloud's managed long-term memory for agents. It:
- Extracts memories from conversations using Gemini. You can tell it which topics matter by giving it topics and a few examples.
- Consolidates new information with what it already knows, resolving contradictions so memories stay up to date (Google Cloud blog).
- Scopes memories to an identity (a user, an agent), so each person gets their own jar.
- Retrieves them with similarity search when the agent needs them.
- Expires stale memories with an optional TTL.
It plugs into Google's Agent Development Kit (ADK) out of the box, and Google says it also works with LangGraph and CrewAI. Google says the design is grounded in Google Research work accepted at ACL 2025, and its announcement links to the paper In Prospect and Retrospect: Reflective Memory Management for Long-term Personalized Dialogue Agents.
A note on status: Memory Bank was announced in public preview in July 2025, and Google's newer docs list it as Agent Platform Memory Bank. Check the docs for its current status and pricing before you build on it.
⚠️ The villain of this chapter: memory poisoning. If someone tricks Pip into believing "Rosa loves walnuts", the Owl will faithfully save that lie. Google's docs call this memory poisoning and suggest screening inputs (for example with Model Armor).
Chapter 3: Mole the Librarian (classic RAG)
Deep under the village lived Mole, who looked after a gigantic underground library. Every letter, recipe and notice the villagers had ever written ended up on Mole's shelves, torn into single pages so they would fit.
When Pip asked a question, Mole lit a lantern, sniffed the question, and then sniffed along the shelves. Mole couldn't read very well, but had a wonderful nose. A few minutes later Mole would be back with the handful of pages that smelled most similar to the question. Ask "Where do the sheep hide?" and you'd get three pages that all smell of sheep.
Most days that was exactly what Pip needed. Some days, though, a page smelled of sheep only because it was a recipe for sheep's-milk cheese, and Pip learned that smelling alike is not the same as being the answer.
Like I'm 5: RAG is a librarian who brings you the pages that sound most like your question, so you can read them before answering.
The technical version: Retrieval-Augmented Generation (RAG) splits documents into chunks, turns each chunk into an embedding (a list of numbers that captures meaning), and stores them in a vector database. At question time, it embeds the question, finds the top-K most similar chunks, and pastes them into the prompt.
- ✅ Scales to huge piles of documents, and it's cheap and fast.
- ❌ "Sounds similar" isn't always "is relevant". Chunking can split a table in half, and it has no idea that a fact changed last Tuesday.
Chapter 4: Weaver the Spider (GraphRAG and temporal knowledge graphs)
In the corner of the barn lived Weaver, a spider who knew how everyone was connected. Weaver didn't keep pages at all. Weaver kept a web, with a shiny bead for every villager, animal and place, and a thread between any two that had something to do with each other. Rosa → bakes for → the school. The school → is next to → Tom's farm. Tom → owns → the sheep.
So when Pip asked, "Who should I warn if the school lunch has walnuts in it?", Weaver simply walked the threads: from the school, to Rosa who bakes for it, to her allergy. Mole could never have sniffed that out, because no single page said it.
Weaver's web also had little dates tied to each thread: "Tom owned the red barn until spring." When Tom sold the barn, Weaver didn't snip the old thread. Weaver tied on an end date and spun a new one, so Pip could still ask who owned the barn last winter.
Like I'm 5: A knowledge graph is a spider web where every bead is a thing and every thread says how two things are connected, and when.
The technical version: GraphRAG stores entities (nodes) and relationships (edges) instead of just text chunks, so the agent can answer "how is X related to Y?" by walking the web. There are two well-known ways to build Weaver's web.
1. Microsoft's GraphRAG: the web with neighbourhood notes. Imagine Weaver also sorts the beads into neighbourhoods (the bakery corner, the farm side, the school lane) and pins a short summary note on each one. Now Pip can ask a big question, like "What is the whole village worried about this year?" No single page answers that, and Mole's top few pages would miss most of it. Weaver reads every neighbourhood note, collects the important points, and blends them into one answer.
That is what Microsoft's GraphRAG does. An LLM extracts a knowledge graph from your documents, groups it into a hierarchy of communities, and writes a summary for each one (paper). It then answers in two modes:
- Global search maps the question over the community summaries and reduces the results into one answer. Use it for whole-dataset questions like "what are the top themes?"
- Local search starts from specific entities and explores their neighbours. Use it for questions about one particular thing.
The price is paid up front: Microsoft itself says the fit depends on whether those benefits outweigh the cost of building the graph index (Microsoft Research).
2. Temporal knowledge graphs: the web with dates. For agent memory, where facts keep changing, the poster child is Zep and its open-source engine Graphiti, a temporally-aware knowledge graph (paper, repo). Each fact carries valid_at / invalid_at dates, so when something changes, the old fact is marked as superseded instead of silently overwritten. Retrieval mixes semantic, keyword, and graph-traversal search (Neo4j blog).
- ✅ Great for "who, what, when, how are they connected" questions.
- ❌ You need a graph database, and building the graph costs LLM calls.
Chapter 5: Tortoise and the Table of Contents (vectorless RAG)
Some books in Promptington were enormous: the Village Law Book, the Big Book of Harvest Numbers. Mole's sniffing didn't work well on them, because every page smelled the same. In the Law Book, every single page smells of rules.
So Pip asked Tortoise, who was slow but very, very careful. Tortoise opened the table of contents, read the chapter names, and thought out loud: "Pip wants the rule about walnuts in baking. That's not Sheep, and it's not Fences. It must be Allergies, Chapter 7. And inside Chapter 7, Section 2 is the one about walnuts."
Then Tortoise turned straight to page 44 and put a pebble on the exact line. It took longer than Mole's sniffing, but Pip could see precisely why Tortoise had picked that page, and it was the right one.
Like I'm 5: Vectorless RAG doesn't sniff for similar-sounding pages. It reads the table of contents and thinks about where the answer should be, just like you do with a big book.
The technical version: PageIndex builds a hierarchical, table-of-contents-style tree index of a document, and an LLM reasons its way down the tree to the right section. There are no embeddings, no chunking, and no vector database. The project's slogan is that similarity isn't the same as relevance.
- ✅ Traceable answers with exact page and section references. ThoughtWorks notes it works well on structure-heavy documents like financial reports and legal texts (Tech Radar).
- ❌ The LLM is in the retrieval loop, so it's slower and costs more on large documents. DataCamp's benchmark found the advantage grows with document length, so it's a trade-off rather than a clean win (tutorial).
Chapter 6: The Great Village Book (Open Knowledge Format)
Before the Village Book, everybody in Promptington kept what they knew in their own heads or their own notebooks. The baker knew about allergies, the farmer knew about sheep, and whenever a new helper arrived, somebody had to explain everything all over again.
So the villagers put a giant, open book on a wooden stand in the town square. It had one page for every important thing: a page for "Sheep", a page for "Rosa's Bakery", a page for "Walnut Allergies". Each page had a little label at the top (who wrote it, when, and whether it's still true), and strings connected pages that were related.
Anyone could read it: villagers, the Owl, Mole, even visiting robots from other towns. Anyone could add a page, using just a pencil. And because every page looked the same, with the label on top and plain words underneath, a robot from the next village could read it just as easily as Pip could.
Like I'm 5: OKF is a big shared storybook where each page is about one thing, written in plain words that people and robots can read, and anyone can bring their own pencil.
The technical version: The Open Knowledge Format (OKF) is an open specification that Google Cloud published as v0.1 on June 12, 2026 (announcement). Knowledge is a directory of Markdown files with YAML frontmatter, with one concept per file, cross-linked into a graph. It's Apache 2.0, needs no SDK, and isn't tied to any cloud or model. Google pitches it as a formalised version of the "LLM wiki" pattern, and it's the ingest format for Google Cloud's Knowledge Catalog.
--- title: Walnut Allergy Policy status: stable updated: 2026-11-20 related: [rosas-bakery.md, menu-labels.md] --- All baked goods containing tree nuts must be labeled... - ✅ Human-readable, diffable in git, portable across tools and vendors.
- ❌ It's a format, not a retrieval engine. You still need a way to find the right page.
Memory Bank vs OKF, in one line: the Owl's jars hold what Pip learned about each person. The Village Book holds what the whole village agrees is true.
Chapter 7: Everyone works together (hybrid memory)
Here's the happy ending. Pip didn't pick one friend. Pip built a treehouse with three floors and a web around it, and gave every friend a home:
- Top floor: the Owl's jars. What Pip knows about each villager (episodic → semantic memory).
- Middle floor: the Village Book. Facts the village has agreed on (curated knowledge).
- Ground floor: Mole and Tortoise. Mole for quickly searching huge piles of papers, Tortoise for careful reading of big, structured books.
Wrapped around the whole tree is Weaver's web: who's connected to whom, and what changed when.
And the how-to knowledge from Chapter 1 (procedural memory, the bike-riding kind)? That hangs on Pip's toolbelt: instruction files such as skills and system prompts that tell an agent how to do a task.
That's exactly where real systems are heading. Most serious memory layers in 2026 mix techniques instead of choosing one:
| System | What it combines | Think of it as |
|---|---|---|
| Mem0 | Vector + graph + key-value; extracts facts from chats (repo) | An open-source Owl |
| Zep / Graphiti | Temporal knowledge graph + semantic + keyword search (repo) | Weaver with a calendar |
| Cognee | Graph + vector + relational, from documents (repo) | Weaver who reads books |
| Letta (ex-MemGPT) | Tiered memory; the agent manages its own RAM vs disk (repo) | Pip deciding what stays on the chalkboard |
| MinnsDB | Temporal graph + vectors + BM25 + claim store + tables, in one Rust binary, as its founder describes it | The whole treehouse in one trunk |
| OKF + RAG | OKF for curated, exact knowledge; RAG for the long tail (one author's take) | Village Book + Mole |
| ClawMem | Atomic memories + OKF wiki pages + semantic search + provenance (ClawMem's announcement) | A Village Book where every page points back to the diary entry it came from |
A sketch of the treehouse in code
Here's what a hybrid memory lookup might look like. It's pseudocode, so the function names are placeholders and not real SDK calls:
def build_context(user_id: str, question: str) -> str: parts = [] # 1. Owl's jar: personal, consolidated memories (Memory Bank / Mem0 / Zep) parts += user_memory.retrieve(scope={"user_id": user_id}, query=question, top_k=5) # 2. Village Book: curated OKF pages, picked by title/frontmatter, then followed by links pages = okf_index.match(question) # e.g. keyword or embedding over titles parts += okf_index.expand_links(pages, hops=1) # 3a. Mole: broad recall over a big unstructured corpus parts += vector_store.search(question, top_k=8) # 3b. Tortoise: precise, reasoning-based lookup in long structured docs if looks_like_long_doc_question(question): parts += tree_index.reason_and_retrieve(question) # PageIndex-style # 4. Weaver: relationships and what changed over time parts += graph.query_neighbors(entities_in(question), valid_at=now()) return dedupe_and_rank(parts) # After the conversation, let the Owl do her evening tidy-up: user_memory.generate_from_session(session, scope={"user_id": user_id}) How to choose (the bedtime summary)
- Need the agent to remember people across sessions? Start with a managed memory layer: Memory Bank if you're on Google Cloud/ADK, or Mem0 / Zep otherwise.
- Have knowledge your team curates and trusts? Write it as OKF-style Markdown. It's cheap, reviewable, and portable.
- Have a mountain of unstructured docs? Vector RAG for recall.
- Have long, structured documents where exact answers matter? Add vectorless, reasoning-based retrieval.
- Facts change, and "when" matters? Add a temporal graph.
- Always: guard what goes into memory. A poisoned memory is worse than a forgotten one.
- Before you ship: quiz your memory (Chapter 8) and make sure it can forget (Chapter 9).
Chapter 8: Pip's memory quiz (testing memory)
Pip was very proud of the new treehouse. "I remember everything now!" Pip told the Owl. The Owl tilted her head. "Do you? Let's find out." She flew to the schoolhouse, borrowed the big chalkboard, and wrote five questions on it.
First: "What is Rosa allergic to?" Easy. Pip had been told once and only needed to find it. Second: "On Monday Tom said the sheep like shade, and on Thursday he said the only shade left is by the pond. So where are the sheep?" Harder, because the answer was split across two different days. Third: "Who owned the red barn last winter?" Pip had to think about when.
Fourth: "Where do the sheep hide **now?" The old answer was the hill, and the new answer was the pond. Fifth, the trickiest of all: "What is the blacksmith's favourite soup?" Nobody had ever told Pip. The right answer was "I don't know," and Pip was very tempted to make one up.
Pip got the first three right, mixed up the fourth, and invented a soup for the fifth. "Good," said the Owl. "Now we know which floor of the treehouse to fix."
Like I'm 5: Testing memory is a quiz with five kinds of questions: remember one thing, join two things, know when, notice what changed, and say "I don't know" when you don't.
The technical version: the Owl's five questions are the five abilities measured by LongMemEval (ICLR 2025):
| The Owl's question | LongMemEval ability |
|---|---|
| Remember one thing I told you | Information extraction |
| Put two different days together | Multi-session reasoning |
| Know what happened when | Temporal reasoning |
| Notice when a fact has changed | Knowledge updates |
| Say "I don't know" when you don't | Abstention |
LongMemEval hides 500 questions inside long chat histories. Its authors report that commercial chat assistants and long-context LLMs lost about 30% accuracy when they had to remember across sustained interactions.
The other benchmark you'll see quoted everywhere is LoCoMo (paper). Its conversations average about 300 turns spread over as many as 35 sessions, and it tests question answering, event summarization, and multimodal dialogue.
What to do with this:
- Don't stop at a vendor's benchmark score. Write 20 to 30 quiz questions from your own conversations, covering all five kinds.
- Test questions four and five on purpose. Changed facts and "I don't know" are where Pip failed, and they are easy to forget to test.
- Re-run the quiz every time you change the memory layer, the same way you re-run unit tests.
Chapter 9: Forgetting on purpose (deleting memories)
One evening old Mrs. Finch knocked on the treehouse door. Weeks ago she had told Pip her secret jam recipe, and now she had changed her mind. "Please forget it," she said. "All of it."
"Of course," said Pip, and took the card out of Mrs. Finch's jar. Done! But the Owl cleared her throat. "Is it, little one? Where else does that recipe live?"
Pip thought hard. The night Mrs. Finch shared it, Weaver had spun a thread: Mrs. Finch → makes → plum jam with cardamom. Mole had filed the page from that evening's chat in the library. And the Owl herself had written a tidy summary card that said, "Mrs. Finch's jam wins the fair because of the cardamom." The recipe lived in four places, and Pip had cleaned up one.
So Pip went round the whole treehouse. The card came out of the jar, Weaver snipped the thread, Mole carried the page out of the library, and the Owl tore up her summary. Only then did Pip go back to Mrs. Finch and say, "It's forgotten."
From that day on, every card in every jar had a tiny note on the back saying which evening it came from. The next time someone asked Pip to forget, Pip would know exactly where to look.
Like I'm 5: Forgetting properly means finding every copy of a memory, not just the first one you see.
The technical version: this is a real legal duty in many places. Under the GDPR's right to erasure (Article 17), a person can ask for their personal data to be deleted "without undue delay." For agent memory, the hard part is the same one Pip hit:
- Derived memories. Deleting the original message is easy. Deleting what the system inferred from it is the hard part (paper), and deleting a conversation does not necessarily delete the memories extracted from it (write-up).
- Many stores. A hybrid treehouse has a memory store, a vector index, a graph, and probably caches and backups. One fact can sit in all of them.
- Embeddings. At least one developer guide argues that embedding-based storage makes selective erasure especially difficult, because you can't easily find everything about one person.
A checklist for building a Pip that can forget:
- Scope every memory to an identity. If each memory belongs to one user (as Memory Bank's scopes do), "delete everything about Mrs. Finch" becomes one query instead of a search party.
- Keep provenance. Store which conversation each memory, summary, graph edge and chunk came from. This is the tiny note on the back of the card.
- Make deletes cascade. Removing a source should remove the summaries, edges and vectors derived from it.
- Let stale memories expire. A time-to-live (Memory Bank supports one) means you hold less to begin with.
- Write an erasure test. Plant a fact, request deletion, then ask the agent about it and search every store.
This is engineering guidance, not legal advice. If you handle personal data, check your design with someone who knows the law where you operate.
The end (for now)
And so Pip the little robot never handed Rosa a walnut muffin again. Pip remembered where the sheep hide, knew that Tom sold the red barn in spring, and could find any rule in the Village Law Book in a heartbeat.
Not because Pip got a bigger brain, but because Pip learned that memory is a team sport. 🦉🐭🕷️🐢📖
If you're building your own "Pip", which friend lives in your treehouse? Tell me in the comments!









