Agent memory and context

hindsightai/

hindsight

Agent memory server with retain, recall and reflect calls. It consolidates stored facts into beliefs and pages, and runs self-hosted or in the cloud.

What’s new here

Hindsight says its goal is agents that learn, not only agents that recall conversation history. Retained facts are consolidated in the background into observations, each with its supporting quotes and a proof count. They are refined when new evidence arrives, not overwritten. On top of those sit mental models and pages, which are standing answers a bank rewrites as it learns.

What it does

You run a Hindsight server and talk to it through three calls. retain stores information, using an LLM to extract facts, entities, relationships and time data. recall searches memories with four strategies in parallel (semantic, keyword, graph and temporal), then merges and reranks the results. reflect does a deeper pass over existing memories to answer questions that need more than lookup.

Memories live in banks, which are isolated stores for one user, agent or project. Banks can carry disposition traits that shape how reflect reasons. An opt-in Memory Defense policy scans each retain for secrets and PII and either redacts the match or blocks the item.

For integration, there is a two-line LLM wrapper (wrap_openai, wrap_anthropic) that recalls and retains automatically on every call. There is also a built-in MCP endpoint per bank, an installer package for CLI coding agents, SDKs for Python, Node.js and Go, a CLI, and a REST API. The README lists 60+ integrations. The project also offers three small models: a decision model, a reranker and an embedding model. The decision model answers the small judgments inside recall, consolidation, reflect and pages, so fewer of them go to your LLM.

Who it’s for

Developers building agents that should carry knowledge across sessions: support, sales or project agents, coding agents that need per-repo memory, or per-user chatbots. The README itself says it may be overkill for simple workflows such as basic n8n automations. You need to be comfortable running a server with an LLM key, or using the hosted Hindsight Cloud.

Try it

You need Docker and an LLM API key. The README says OpenAI is one of 25+ supported providers, and some subscriptions need no key. This is the README’s Docker 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 \
  images.hindsight.ai/hindsight:latest

The API is then at http://localhost:8888 and the UI at http://localhost:9999. Then install a client and try the three calls:

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

Other routes in the README are pip install hindsight-api for bare metal, a Helm chart for Kubernetes, and pip install hindsight-all for an embedded Python server. There is also a prebuilt release (v1.3.0) with binaries for macOS, Linux and Windows plus Python wheels.

How mature is it

About a year old (created 2025-10-30) and very active. It has 64,514 stars, 7,437 forks, 79 releases and a latest release of v1.3.0 on 2026-11-24. The last push was 2026-12-02. The contributor count (100) and 90-day commit count (100) are both capped by the API, so the real numbers are at least that. There are 136 open issues and 19 open PRs. The license is MIT. The README says the company behind it was renamed from Vectorize to Hindsight AI, and the repo now lives under hindsightai. Its benchmark claims (state of the art on LongMemEval, reproduced by Virginia Tech and The Washington Post per the README) come from the project itself, so check the live results before relying on them.