Hindsight Review 2026: The Agent Memory Layer That Learns (44K Stars)
Verdict
Hindsight is the most ambitious open-source agent memory system we've seen: not just a place to stash conversation history, but a memory layer designed so agents learn — consolidating facts into observations, observations into mental models, and reasoning over them with a dedicated reflect operation. With 44,000+ GitHub stars, an MIT license, a built-in MCP server, and 60+ integrations (including one-command setup for Claude Code and friends), it's the strongest self-hosted answer to the "my agent forgets everything" problem right now.
The honest caveats: it's heavier than a quick pip install mem0ai for simple chatbot memory, it needs an LLM behind the scenes to extract and consolidate memories (so there's ongoing inference cost), and its headline benchmark claims are vendor-reported — though notably reproduced independently by Virginia Tech researchers and The Washington Post. If you're building serious agents, it's worth the setup. If you just want a chatbot to remember a user's name, it's overkill — the README says so itself.
Hindsight
★ 44,408Agent memory that learns — 44K stars
What Hindsight actually is
Most "agent memory" is glorified conversation history: chunk the chat log, embed it, retrieve by vector similarity. Hindsight, built by Vectorize.io, takes a different position — that agents should build something closer to human-like memory. Its data model has four memory types:
- World facts — facts about the world ("The stove gets hot")
- Experiences — the agent's own experiences ("I touched the stove and it really hurt")
- Observations — consolidated, evidence-backed beliefs formed from many memories, with exact quotes and proof counts
- Mental models — standing answers to questions about a bank ("What are this user's preferences?"), rewritten in the background as the bank learns
Memories live in banks: strictly isolated stores — one brain per user, agent, or project, with no cross-bank leakage. Banks can carry disposition traits (skepticism, literalism, empathy) that shape how the system reasons over memories.
The three operations: retain, recall, reflect
Everything goes through three API calls:
Retain pushes information in. Behind the scenes it uses an LLM to extract key facts, temporal data, entities, and relationships, then normalizes them into canonical entities, time series, and search indexes.
Recall retrieves. It runs four strategies in parallel — semantic vector similarity, BM25 keyword matching, graph traversal (entity/temporal/causal links), and temporal filtering — then fuses results with reciprocal rank fusion plus a cross-encoder reranker.
Reflect is the differentiator. Instead of lookup, it does deeper analysis over existing memories to form new connections — e.g., a sales agent reflecting on why certain outreach worked, or a support agent finding questions the docs don't answer. This is the "learning, not just remembering" part, and it's what most alternatives don't have an equivalent for.
from hindsight_client import Hindsight
client = Hindsight(base_url="http://localhost:8888")
# Retain: store information
client.retain(bank_id="my-bank", content="Alice works at Google as a software engineer")
# Recall: search memories
client.recall(bank_id="my-bank", query="What does Alice do?")
# Reflect: disposition-aware reasoning over memories
client.reflect(bank_id="my-bank", query="Tell me about Alice")
Getting started
The recommended path is Docker:
docker run -it --pull always --name hindsight --restart unless-stopped \
-p 8888:8888 -p 9999:9999 \
-e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \
-v hindsight-data:/home/hindsight/.pg0 \
ghcr.io/vectorize-io/hindsight:latest
That gives you the API on port 8888 and a UI on 9999. It works with 25+ LLM providers — hosted (OpenAI, Anthropic, Gemini, Groq, DeepSeek…), fully local (Ollama, LM Studio, llama.cpp), or any OpenAI-compatible endpoint. Notably, existing subscriptions work too: openai-codex (ChatGPT Plus/Pro), claude-code (Claude Pro/Max), and Cursor/Copilot need no separate API key.
Clients exist for Python, Node.js, Go, plus a CLI and REST API. There's also an embedded mode (pip install hindsight-all) that runs the server in-process — no Docker required. For the laziest possible integration, the LLM Wrapper swaps your OpenAI/Anthropic client for a wrapped one in two lines of code, and memories are stored and retrieved automatically on every call (LiteLLM underneath covers 100+ models).
Integrations and MCP
Hindsight lists 60+ integrations: LangGraph, CrewAI, LlamaIndex, Pydantic AI, OpenAI Agents SDK, plus no-code tools (n8n, Zapier, Dify, Flowise). Every server ships a built-in MCP endpoint (/mcp/{bank_id}/, enabled by default), so any MCP client gets retain/recall/reflect as tools with zero extra code.
The standout for developers: a dedicated coding-agents package that gives CLI coding agents long-term project memory — a per-repo bank built automatically from git history and past sessions, with knowledge pages covering architecture and conventions:
npx @vectorize-io/hindsight-coding-agents install claude-code
It supports Claude Code, Codex CLI, Cursor, GitHub Copilot CLI, opencode, and others. If your coding agent keeps re-learning your codebase every session, this is the single most compelling Hindsight use case.
Self-hosted vs Hindsight Cloud
Self-hosting stores data in PostgreSQL + pgvector (or Oracle AI Database for enterprise), with Prometheus metrics, webhooks, an admin CLI, and hierarchical configuration. Hindsight Cloud is the managed option: usage-based billing with free credits to start, no per-seat fee, 99.9% uptime SLA. Check official pricing for current rates — the open-source core is MIT licensed either way, so you're never locked in.
Two production-grade details worth noting: Memory Defense, an opt-in per-bank policy that scans every retain for secrets and PII against 45 patterns (redacting or blocking before storage), and multilingual handling where facts keep their original language and script end to end.
Benchmarks — read carefully
Hindsight claims state-of-the-art results on LongMemEval and publishes live, continuously updated benchmarks at benchmarks.hindsight.vectorize.io. What makes the claim harder to dismiss: the results were independently reproduced by research collaborators at Virginia Tech's Sanghani Center and by The Washington Post, according to the project. That's unusual rigor for a README benchmark chart. Still, treat vendor benchmarks as directional — Mem0's April 2026 algorithm update (94.4 on LongMemEval) shows how fast this leaderboard moves. See our Hindsight vs Mem0 breakdown for the head-to-head.
What it's not
- Not for trivial use cases. Storing a few user preferences for a demo chatbot? The README itself says Hindsight "may be overkill" for simple n8n-style workflows. Reach for the alternatives instead.
- Not free to run. Memory extraction and consolidation burn LLM tokens on every retain. Budget for inference cost, especially at scale.
- Not a vector database. If you want raw control over embeddings and indexes, pgvector or Chroma plus your own logic is lighter.
Final verdict
Hindsight earns its 44,000 stars: it's the most complete open-source agent memory system available — genuinely novel memory model, serious engineering (MCP-native, 60+ integrations, production observability), honest documentation that tells you when not to use it, and an MIT license. For agents that need to learn across sessions, it's our default recommendation. For everything lighter, see Hindsight alternatives.
FAQ
Is Hindsight really free?
The core is MIT-licensed and free to self-host. You'll still pay for the LLM API calls it makes during retain/recall/reflect, plus your own infrastructure. Hindsight Cloud is usage-based with free credits — check official pricing.
Hindsight vs Mem0 — which should I choose?
Mem0 is lighter and faster to start (pip install mem0ai); Hindsight has the deeper memory model (observations, mental models, reflect). Full breakdown: Hindsight vs Mem0.
Does Hindsight work with local models?
Yes — Ollama, LM Studio, and llama.cpp are supported providers, plus any OpenAI-compatible endpoint. No cloud required.
Can I use Hindsight with Claude Code?
Yes — npx @vectorize-io/hindsight-coding-agents install claude-code wires it up natively, building a per-repo memory bank from git history automatically.