Hindsight is a memory system designed specifically for AI agents, with the goal of creating agents that can learn over time, not just remember conversation history. It claims to eliminate the shortcomings of alternative technologies such as RAG and knowledge graphs, and to achieve state-of-the-art performance on long-term memory tasks.
[Main Capabilities]
- Memory types: world facts (facts about the world), experiences (the agent's own experiences), observations (evidence-backed beliefs formed based on multiple memories), mental models (understandings of the world synthesized from observations and facts).
- Core operations:
- retain: store new memories. Use an LLM to extract key facts, temporal data, entities, and relationships, and after normalization convert them into canonical entities, time series, and search indexes.
- recall: retrieve memories. Execute four retrieval strategies in parallel: semantic (vector similarity), keyword (BM25 exact matching), graph (entity/temporal/causal links), temporal (time range filtering), then merge the results using reciprocal rank fusion and a cross-encoder reranking model.
- reflect: perform deeper analysis on existing memories to form new connections or answer questions that require deep thinking.
- Observations: in the background, relevant facts are consolidated into deduplicated beliefs; each observation retains supporting evidence and exact citations, and new evidence refines rather than overwrites existing beliefs.
- Mental models and knowledge pages: a mental model is a standing answer to a certain bank question; once the question is defined, Hindsight writes the answer and updates it in the background; a knowledge page is a mental model of hidden mechanisms, organized in folders, searchable, and exportable as markdown.
- Bank: isolated memory storage, one "brain" per user, agent, or project, strictly isolated, with no cross-bank leakage. A bank can carry background context and personality traits (skeptical, literal, empathetic), affecting how reflect reasons, and can be created through declarative templates.
- Multilingual: by default, detect and preserve the input language; facts remain in their original language, and entities retain their native script (e.g., 张伟 remains 张伟).
- Memory defense: an optional per-bank policy that scans every retain for secrets and PII, redacting or blocking according to 45 patterns.
[How to Use]
- Start the server: API address http://localhost:8888,UI address http://localhost:9999。支持 25+ LLM providers, including hosted services (openai, anthropic, gemini, groq, bedrock, vertexai, minimax, deepseek, etc.), fully local (ollama, lmstudio, llamacpp), any OpenAI-compatible endpoint, and gateways (litellm, etc.). Existing subscriptions can also be used: openai-codex, claude-code, cursor, github-copilot without an API key. Oracle AI Database also supports enterprise deployments.
- Connect clients: provides Python, Node.js, Go, CLI, and REST API references. Supports embedded mode (no server required); Intel Mac requires hindsight-all-slim.
- Add memory to agents:
- LLM wrapper (2 lines of code): replace the LLM client with the wrapped version, and each call automatically stores and retrieves memories. wrap_anthropic() works the same way for the Anthropic SDK, and settings can be overridden via hindsight_* parameters. It uses LiteLLM under the hood, covering 100+ models.
- 60+ integrations, most requiring no code changes.
- Coding agents: one package provides long-term project memory for CLI coding agents, automatically builds a per-repository bank from git history and past sessions, injects it into the agent, and generates knowledge pages. Supports Claude Code, Codex CLI, Cursor CLI, GitHub Copilot CLI, opencode, Kilo CLI, Cline CLI, Antigravity CLI, Devin CLI, pi, Prime Agent, Grok Build, and DeepSeek Harness.
- MCP servers: each server has a built-in Model Context Protocol endpoint, one per bank, enabled by default, exposing retain, recall, and reflect as tools.
[Use cases] Suitable for agents that need to combine conversational AI and autonomous task execution, such as AI employees, that need to handle open-ended tasks, change behavior based on user feedback, and learn to perform complex tasks to approximate human work automation. Also suitable for personalized AI chatbots,simple use cases such as per-user memory and chat history. May be too complex for simple AI workflows (such as those built with n8n).
[Limitations] The material does not provide specific limitation information. Performance data was independently reproduced by the Virginia Tech Sanghani Center; other scores are vendor-reported. Cloud-hosted options provide a 99.9% uptime SLA, are billed by usage, include free credits, and have no fixed monthly fee or per-seat fee.