← Back to Leaderboard
Hhindsightai

hindsightai/hindsight

A bank-based memory service that turns agent interactions into durable knowledge

Engineering Health (Methodology)
A+ · 98/100
Maintenance Activity
● Updated today
Latest Release
v1.3.1
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption23/25
Release Cadence20/20
License Clarity20/20
Self-HostedDockerAPI
Total Stars
★ 64,700
24h Growth
+105
7d Growth
+884
Forks
7,456

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

hindsightai/hindsight Star History (2025-11-23 - 2026-12-04) ALL-TIME STAR HISTORY (2025-11 – 2026-12) +64.7k in 376d · avg +172/day 68.3k 34.2k 0 2025-11-23: ★ 12025-12-20: ★ 7132026-01-17: ★ 1,0872026-02-14: ★ 1,3782026-03-14: ★ 3,6952026-04-11: ★ 8,4402026-05-09: ★ 12,3052026-06-06: ★ 15,3572026-07-04: ★ 17,4532026-08-01: ★ 18,5902026-08-29: ★ 21,2582026-09-26: ★ 33,0242026-10-24: ★ 53,0782026-11-16: ★ 61,2462026-12-04: ★ 64,700 ★ 64.7k 2025-11 2026-05 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Hindsight is a Python agent-memory service organized around banks. retain uses an LLM to extract facts, entities, relationships, and temporal information, then normalizes them into canonical entities, time series, and search indexes. Banks distinguish world facts from agent experiences and combine structured relationships with sparse and dense vector representations. Observations consolidate evidence across memories; mental models synthesize a stored answer to a standing question.

The Python uv workspace includes hindsight-api, hindsight-api-slim, hindsight-all, hindsight-all-slim, and hindsight-embed; hindsight-control-plane/ is a separate top-level module. The service exposes memory operations through REST, client SDKs, and a built-in per-bank MCP endpoint. Python applications can also launch a local server through HindsightServer and connect a client to its URL instead of provisioning a separate service.

Key Capabilities & Differentiators

recall searches a bank for relevant memories, including time-oriented queries; reflect synthesizes a response from bank knowledge. For recurring questions, a mental model moves synthesis off the read path: Hindsight refreshes a stored answer in the background, and reading it is a database operation with neither retrieval nor an LLM call. Pages expose the same mechanism as searchable, folder-organized documents that can be projected to disk as Markdown.

Optional typed decisions replace some general-purpose LLM judgments across recall, consolidation, reflect, and Pages. The published model family includes the 0.8B hs-decide-1-flash decision model, the 114M hs-rerank-1 reranker, and the 112M hs-embed-1 model with 384-dimensional output. All three support eight languages. Main LLM options include hosted providers such as OpenAI and Anthropic, local runtimes such as Ollama and llama.cpp, and OpenAI-compatible endpoints.

Trade-offs & Limitations

Compared with a vector store and a conventional chunk-and-retrieve pipeline, Hindsight is a better fit when accumulated interactions must become structured, reusable memory. The cost is a heavier write path: LLM extraction and subsequent consolidation add work beyond indexing chunks. Stored mental models avoid generation on repeated reads, but background refresh means an answer may lag a recent write. Measure write-to-recall visibility and page freshness separately from query latency.

Use plain document RAG when the application mainly needs to retrieve and cite source passages; Hindsight can complement it rather than replace it. Self-hosting gives control over storage placement, but hosted inference creates a separate data boundary. For a multi-user rollout, verify authorization at both REST and the default-enabled MCP endpoints rather than assuming a bank ID is a security boundary. Use workload-specific tests for memory quality, inference cost, and update lag rather than treating a LongMemEval result as a capacity estimate.

Hardware & Deployment Guide

For a trial, use images.hindsight.ai/hindsight:latest, persist /home/hindsight/.pg0, and use ports 8888 and 9999 for the API and UI. The OpenAI example supplies the credential through HINDSIGHT_API_LLM_API_KEY. Other paths include external PostgreSQL via docker/docker-compose, a pip installation launched with hindsight-api, and Kubernetes via oci://images.hindsight.ai/charts/hindsight. On Intel Macs, use hindsight-all-slim for the Python all-in-one install.

Self-hosting the API and database does not make the system offline; that requires local inference for the models your configuration uses. Size storage for retained history and indexes, and measure ingestion, recall, and background refresh under realistic concurrency. Choose a tested image version for production rather than following latest unpinned. Release v1.3.0 stops the slim image from overwriting :latest and adds per-bank instructions to MCP initialization; v1.2.3 addresses ingestion failures on malformed and large files.

Ingestion: retain extracts facts, entities, relationships, and time information, then normalizes them into searchable bank records.
Memory representation: Banks combine entities, relationships, time series, and sparse and dense vectors rather than storing only transcript chunks.
Materialized answers: Mental models refresh in the background and serve stored answers without retrieval or an LLM call at read time; Pages can project to Markdown.
Specialized models: hs-decide-1-flash is a 0.8B decision model; hs-rerank-1 is 114M; hs-embed-1 is 112M and emits 384-dimensional vectors.
Integration: REST and Python, TypeScript, and Go clients support explicit memory operations; the built-in per-bank MCP endpoint is enabled by default.
Deployment: The Docker quickstart persists embedded pg0 in a volume; Compose offers external PostgreSQL, and Helm supports Kubernetes.
Best For

Long-lived assistants that need user preferences, prior experiences, and recurring answers to carry across sessions, with control over deployment and memory writes.

Skip If

You only need stateless document retrieval, or cannot accommodate model-assisted writes and background refresh.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releases · Newer release v1.3.1 (2026-12-02) shipped after this reviewMethodology

Quick Start & Installation

Self-HostedDockerAPI
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

Comparison vs. Top RAG, Data & Memory Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
hindsight ★64.7k+884PythonMITA bank-based memory service that turns agent interactions into durable knowledge
graphiti33.3k+143PythonApache-2.0Temporal graph framework for agent memory with traceable, evolving facts
Memori17.9k+337Python—An SDK-based agent memory layer for persistent state across sessions.
mem070k+498PythonApache-2.0A vector-backed memory layer for AI agents that need to recall past conversation

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/hindsightai/hindsight.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

hindsightai/hindsight Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about hindsight

How should an existing agent integrate Hindsight?

Keep a stable bank ID across sessions. Call retain at application-defined write points, recall when the agent needs matching memories, and reflect when it needs a synthesized response. Use the REST API or an SDK for explicit control. The LLM wrapper automates retention and retrieval on model calls; MCP clients can use /mcp/{bank_id}/.

Do I need a GPU, and how should I size the service?

There is no single VRAM requirement. With a hosted LLM, size the self-hosted service for database work and any inference you run locally. With a local LLM or local decision, embedding, and reranking models, size for the selected models and concurrent work. The 0.8B, 112M, and 114M model sizes describe the optional model family, not measured memory requirements. Benchmark ingestion, recall, and background refresh together.

Can we use it commercially and keep memory data on premises?

Hindsight is MIT-licensed and can be self-hosted for commercial use, subject to the license’s notice requirements. That does not cover hosted provider terms or all model licenses: hs-decide-1-flash is Apache 2.0, while the listed embedding and reranking models are MIT. If data must stay within your environment, verify every inference endpoint as well as database access, backups, and retention.

When is Hindsight a better fit than a vector database with a RAG pipeline?

Choose Hindsight when the application needs to extract facts and experiences, consolidate them into observations, or maintain answers that agents can read across sessions. Choose a simpler vector retrieval stack when the job is mainly to find and cite source passages from a stable corpus. Use both when agents need curated memory alongside authoritative document retrieval.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining hindsightai/hindsight? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature hindsightai/hindsight on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare