Hindsight logo

Hindsight

Visit

Vectorize's open-source agent memory system. Retain, recall, and reflect over structured facts and mental models in PostgreSQL, ranked first on LongMemEval.

Share:
View alternatives

Hindsight

Hindsight is an open-source agent memory system from Vectorize, the team behind the Vectorize RAG platform. Its claim is narrow and testable: most memory layers recall conversation history, while Hindsight tries to make an agent learn. It replaces the usual "vector search over chunks" pattern with biomimetic data structures, exposes exactly three operations, and stores everything in PostgreSQL.

The project is the top-ranked system on the LongMemEval long-term memory benchmark, and it publishes continuously updated per-model accuracy, latency, and cost results rather than a single hero chart. The benchmark write-up for Hindsight was independently reproduced by researchers at the Virginia Tech Sanghani Center for Artificial Intelligence and Data Analytics and by The Washington Post; the page notes that other vendors' scores are self-reported.

Key Features

  • Memory types, not a blob: retained content is split into world facts ("the stove gets hot") and experiences ("I touched the stove and it hurt"), then consolidated. Memories live in banks, which is also the unit used to isolate one user's data from another's.
  • Three operations: retain stores content and uses an LLM to extract facts, temporal data, entities, and relationships; recall retrieves them; reflect reasons over existing memories to answer questions that need synthesis rather than lookup.
  • Hybrid retrieval: recall runs semantic vector search, BM25 keyword matching, graph traversal, and temporal filtering in parallel, then merges and orders results with reciprocal rank fusion plus a cross-encoder reranker. The documentation quotes 50-500ms recall latency at production scale.
  • Observations: related facts are consolidated in the background into deduplicated, evidence-backed beliefs that keep their supporting quotes and a proof count, and are refined rather than overwritten as new evidence arrives.
  • Mental models: a standing answer to a question such as "what are this user's preferences?" that Hindsight writes and rewrites in the background. Reading one is a database read, with no retrieval and no LLM call.
  • Runs on the stack you already have: PostgreSQL by default, with Oracle AI Database supported for enterprise deployments, plus SDKs for Python, TypeScript, Go, a CLI, and a REST API.
  • MCP and coding agents: an MCP server plus integrations and a docs skill installable with npx skills add https://github.com/vectorize-io/hindsight --skill hindsight-docs.

Use Cases

  • Personal assistants and copilots that need to remember a user across months of sessions instead of within one context window.
  • Coding agents that should carry project conventions and past decisions between sessions; Hindsight ships integrations for Claude Code, Cursor, and other coding assistants.
  • Support and sales agents that benefit from reflect: for example, reasoning about which outreach patterns got replies.
  • Teams replacing ad-hoc memory files with something queryable, benchmarked, and self-hostable inside their own database footprint.

Pricing

Hindsight is MIT licensed and free to self-host. The reference deployment options are Docker (recommended), Docker against an external PostgreSQL, pip install hindsight-api, or a Helm chart for Kubernetes. Self-hosting needs Python 3.11+ and 4GB RAM minimum, 8GB recommended for production, plus an LLM API key.

Hindsight Cloud is the managed option at api.hindsight.vectorize.io, with a dashboard, backups, team collaboration, and a 99.9% uptime SLA. The project describes cloud billing as usage-based with free credits to start and no fixed monthly or per-seat fee. Check the pricing page for current numbers before budgeting.

Quick Start

export OPENAI_API_KEY=sk-xxx
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 an API on port 8888 and a UI on 9999. Then install a client (pip install hindsight-client) and use the three verbs:

from hindsight_client import Hindsight

client = Hindsight(base_url="http://localhost:8888")
client.retain(bank_id="my-bank", content="Alice works at Google as a software engineer")
client.recall(bank_id="my-bank", query="What does Alice do?")
client.reflect(bank_id="my-bank", query="Tell me about Alice")

Limitations and Risks

  • Memory quality follows the model. Hindsight extracts facts, entities, and relationships with an LLM, so a weak or cheap model degrades what gets stored. The project maintains a model leaderboard precisely because the spread across models is large.
  • One benchmark is not the whole story. LongMemEval is the headline benchmark; treat vendor comparisons accordingly, since only the Hindsight numbers are described as independently reproduced.
  • Operational details matter. The FAQ documents "zombie" operations stuck in processing, usually caused by an unstable worker identity after a container restart, with a recovery path through the admin CLI.
  • Pre-1.0 versioning. The latest release observed on 2026-09-25 was v0.10.1 (2026-09-21), and the API surface is still evolving.

FAQ

How is this different from RAG?

RAG retrieves document chunks for a query. Hindsight stores structured facts, links them into a graph with temporal context, consolidates them into observations, and can reason about them instead of only returning them.

Which LLM providers work?

More than 25, including OpenAI, Anthropic, Gemini, Vertex AI, Bedrock, Groq, MiniMax, DeepSeek, Ollama, LM Studio, llama.cpp, and OpenAI-compatible endpoints. Existing subscriptions for OpenAI Codex, Claude Code, Cursor, and GitHub Copilot can be used without an API key.

Do I have to run my own infrastructure?

No. You can self-host with Docker, pip, or Helm, or point any client at Hindsight Cloud. Both exposed the same APIs.

Where does the data live?

In PostgreSQL, which you control when self-hosting. Isolating one user from another is done by putting them in separate banks.

Alternatives

  • agentmemory: a local SQLite memory layer aimed specifically at coding agents.
  • Letta: the MemGPT lineage of stateful agents with a cloud option.
  • LangGraph: graph orchestration when you want to define the memory flow yourself.
  • Mem0: hosted and self-hosted agent memory with vector search.

Conclusion

Hindsight is the most benchmarked option in a category that is usually sold on vibes: it names its data structures, publishes a model leaderboard, and lets reviewers reproduce the numbers. If your agents keep forgetting things and your memory file is growing into an unqueryable log, start with the self-hosted Docker image and a single bank, then move to Cloud only when operations become the bottleneck.

Read the Hindsight documentation and the LongMemEval methodology linked from the repository before committing to a design.

Comments

No comments yet. Be the first to comment!