Hindsight

RAG & Memory 💻 Python ⚖️ MIT 🟢 Actively maintained
22.7k stars

Hindsight is an agent memory system designed to make AI agents learn over time, not just recall conversation history. It addresses the limitations of RAG and knowledge graphs by using biomimetic data structures for long-term memory. It is for developers building agents that need persistent, evolving memory.

Hindsight demo
🖼️ Screenshot from the project README

✨ Key features

  • State-of-the-art performance on LongMemEval benchmark
  • Biomimetic memory structures: world facts, experiences, observations, mental models
  • Three core operations: retain, recall, reflect
  • LLM wrapper integration in 2 lines of code
  • 60+ integrations with coding agents, frameworks, and no-code tools
  • Built-in MCP server endpoint per bank

🎯 Use cases

  • Give coding agents long-term project memory from git history
  • Build personal assistants that remember user preferences over time
  • Create customer support agents that learn from past interactions
  • Enhance agent frameworks like LangGraph or CrewAI with persistent memory

📦 Installation

🧰 Requirements: Requires an LLM API key (e.g., OpenAI) or a supported provider; can run via Docker, pip, or Kubernetes; supports Linux, macOS, and Windows.

Docker (recommended)

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

Bare metal (pip)

pip install hindsight-api
export HINDSIGHT_API_LLM_API_KEY=sk-xxx

hindsight-api

Kubernetes (Helm)

helm install hindsight oci://ghcr.io/vectorize-io/charts/hindsight \
  --set api.llm.provider=openai \
  --set api.llm.apiKey=sk-xxx \
  --set postgresql.enabled=true

🚀 Usage

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: Generate disposition-aware response
client.reflect(bank_id="my-bank", query="Tell me about Alice")

❓ FAQ

How do I start a Hindsight server?

You can run it via Docker, pip, or Kubernetes. The recommended way is Docker with the command provided in the Quick Start section.

What LLM providers are supported?

Hindsight works with 25+ LLM providers including hosted ones like OpenAI, Anthropic, and Gemini, local ones like Ollama, and OpenAI-compatible endpoints.

Can I use Hindsight without a server?

Yes, there is a Python embedded option (hindsight-all) that runs a server in-process, and a managed cloud option called Hindsight Cloud.

How do I add memory to my existing agent?

The easiest way is to use the LLM wrapper, which requires only two lines of code to wrap your existing LLM client.

📊 Repository

Stars★ 22,690
Forks🍴 1,701
Open issues🐛 86
Last commit🕒 Sep 4, 2026
Created📅 Oct 2025
Language💻 Python
License⚖️ MIT

🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.