Skip to main content

How Hindsight works

Hindsight Enterprise runs the same memory engine as Hindsight Cloud. This page explains how a memory bank learns and how your agents use what it knows.

Memory that learns​

AI agents forget everything between sessions. Without memory, every conversation starts from zero: no context about who the user is, what was decided, or what the agent has already learned.

Storing conversations and searching them later isn't enough. A useful memory has to answer "what did Alice tell me last spring?" (time), connect "Alice works at Google" with "Google is in Mountain View" (relationships), and notice that a user who kept asking for functional code prefers functional programming (learning).

Hindsight is a memory system that learns. It doesn't store transcripts. It extracts what was said into facts, links them, and keeps consolidating them into durable knowledge in the background, so what your agent knows gets better the more it's used.

How a bank learns​

Each memory bank is a separate memory for one agent, user or context. Knowledge in a bank builds up in layers:

LayerWhat it isExample
World factAn objective claim the bank was told"Alice works at Google."
Experience factSomething the agent itself did"I recommended Python to Bob."
ObservationA belief consolidated from many facts, with its evidence and its history"The user was a React enthusiast and has now switched to Vue."
Mental modelA curated, pre-computed answer to a question you ask often"What are our team's communication norms?"
Knowledge pageA living document the bank writes about itself, kept in a browsable knowledge base"Architecture / How the billing service works"

Retain turns content (messages, documents, files) into typed facts. Each fact is linked to the entities it mentions and to other facts that share them, building a graph. That graph is what makes "where does Alice work?" answerable from two facts that were never stored together. Time is captured too, so facts can be placed on a timeline.

2. Consolidate: turn facts into observations​

After every retain, a background process consolidates new facts into observations: the bank's durable beliefs.

  • Deduplicated. Overlapping facts merge into one observation instead of piling up as repeats.
  • Evidence-grounded. Each observation points at the memories that support it, with exact quotes and a count of supporting evidence.
  • Refined, not overwritten. New evidence updates an observation and its history is kept, so you can see a belief change over time.
  • Freshness-aware. When new memories haven't been consolidated yet, reflect treats the affected observations as possibly stale and checks them against the raw facts before relying on them.

Consolidation is automatic. There's nothing to schedule or call.

3. Synthesize: mental models and knowledge pages​

Observations answer one question at a time. For the questions that matter most, the bank keeps synthesized answers ready:

  • Mental models are curated summaries you define for a question you ask often, such as "What are this customer's preferences?" They are the fastest, most consistent answer to that question. A mental model can refresh on demand, on a schedule, or automatically after consolidation brings in new knowledge in its scope.
  • Knowledge pages are living documents the bank writes about itself, organized in folders in the bank's Knowledge base, like a wiki that keeps itself current. Each page answers one question, is built from the bank's observations rather than raw conversation, and is rewritten incrementally whenever consolidation produces new knowledge in its scope. Pages never read other pages, so they can't cite each other into a feedback loop. Browse them in the console's Knowledge base view, or read and manage them over the API under /v1/default/banks/{bank_id}/knowledge-base/.

Using what a bank knows​

Recall: retrieve memories​

Recall runs four searches in parallel, because no single strategy handles every question (this is the TEMPR strategy):

MethodWhat it finds
SemanticMemories similar in meaning, even with different wording
Keyword (BM25)Exact names and technical terms
GraphMemories connected through shared entities, even with no words in common
TemporalMemories in a time window ("last week", "in March")

Results are fused by rank, so a memory several strategies agree on wins, then re-ranked by a model that reads the query and each memory together. You set a token budget rather than a result count: Hindsight fills the context you can afford with the most relevant memories.

Reflect: get an answer​

Reflect returns an answer rather than a list of memories. It runs an agentic loop over the bank, checking its knowledge in priority order: mental models first, then observations, then raw facts. That order gives fast, consistent answers to known questions while still reaching the detail behind them.

Shaping how a bank reasons​

Each bank can be configured to reason the way your agent should:

  • Mission. A natural-language statement of what the bank is for, which tells Hindsight what to prioritize. For example: "I am a research assistant specializing in ML. I prefer simplicity over cutting-edge."
  • Directives. Hard rules reflect must follow, such as "Never recommend specific stocks" or "Always cite sources."
  • Disposition traits. How the bank weighs information: skepticism (trusting to skeptical), literalism (flexible to literal) and empathy (detached to empathetic).

The mission gives the interpretive lens, directives enforce boundaries, and disposition modulates reasoning style. See Memory Banks for how to configure them.