Favicon of Hindsight

Hindsight

Open-source agent memory system with retain/recall/reflect operations, biomimetic memory types, and 60+ framework integrations. MIT licensed.

Hindsight website screenshot
Hindsight GitHub repository preview

Hindsight is an agent memory system for developers building AI agents that need to learn over time, not just recall past conversations. Instead of relying purely on vector search or a knowledge graph, it organizes memory into world facts, experiences, observations, and mental models, then exposes three operations (retain, recall, reflect) that agents use to store and act on what they've learned. It's built for teams working with LangChain, CrewAI, coding agents like Claude Code or Cursor, or any custom agent stack that needs persistent, structured memory.

Key features

  • Biomimetic memory model: separates world facts, agent experiences, consolidated observations, and synthesized mental models instead of dumping everything into one vector index.
  • Three core operations: retain stores new information and extracts facts, entities, and temporal data via an LLM; recall searches memories; reflect generates disposition-aware responses grounded in memory.
  • Memory banks: memories are scoped into banks (e.g. per user, per project) so agents don't cross-contaminate context.
  • LLM wrapper for instant integration: wrap an existing OpenAI or Anthropic client with wrap_openai()/wrap_anthropic() and memory is retained and recalled automatically, no other code changes.
  • Broad LLM provider support: works with 25+ providers including OpenAI, Anthropic, Gemini, Bedrock, VertexAI, Groq, Ollama, LM Studio, llama.cpp, and existing subscriptions like Claude Pro/Max or GitHub Copilot.
  • 60+ integrations: coding agents (Claude Code, Cursor, Codex, opencode, Aider, Cline), agent frameworks (LangGraph, CrewAI, LlamaIndex, Pydantic AI, OpenAI Agents SDK, AutoGen), and no-code tools (n8n, Zapier, Dify, Flowise).
  • Coding agent project memory: a CLI installer wires per-repo memory banks into supported coding agents automatically, built from git history and past sessions.
  • Built-in MCP server: every deployment exposes a Model Context Protocol endpoint per bank, so any MCP client can call retain/recall/reflect as tools.
  • Multiple deployment modes: Docker, bare-metal pip install, Kubernetes via Helm, embedded Python/Node with no server, or a managed cloud offering.
  • Benchmarked accuracy: reports state-of-the-art results on the LongMemEval benchmark, with results independently reproduced by outside research groups.

Ideal use cases

Hindsight fits agents that need to remember and act on information across sessions: a customer support agent that should recall a user's history, a coding agent that needs to retain architectural decisions and conventions across a project, or a personal assistant that should build an evolving understanding of a person rather than just replaying chat logs. It's also a good fit if you already have an OpenAI/Anthropic client in production and want memory added with a two-line wrapper change rather than a rearchitecture.

It's less useful for simple, stateless request/response tools that never need history, or for cases where a plain vector database already covers your retrieval needs and you don't need fact extraction, temporal reasoning, or consolidated "mental models." If you just need document search (classic RAG over static content), a simpler embedding store may be a better fit than running a memory system built around agent learning.

Installation

The fastest path is Docker:

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

This exposes the API on port 8888 and a UI on port 9999. For bare-metal installs via pip:

pip install hindsight-api
export HINDSIGHT_API_LLM_API_KEY=sk-xxx
hindsight-api

Kubernetes deployments use the Helm chart:

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

Once a server is running, connect a client:

pip install hindsight-client -U
npm install @vectorize-io/hindsight-client
go get github.com/vectorize-io/hindsight/hindsight-clients/go
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?")

For quick prototyping without running a separate server, install the embedded package:

pip install hindsight-all -U

A managed cloud option is also available, reachable at https://api.hindsight.vectorize.io, which skips self-hosting entirely.

Frequently asked questions

Share:

Stars
50.5K
Forks
6.1K
Last commit
17 hours ago
Repository age
1 year
License
MIT
Self-hosted
No
Activity score
87/100
View Repository
Ad
Favicon

 

  
 

Similar to Hindsight

Favicon

 

  
 
Favicon

 

  
 
Favicon