HindsightAgent MemoryKnowledge Graph

What is Hindsight? Agent memory, knowledge graph and use cases

Hindsight is a memory system for AI agents. This guide explains why agents need memory, why entities and a knowledge graph help, how the operations retain, recall and reflect work, how Hindsight differs from RAG, and its use cases.

By Rahmatullah Musawi · · updated 8 November 2026 · 8 min read · sources checked 7 October 2026

Key points

  • Hindsight does not store conversations: it extracts what was said into typed facts and builds further knowledge on them.[1]
  • It has three operations: retain stores what happened, recall finds it again, and reflect reasons over it.[1]
  • Each fact is linked to the entities it mentions and to the facts that share them, so a question can be answered from two facts that were never stored together.[1]
  • Recall runs four searches in parallel (semantic, keyword, graph and, when the query names a date, temporal) and fuses their results.[2]
  • The documentation recommends plain RAG for questions over a static set of documents, and Hindsight for AI assistants with persistent memory.[3]

One short exchange runs through this article as the example. A user tells an agent: "Alice joined Google in March, she loves the research team." The agent replies: "Noted, I'll suggest her for the ML project."1 It comes from the Architecture Deep Dive, the interactive figure of the Hindsight documentation that is shown below.

The four interactive figures in this article are the documentation's own. The Hindsight repository, which contains them, is published under the MIT License.4 This article describes the documentation labelled version 0.10, as of October 2026.1

Why AI agents need memory

An AI agent without memory starts every conversation from zero: it has no context about who you are, what was discussed or what it has learned.1 The Hindsight documentation says the problem is harder than it looks, and names four points:1

TopicWhat is an agent harness? How it works, its parts and use cases describes where a memory system such as Hindsight plugs into the loop of an agent through hooks. TopicWhat is Hermes Agent? How it works, its structure and use cases describes an agent that keeps its memory as short facts in two text files with size limits.

What is Hindsight?

Hindsight is a memory system for AI agents. It does not store conversations: it extracts what was said into typed facts and then builds further knowledge on them.1 The original text is kept as a source document, but recall and reflect search the memories, not the documents.5

Apps reach Hindsight's three operations through SDKs, MCP or plain HTTP.1 All three work on one memory bank, which is isolated from the others and stored in a Postgres database with the pgvector extension.1

TopicWhat is MCP (Model Context Protocol)? How it works and its use cases describes MCP, the protocol named here.

The figure runs the example through all three operations:

Architecture Deep Dive: an example exchange through retain, recall and reflect
The figure plays by itself. A tab jumps to one operation, the button beside the tabs pauses, and the button in the corner opens the figure in full screen. On a small screen, swipe sideways inside the figure to see all of it.
Source: Architecture Deep Dive, Hindsight documentation.1 © 2025 Vectorize AI, Inc., shown under the MIT License.4

One detail is easy to miss: the bank already held the observation "Alice works at Microsoft". After retain, a background worker updates that observation and adds no second one, and both facts stay as its sources.1

A bank holds five types of memory. The first two are extracted from what the agent sends; the other three are built from them.1

Memory typeWhat it isExample in the documentation
World factAn objective claim the bank was told1"Alice works at Google."1
Experience factSomething the bank itself did1"I recommended Python to Bob."1
ObservationA belief consolidated from many facts, with its evidence and its history1"User was a React enthusiast, has now switched to Vue."1
Mental modelA curated summary for a question you ask often: a saved reflect answer that you create16A model named "Team overview"1
Knowledge pageA living document the bank writes about itself, kept in a tree of folders1A page that answers "What's our error-handling convention?"1

Entities and the knowledge graph

A knowledge graph is a network of real-world entities and the relationships between them: any object, place or person can be a node, and an edge defines the relationship between nodes.7 Hindsight links each fact to the entities it mentions (people, organizations, places, products and concepts) and to the other facts that share them.15

These links make a question answerable from two facts that were never stored together.1 Microsoft Research writes that the majority of RAG (retrieval-augmented generation) approaches search by vector similarity, and that baseline RAG "struggles to connect the dots" when answering a question requires traversing separate pieces of information through their shared attributes.8 Hindsight's graph search returns facts that are not similar to the query in meaning or wording but are connected to it through the graph.2

The documentation shows this with three stored facts and one question. A search by similarity retrieves only the facts about Alice; the graph leads from Alice to Project Atlas, then to Kubernetes and the outage.3

Example: three linked facts answer one question
The question and the three stored facts of the documentation's example. The name beside a line is the entity that links the two parts. The numbers match the notes.
“WAS ALICE AFFECTED BY RECENT ISSUES?”“Alice is the tech lead on Project Atlas”1“Project Atlas uses Kubernetes”2“Kubernetes cluster had an outage Tuesday”3Aliceentity in the questionProject Atlasshared entityKubernetesshared entity
  1. The fact about AliceA search by similarity retrieves the facts about Alice only.3
  2. Linked through Project AtlasFacts that mention the same entity are linked5, so the graph leads from the first fact to this one.3
  3. Linked through KubernetesThis fact names the outage, where the documentation's path through the graph ends.3
One real memory bank
A dense cloud of about 170 dots joined by thousands of thin lines on a dark ground, with a legend for four kinds of link: semantic, temporal, entity and causal.

The graph of one memory bank in Hindsight's own interface: 172 memories and 5,364 links between them, coloured by the kind of link (semantic, temporal, entity or causal).1

The diagram is this article's drawing of an example in the Hindsight documentation.3 The picture is cropped from the one on the opening page of the documentation.1 It is part of the Hindsight repository, © 2025 Vectorize AI, Inc., and is shown under the MIT License.4

Hindsight builds this graph when the agent stores something with retain(). The figure follows two texts about the same person:5

Example: two texts about one person on their way through retain
First a text about Alice Chen, then a second one that calls her “Alice C.”. The tabs and the buttons work as in the Architecture Deep Dive.
Source: figure on the Retain page of the Hindsight documentation.5 © 2025 Vectorize AI, Inc., shown under the MIT License.4

Two things happen to entities and facts on the way in. First, different spellings become one entity: "Alice", "Alice Chen" and "Alice C." are matched by the similarity of the names, supported by which entities appear together and when. This can go wrong: on a bank with a lot of history, a short new name that resembles an existing entity, and appears alongside entities that the existing one is already associated with, can be absorbed into it.5

Second, the facts are connected by four kinds of links:5

LinkWhat it connectsQuestion it helps to answer
EntityAll facts that mention the same entity"Tell me everything about Alice"
TimeFacts close in time, more strongly for closer dates"What else happened around then?"
MeaningFacts with a similar meaning, also in different words"Tell me about similar topics"
CauseA cause and its effect"Why did this happen?"

Hindsight also tracks two times: when an event happened and when the bank was told about it. A question about 2024 then finds an event that was reported in 2025. A general fact such as a preference has no time of its own.5

Recall and reflect

The two reading operations differ in what they return: recall returns memories, and reflect returns an answer.1

Recall: four searches, one ranking

No single search method handles every kind of question, so recall runs four searches in parallel: by meaning, by exact words, through the entity graph and by time. The search by time runs only when the query names a date.2

TopicKeyword, semantic and knowledge graph search: hybrid search explained describes how the result lists of several searches are merged into one.
Example: recall finds and ranks memories for one query
The query is “What did Alice do in March 2026?”. The button beside the tab pauses it.
Source: figure on the Recall page of the Hindsight documentation.2 © 2025 Vectorize AI, Inc., shown under the MIT License.4

The four result lists are merged by rank, not by score, so a memory that several searches agree on ranks higher. A cross-encoder then reads the query and each of the top candidates, 300 by default, as a pair. Three small multipliers adjust its score: how recent the memory is (at most ±10%), how close it is to a time window in the query (±10%) and, for observations, how much evidence supports it (±5%).2

Memories are taken from the top until max_tokens is used up, 4,096 tokens by default.2

Reflect: an answer with its sources

Reflect runs an agent loop over the bank. The agent decides what it needs and calls its own tools, for up to ten rounds, and it cannot answer before it has retrieved something.1

Example: reflect gathers evidence for one answer
The question is “Should Alice join the ML project?”. The button beside the tab pauses it.
Source: figure on the Reflect page of the Hindsight documentation.6 © 2025 Vectorize AI, Inc., shown under the MIT License.4

The loop reads the most refined knowledge first: mental models and knowledge pages, then observations, then raw facts through recall, and the source chunk or document when it needs the exact wording.1 An observation is marked stale when new facts are still waiting to be consolidated; the agent then verifies it against the facts.6 Only memories that were actually retrieved can be cited.1

How a bank answers depends on three settings. They shape reflect only: recall returns the same memories whoever is asking.1

SettingWhat it isExample in the documentation
MissionThe bank's identity in plain language, which tells it what to prioritise1"I am a research assistant specializing in ML. I prefer simplicity over cutting-edge."1
DirectivesHard rules it must never break1"Never recommend specific stocks."1
DispositionSkepticism, literalism and empathy, each on a scale from 1 to 51Code review: skepticism 4, literalism 5, empathy 26

Speed of the three operations

Hindsight does the slow work when it writes, so that reading is fast: facts are extracted, embedded and linked during retain and not during a search. The comparison table in the documentation gives these typical latencies:9

OperationTypical latencyMain bottleneck
Recall100–600 msThe re-ranker, when it runs on a CPU
Reflect800–3,000 msThe LLM that writes the answer
Retain500–2,000 ms per batchThe LLM that extracts the facts

Extracting facts is structured work, so retain does not need a large model: the documentation recommends the model gpt-oss-20b.9

Hindsight, RAG and use cases

Traditional RAG retrieves the documents that are similar to a query. The documentation compares the two like this:3

CapabilityTraditional RAGHindsight
SearchSemantic similarity onlySemantic, keyword, graph and temporal
Questions across several factsLimited to the retrieved chunksFollows the links between entities
Questions about timeMatches a keyword such as "spring"Parses the date and filters by the range
EntitiesNoneResolves entities and tracks which appear together
DispositionNoneThree traits influence the interpretation

The documentation recommends RAG for questions over a static set of documents and for search without time requirements. It recommends Hindsight for AI assistants with persistent memory, for applications that track entities, for a consistent disposition and for questions about time such as "last month".3

For coding agents the overview says "18 harnesses, one install" and shows Claude Code, Cursor and Codex among them.1 For reflect it gives disposition presets for customer support, code review, legal analysis, therapy or coaching, and research assistance.6

The bottom line

Hindsight gives an AI agent a memory that is built from facts, entities and links, not from saved conversations. Retain writes it, recall searches it in up to four ways, and reflect answers from it with sources. For questions over a static set of documents, its own documentation recommends plain RAG.

Sources

  1. Overview Hindsight docs
  2. Recall: How Hindsight Retrieves Memories Hindsight docs
  3. RAG vs Memory Hindsight docs
  4. LICENSE Hindsight repository on GitHub
  5. Retain: How Hindsight Stores Memories Hindsight docs
  6. Reflect: Agentic Reasoning with Disposition Hindsight docs
  7. What is a knowledge graph? IBM
  8. GraphRAG: Unlocking LLM discovery on narrative private data Microsoft Research
  9. Performance Hindsight docs

Written by Rahmatullah Musawi with the help of an AI assistant.