~/tools/hindsight
Hindsight
tool

Hindsight

Hindsight is an open source memory system for AI agents — a self-hostable memory layer that lets agents retain facts and experiences, recall them by meaning, keyword, relationships, and time, and reflect on them to build lasting understanding across sessions.

What is Hindsight?

Hindsight is an open source memory system for AI agents — a memory layer that stores what an agent learns and retrieves it later, so the agent keeps context across sessions instead of forgetting everything between calls. It’s built by Vectorize around three operations: retain (store facts and experiences), recall (search them back), and reflect (analyze memories to form new understanding).

What is Hindsight best for?

Developers building agents and assistants that need durable long-term memory — personalization, long-running conversations, or agents meant to learn from past interactions. It fits when dumping chat history into the prompt or plain RAG isn’t enough, and you’d rather self-host the memory layer than route your data through a managed memory API.

What can Hindsight do?

  • Retain three kinds of memory: world facts, the agent’s own experiences, and reflective “mental models”
  • Recall with four retrieval strategies at once — semantic vector search, BM25 keyword, graph/entity relationships, and temporal (“last spring”) reasoning — merged by a cross-encoder reranker
  • Reflect over stored memories to consolidate observations, deduplicate, and build new insight instead of overwriting
  • Run it embedded (no server), with Docker, on Kubernetes via Helm, or on bare metal
  • Connect to any major LLM: OpenAI, Anthropic, Gemini, Groq, Ollama, LM Studio, and more
  • Call it from Python, TypeScript/Node.js, Go, a CLI, or a REST API
  • Store on PostgreSQL (embedded or external), with Oracle AI Database for enterprise deployments

Where does Hindsight fall short?

  • It’s a young project (~4k GitHub stars, first released in 2025), so its ecosystem of tutorials, integrations, and battle-tested examples is much smaller than established memory tools like Mem0 (~48k stars).
  • The four-strategy retrieval plus reflect pipeline is more machinery than some apps need — if you only want to remember a handful of user preferences, a plain key-value store or a single vector database is less to run and reason about.
  • Reflect and consolidation call out to an LLM, so recall quality and running cost track the model you point it at, and background reflection adds token spend on top of plain storage.

Is Hindsight free?

Yes — Hindsight is MIT licensed and free to self-host, whether you run it embedded, in Docker, or on Kubernetes; you only pay for your own server plus whatever LLM and embedding provider you use. Vectorize also runs a managed Hindsight Cloud for teams that don’t want to operate it themselves — that’s a paid convenience layer, not a different product.

FAQ

Is Hindsight open source? Yes. Hindsight is released under the permissive MIT license by Vectorize, with the full source on GitHub, so you can self-host, inspect, and modify it freely.

Can I self-host Hindsight for free? Yes. Run it embedded with no separate server, via Docker, or on Kubernetes with Helm; you only pay for your infrastructure and your LLM/embedding provider. The managed Hindsight Cloud is the paid, hosted alternative.

How is Hindsight different from Mem0? Both give agents long-term memory, but Hindsight runs four retrieval strategies — semantic, keyword, graph, and temporal — on every query and reports strong LongMemEval benchmark scores, while Mem0 is a larger, more mature project with a broader ecosystem. Hindsight trades maturity for retrieval depth that’s available even on the free self-hosted tier.

What do I need to run Hindsight? A PostgreSQL database (it can run embedded), an LLM provider such as OpenAI or Anthropic — or a local model through Ollama — and Docker or Python. An embedded mode needs no separate server at all.