# Hindsight

Hindsight is an open-source agent memory system that enables AI agents to truly learn over time by retaining facts, recalling with hybrid strategies, and reflecting to form mental models.

Canonical URL: https://a2a-mcp.org/entry/hindsight

Language: en

Category: Frameworks & SDKs

Updated: 2026-04-08

## What is Hindsight?

Hindsight is an open-source (MIT) **agent memory system** designed to make AI agents smarter by enabling genuine learning across sessions. Unlike traditional RAG or simple conversation history, Hindsight treats memory as a first-class substrate for reasoning.

It solves the problem of stateless agents that forget everything between interactions by providing structured, biomimetic memory with three core operations: **Retain**, **Recall**, and **Reflect**.

## Core Features

- **Biomimetic Memory Networks**: Organizes knowledge into World Facts, Experiences, and Mental Models (including automatic Observation consolidation).
- **Retain**: LLM-powered extraction of entities, relationships, facts, and temporal data into canonical memory banks.
- **Recall (TEMPR)**: Hybrid multi-strategy retrieval combining Semantic (vector), Keyword (BM25), Graph (entity/temporal/causal), and Temporal filtering, fused with reciprocal rank fusion and reranking.
- **Reflect**: Agentic synthesis using memory to generate insights, update beliefs, and support complex reasoning. Configurable via Mission, Directives, and Disposition.
- **Memory Banks**: Isolated per-user or per-context storage with metadata support.
- **Multi-LLM Support**: Works with OpenAI, Anthropic, Gemini, Groq, Ollama, and more via LiteLLM.

## Performance

Hindsight achieves state-of-the-art results on long-term memory benchmarks, including top accuracy on **LongMemEval** (as of early 2026). Performance has been independently reproduced by Virginia Tech’s Sanghani Center and The Washington Post.

## Installation & Quick Start

### Docker (Recommended)

```bash
export OPENAI_API_KEY=sk-xxx
docker run --rm -it --pull always -p 8888:8888 -p 9999:9999 \
  -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \
  -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \
  ghcr.io/vectorize-io/hindsight:latest
```

API runs on `http://localhost:8888`, web UI on `http://localhost:9999`.

### Python SDK

```bash
pip install hindsight-client -U
```

Basic usage:

```python
from hindsight_client import Hindsight

client = Hindsight(base_url="http://localhost:8888")
client.retain(bank_id="demo", content="...")
results = client.recall(bank_id="demo", query="...")
insights = client.reflect(bank_id="demo", query="...")
```

Node.js/TypeScript and embedded modes are also supported.

## Use Cases

- Building persistent coding agents (Claude Code, Cursor integrations)
- Personalized conversational agents with long-term user preference retention
- Autonomous agents that learn from experience and adapt strategies
- Enterprise AI workflows requiring cross-session memory and reasoning

## Resources

- GitHub: https://github.com/vectorize-io/hindsight
- Official Docs: https://hindsight.vectorize.io
- arXiv Paper: https://arxiv.org/abs/2512.12818
- Hindsight Cloud: https://ui.hindsight.vectorize.io

Hindsight is actively maintained (latest commit April 2026) and used in production by Fortune 500 companies and AI startups.

## Tags

- ai-agent-memory
- agent-framework
- long-term-memory
- rag-alternative
- python
- typescript
- llm
- vectorize

## Sources

- [Project website](https://github.com/vectorize-io/hindsight)
