Illustration of what hindsight does: Memory server that lets AI agents store, search and learn from past interactions
AI-generated illustration

vectorize-io /

hindsight

Memory server that lets AI agents store, search and learn from past interactions

  • 52.8k stars
  • 8.1k stars since 3 Oct
  • Python
  • Updated today
  • Some experience
  • Memory, RAG & data

Agents forget. Each new chat starts blank unless you add a way to save and look up past information. Hindsight is a server that does this job. Your agent sends it information to keep, and later asks it questions.

You work with it through three operations: retain (store something), recall (search stored memories) and reflect (generate an answer shaped by what it knows). Memories live in named banks, such as one per user or per code repo. It runs on an LLM you choose, and the Docker setup keeps data in an embedded Postgres.

The README says it aims at agents that learn, not just recall conversation history, and sets itself against plain RAG and knowledge graphs. It cites top results on the LongMemEval benchmark and notes that other vendors' scores are self-reported. Treat those claims as the authors' own and check the live benchmark page.

What it does

  • Retain, recall, reflect

    Three core calls cover storing information, searching it, and producing an answer based on stored memories. Memories are grouped into banks.

  • Two-line LLM wrapper

    The hindsight-litellm package wraps an OpenAI or Anthropic client. It recalls relevant memories before each call and saves the conversation after it.

  • Many ways to run it

    Run it with Docker, Docker Compose with external Postgres, pip, a Helm chart on Kubernetes, or embedded in Python. A hosted Hindsight Cloud option also exists.

  • Wide LLM provider support

    It works with 25+ providers, including hosted ones, local ones such as Ollama and LM Studio, and any OpenAI-compatible endpoint.

  • Coding agent memory

    One npx package sets up per-repo memory for coding agents such as Claude Code, Codex CLI and Cursor CLI, built from git history and past sessions.

What you could build

  • Add long-term memory to a chatbot so it remembers each user across sessions.
  • Give a coding agent persistent knowledge of a repo's architecture and conventions.
  • Wrap an existing OpenAI or Anthropic client to get memory with almost no code changes.
  • Connect memory to agent frameworks like LangGraph, CrewAI or LlamaIndex.
  • Run a fully local memory setup using Ollama or LM Studio as the LLM.

Get started

Start the server with Docker, passing your LLM API key. Then install a client, such as the Python one, and call retain and recall against http://localhost:8888. The UI is on port 9999.

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
pip install hindsight-client -U

Commands are copied from the project's README. Read it on GitHub for the full setup.

More in Memory, RAG & data

    ↑↓ to move, Enter to open, Esc to close