Hindsight is a memory system for AI agents that aims to make agents learn over time rather than only recall conversation history. Agents store information with retain, search it with recall, and reason over it with reflect. Memories live in banks, each an isolated store for one user, agent, or project, and a bank can carry background context and disposition traits (skepticism, literalism, empathy) that shape how reflect reasons.
On retain, a language model extracts facts, entities, temporal data, and relationships, and Hindsight normalizes them into canonical entities, time series, and search indexes, sorted into world facts or the agent's own experiences. Recall runs four retrieval strategies in parallel (semantic vector search, BM25 keyword matching, graph links across entities, time, and causes, and time-range filtering), merges them with reciprocal rank fusion, reranks with a cross-encoder, and trims the result to a token limit.
In the background, related facts are consolidated into observations: deduplicated beliefs that keep their supporting quotes and are refined, not overwritten, as new evidence arrives. Mental models are standing answers to questions you define about a bank, rewritten as the bank learns, and knowledge pages present them as a searchable, wiki-like set of documents. Hindsight reports results on the LongMemEval benchmark, reproduced by researchers at Virginia Tech and The Washington Post.
It runs as a self-hosted server (Docker, pip, or Kubernetes with Helm), embedded in a Python process, or as the managed Hindsight Cloud service. Clients exist for Python, Node.js, Go, a CLI, and REST, and every server exposes an MCP endpoint per bank. It works with more than 25 LLM providers, including local models and existing Claude, ChatGPT, Cursor, and GitHub Copilot subscriptions.
Features
- Retain, recall, reflect: three operations to store memories, retrieve them, and reason over them for questions that need more than a lookup
- Memory types: world facts, experiences, observations, and mental models, organized as entities, relationships, and time series
- Multi-strategy recall: semantic, keyword, graph, and temporal retrieval merged by reciprocal rank fusion and reranked by a cross-encoder
- Observations: consolidated beliefs with exact supporting quotes and a proof count, refined as new evidence arrives
- Mental models and knowledge pages: standing answers about a bank, kept current in the background and readable without a retrieval or LLM call
- LLM wrapper: wraps an OpenAI or Anthropic client so memories are recalled before each call and retained after it, built on LiteLLM
- Coding agent memory: builds a per-repo bank from git history and past sessions for Claude Code, Codex CLI, Cursor CLI, opencode, Cline CLI, and other coding agents
- Integrations: more than 60, including LangGraph, CrewAI, Pydantic AI, n8n, Dify, Obsidian, and Pipecat
- MCP endpoint: each bank exposes retain, recall, and reflect as MCP tools
- Memory Defense: an opt-in per-bank policy that scans retained content for secrets and PII against 45 patterns and redacts or blocks matches
- Multilingual: detects the input language and keeps facts and entity names in their original language and script
- Deployment options: Docker, pip, Helm, an embedded Python server, or the managed Hindsight Cloud, with external PostgreSQL or Oracle AI Database as storage options






