Self-host Hindsight
v1.2.1Agent memory layer that learns, not just recalls
docker run -it --pull always --name hindsight --restart unless-stopped --shm-size=1g -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- Stars
- 60 259
- RAM
- 4GB RAM minimum (8GB recommended for production)
- Ports
- 8888 (Hindsight API server (also serves the per-bank MCP endpoints)), 9999 (Control Plane web UI)
- Requires
- LLM provider, PostgreSQL
ghcr.io/vectorize-io/hindsightWhat is Hindsight?
Hindsight is a memory server for AI agents: rather than only replaying chat history, it extracts facts, entities and time-linked relationships from whatever you feed it so an agent can search or reason over them later. Three core operations drive it — retain to store, recall to search, reflect to produce an answer grounded in stored memories — reachable through Python, TypeScript, Go and CLI clients, a REST API, and a per-bank MCP endpoint. Memories sit in isolated banks, usually one per user, agent or project, and a background worker consolidates duplicates into evidence-backed observations, standing mental models and wiki-style knowledge pages. Retrieval runs vector similarity, BM25 keyword search, entity-graph traversal and time-range filtering in parallel, then merges and reranks the hits. Operationally you can start a single container that bundles an embedded PostgreSQL, install it with pip, or use the Helm chart against your own PostgreSQL/pgvector store (an Oracle AI Database backend exists too); a Next.js control-plane UI runs alongside the API. An LLM is mandatory and 25+ hosted and local providers are supported. The server is MIT-licensed, with a usage-billed managed cloud and an enterprise tier beside the self-hosted option; the API has no authentication until you enable the built-in API-key tenant extension, and the UI can be gated with a shared access key.
Hindsight alternatives
Metronix MemorySelf-hosted memory layer for AI agents providing persistent memory, hybrid dense+sparse+graph retrieval, MCP server, and agent-scoped facts across sessions.CompareMetronix Memory with Hindsight
brain-dbSelf-hosted memory database for AI agents with fused semantic, lexical, graph, and temporal retrieval. Single Rust core, binary wire protocol, Apache-2.0.Comparebrain-db with Hindsight
graymatterThree lines of code to give your AI agents persistent memory. Reduce 90% token consumption while also maintaining quality.Comparegraymatter with Hindsight
EngraphisEngraphis is a self-hosted, open-source memory service for AI coding agents with durable scoped memory, local dashboard, MCP support, and bi-temporal history.CompareEngraphis with Hindsight
mem9Open-source, self-hosted persistent memory server for AI agents: hybrid recall, multi-space API, webhooks and LLM fact extraction on TiDB, PostgreSQL or db9.Comparemem9 with Hindsight
Big-AGISelf-hosted, open-source AI workspace for experts: run 2 to 24 models in parallel with Beam, personas, image generation, voice and BYO API keys via Docker.CompareBig-AGI with Hindsight
memory-osSelf-hosted, open-source memory stack for Hermes Agent: seven layers adding Qdrant vector search, SQLite fact storage with trust scores, and automatic context injection.Comparememory-os with Hindsight
CasibaseOpen-source personal AI assistant with RAG knowledge bases, MCP tool use and autonomous agent loops; one self-hosted binary with 30+ model providers, SSO and audit logs.CompareCasibase with Hindsight
All self-hosted alternatives to Neo4j-style knowledge graphs → All self-hosted alternatives to RAG systems →
Should you self-host Hindsight?
Hindsight scores 87/100 on selfhost.directory (how scoring works) and ranks #4 of 209 in AI Agents. It has 60 259 GitHub stars, +8 212 in the last 30 days.
It shipped 4 stable releases in the past year. The latest, v1.2.1, came out on 10 November 2026. New versions land roughly every 8 days.
Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Python.
Its closest alternative on selfhost.directory is Orca (91/100, 121 134 stars). It scores higher overall, so compare the two before you pick. See Hindsight vs Orca side by side.
Features
- Control Plane web UI
- Hybrid multi-strategy retrieval
- Isolated memory banks
- Knowledge pages
- MCP Server
- Mental models
- Multilingual memories
- Observation consolidation
- Prometheus Metrics
- Retain / recall / reflect memory operations
- Secret and PII redaction (Memory Defense)opt-in
- Tag and metadata filtering
- Webhooks
Hindsight README
Hindsight™ is an agent memory system built to create smarter agents that learn over time. Most agent memory systems focus on recalling conversation history. Hindsight is focused on making agents that learn, not just remember.
hindsight-learning-demo.mp4
FAQ
What's the typical latency for recall operations?
Around 50-100 ms without reranking and 200-500 ms with reranking, depending on the reranker model and installation.
What's the difference between a mental model and a knowledge page?
They use the same engine; a knowledge page adds a place in a folder tree and document-oriented defaults — built from observations only, refreshed incrementally after each consolidation, and a larger content budget.
When should I use mental models?
When you need higher-level understanding or long-term behavioural patterns available instantly with no reasoning on the request path; Hindsight builds and refreshes the content, and reflect consults mental models first.
When should I use recall vs reflect?
Use recall when you want raw facts, need speed (50-500 ms) and will synthesize the answer yourself; use reflect when you want a ready-made, disposition-aware answer with citations, accepting 1-10 s latency.
What's the difference between retain, recall, and reflect?
Retain stores facts, entities and relationships; recall searches and returns raw memory data for a query; reflect uses an AI agent to answer the query from retrieved memories.
How do I isolate user data?
Either give each user their own memory bank, which is fully isolated, or keep one bank and tag memories with user identifiers at retain time so recall and reflect can filter per user while still allowing cross-user analysis.
What are "zombie" operations and how do I recover them?
A background task left stuck in processing because the worker that claimed it disappeared, usually after a container restart with an unstable worker ID. Recover with the admin CLI commands decommission-worker or decommission-workers, and prevent it by setting a stable HINDSIGHT_API_WORKER_ID.
What are the minimum system requirements for self-hosting?
Python 3.11 or newer, 4 GB RAM minimum (8 GB recommended for production), and an LLM API key or a local LLM setup.
Do I need to host my own infrastructure?
No — you can use the fully managed Hindsight Cloud or deploy the self-hosted server on your own infrastructure with Docker or a direct install.
Which model should I use with Hindsight?
The public Model Leaderboard benchmarks models on accuracy, speed, cost and reliability for retain, reflect and observation consolidation.
Which clients and languages are supported?
Python, TypeScript, Go and a CLI clients, plus plain HTTP against the REST API.
Why use Hindsight instead of other solutions?
The project cites top LongMemEval benchmark accuracy, a PostgreSQL foundation, horizontal scalability, self-hosted or cloud deployment, long-term memory consolidation and graph-based reasoning.
What is Hindsight and how does it differ from RAG?
Hindsight stores structured facts instead of raw document chunks, builds mental models that consolidate knowledge over time, links entities and concepts in a graph, supports time-aware retrieval and adds disposition-aware reflection.
More in AI Agents
hivekeepSelf-hosted AI agent team with persistent memory, collaboration, custom tools, and 6 messaging channels — all in one container.
homelabSelf-hosted autonomous agent factory running OpenClaw, Kilo Pipeline, Crawl4AI, Qdrant, and Ollama locally on low-power x86 hardware.
ibl.ai/osibl.ai/os is a self-hosted, open-source AI agent platform for building and deploying customizable conversational agents with multi-LLM support, RAG, voice, analytics.
IM.codesSelf-hosted open-source messaging and control layer for AI coding agents providing shared memory, remote desktop, supervised execution, and cross-provider audit.
invisible_dotsAn open-source self-hosted AI agent platform where each Dot gets a QEMU virtual machine with persistent Linux desktop and browser automation.
ironclawSecure open-source AI agent framework that runs locally or on NEAR AI Cloud with encrypted vaults and WASM sandboxing. Compatible with OpenAI, Anthropic, Ollama LLMs.
It's a PlanOpen-source, self-hosted issue tracker where AI agents work alongside humans on shared boards. Replaces Linear, Jira, Plane with built-in AI, multiple views, initiatives.
Jentic OneJentic One is a self-hosted, open-source execution layer letting AI agents securely call real APIs without handling credentials.- Kanban CLISelf-hosted, open-source (AGPL-3.0) Rust CLI that runs agile task, sprint, role and metrics tracking entirely in local JSON files, with agent-friendly JSON output.
Keeper.shOpen-source, self-hosted calendar syncer keeping CalDAV, iCloud, Google, Fastmail and Outlook schedules in step, with every Pro feature plus an MCP server.
KittyClawSelf-hosted kanban where AI agents (Claude, Codex, Grok, Mistral, Ollama) work alongside humans with pipelines, processors, live streaming, and MCP server.
kiwifsKiwiFS is a self-hosted markdown filesystem turning .md files into a knowledge server with git versioning, search, a web UI, and 78 MCP tools for AI agents.

0 comments