vectorize-io/hindsightPublic

Hindsight: Agent Memory That Learns

AI summary: An agent memory system designed to give autonomous AI agents long-term recall and contextual awareness.

Stars
45.4K
+352 today
Forks
5.9K
Watchers
94
Open issues
133
Open PRs
183
Contributors
~276
Commits
3.4K
Branches
1.4K

PythonMITCreated Oct 30, 2025Last push 2d agoLatest release v0.10.2+8.2K stars this week+17.7K this month

Quick answers

What is hindsight?
An agent memory system designed to give autonomous AI agents long-term recall and contextual awareness.
What does hindsight do?
Hindsight is a specialized memory system built to create smarter, context-aware autonomous agents. It acts as a long-term storage and retrieval layer for AI models. The system allows agents to recall past interactions, decisions, and user preferences across separate sessions. By providing persistent memory, it enables more coherent and personalized experiences in multi-turn workflows.
Who is hindsight for?
AI developers and researchers building autonomous agents or complex language model applications. Users should have experience integrating APIs into AI workflows.
How popular is hindsight on GitHub?
vectorize-io/hindsight has 45,429 stars and 5,907 forks on GitHub, and gained 8,219 stars in the last 7 days.
What license does hindsight use?
vectorize-io/hindsight is released under the MIT license.

Star history

since Sep 24, 2026
020K40KSep 2026Sep 2026Sep 2026Oct 2026
45.4K stars as of Oct 4, 2026. Measured daily since Sep 24, 2026; GitHub no longer exposes earlier star timestamps.

Contribution activity

commits per day, last 52 weeks
OctNovDecJanFebMarAprMayJunJulAugSepOctMonWedFri2025-10-12: 0 commits2025-10-13: 0 commits2025-10-14: 0 commits2025-10-15: 0 commits2025-10-16: 0 commits2025-10-17: 0 commits2025-10-18: 0 commits2025-10-19: 0 commits2025-10-20: 0 commits2025-10-21: 0 commits2025-10-22: 0 commits2025-10-23: 0 commits2025-10-24: 0 commits2025-10-25: 0 commits2025-10-26: 0 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 0 commits2025-10-30: 3 commits2025-10-31: 3 commits2025-11-01: 0 commits2025-11-02: 0 commits2025-11-03: 4 commits2025-11-04: 1 commit2025-11-05: 3 commits2025-11-06: 1 commit2025-11-07: 8 commits2025-11-08: 0 commits2025-11-09: 0 commits2025-11-10: 3 commits2025-11-11: 11 commits2025-11-12: 0 commits2025-11-13: 7 commits2025-11-14: 2 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 4 commits2025-11-18: 1 commit2025-11-19: 1 commit2025-11-20: 1 commit2025-11-21: 1 commit2025-11-22: 2 commits2025-11-23: 1 commit2025-11-24: 4 commits2025-11-25: 1 commit2025-11-26: 1 commit2025-11-27: 1 commit2025-11-28: 2 commits2025-11-29: 1 commit2025-11-30: 0 commits2025-12-01: 1 commit2025-12-02: 1 commit2025-12-03: 21 commits2025-12-04: 23 commits2025-12-05: 7 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 7 commits2025-12-09: 7 commits2025-12-10: 14 commits2025-12-11: 9 commits2025-12-12: 8 commits2025-12-13: 0 commits2025-12-14: 1 commit2025-12-15: 7 commits2025-12-16: 11 commits2025-12-17: 7 commits2025-12-18: 12 commits2025-12-19: 2 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 10 commits2025-12-23: 10 commits2025-12-24: 1 commit2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 4 commits2026-01-02: 3 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 10 commits2026-01-06: 0 commits2026-01-07: 8 commits2026-01-08: 18 commits2026-01-09: 6 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 2 commits2026-01-13: 9 commits2026-01-14: 2 commits2026-01-15: 1 commit2026-01-16: 2 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 6 commits2026-01-20: 3 commits2026-01-21: 0 commits2026-01-22: 3 commits2026-01-23: 5 commits2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 8 commits2026-01-27: 5 commits2026-01-28: 15 commits2026-01-29: 13 commits2026-01-30: 26 commits2026-01-31: 11 commits2026-02-01: 1 commit2026-02-02: 7 commits2026-02-03: 6 commits2026-02-04: 12 commits2026-02-05: 5 commits2026-02-06: 8 commits2026-02-07: 1 commit2026-02-08: 1 commit2026-02-09: 13 commits2026-02-10: 6 commits2026-02-11: 6 commits2026-02-12: 10 commits2026-02-13: 4 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 10 commits2026-02-17: 4 commits2026-02-18: 11 commits2026-02-19: 11 commits2026-02-20: 5 commits2026-02-21: 0 commits2026-02-22: 0 commits2026-02-23: 6 commits2026-02-24: 5 commits2026-02-25: 7 commits2026-02-26: 7 commits2026-02-27: 2 commits2026-02-28: 1 commit2026-03-01: 0 commits2026-03-02: 14 commits2026-03-03: 12 commits2026-03-04: 7 commits2026-03-05: 13 commits2026-03-06: 9 commits2026-03-07: 2 commits2026-03-08: 0 commits2026-03-09: 8 commits2026-03-10: 8 commits2026-03-11: 5 commits2026-03-12: 5 commits2026-03-13: 20 commits2026-03-14: 2 commits2026-03-15: 0 commits2026-03-16: 10 commits2026-03-17: 7 commits2026-03-18: 7 commits2026-03-19: 11 commits2026-03-20: 12 commits2026-03-21: 6 commits2026-03-22: 1 commit2026-03-23: 16 commits2026-03-24: 9 commits2026-03-25: 15 commits2026-03-26: 20 commits2026-03-27: 16 commits2026-03-28: 1 commit2026-03-29: 0 commits2026-03-30: 44 commits2026-03-31: 27 commits2026-04-01: 14 commits2026-04-02: 8 commits2026-04-03: 0 commits2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 3 commits2026-04-07: 24 commits2026-04-08: 17 commits2026-04-09: 4 commits2026-04-10: 10 commits2026-04-11: 1 commit2026-04-12: 0 commits2026-04-13: 40 commits2026-04-14: 17 commits2026-04-15: 39 commits2026-04-16: 16 commits2026-04-17: 16 commits2026-04-18: 1 commit2026-04-19: 0 commits2026-04-20: 13 commits2026-04-21: 9 commits2026-04-22: 20 commits2026-04-23: 14 commits2026-04-24: 15 commits2026-04-25: 0 commits2026-04-26: 0 commits2026-04-27: 13 commits2026-04-28: 20 commits2026-04-29: 47 commits2026-04-30: 14 commits2026-05-01: 1 commit2026-05-02: 0 commits2026-05-03: 0 commits2026-05-04: 31 commits2026-05-05: 22 commits2026-05-06: 21 commits2026-05-07: 28 commits2026-05-08: 20 commits2026-05-09: 0 commits2026-05-10: 0 commits2026-05-11: 2 commits2026-05-12: 6 commits2026-05-13: 11 commits2026-05-14: 10 commits2026-05-15: 6 commits2026-05-16: 0 commits2026-05-17: 0 commits2026-05-18: 0 commits2026-05-19: 6 commits2026-05-20: 4 commits2026-05-21: 2 commits2026-05-22: 17 commits2026-05-23: 0 commits2026-05-24: 0 commits2026-05-25: 31 commits2026-05-26: 18 commits2026-05-27: 17 commits2026-05-28: 36 commits2026-05-29: 21 commits2026-05-30: 0 commits2026-05-31: 0 commits2026-06-01: 31 commits2026-06-02: 12 commits2026-06-03: 9 commits2026-06-04: 13 commits2026-06-05: 51 commits2026-06-06: 0 commits2026-06-07: 0 commits2026-06-08: 53 commits2026-06-09: 22 commits2026-06-10: 25 commits2026-06-11: 23 commits2026-06-12: 12 commits2026-06-13: 0 commits2026-06-14: 0 commits2026-06-15: 17 commits2026-06-16: 20 commits2026-06-17: 39 commits2026-06-18: 13 commits2026-06-19: 8 commits2026-06-20: 0 commits2026-06-21: 0 commits2026-06-22: 4 commits2026-06-23: 35 commits2026-06-24: 6 commits2026-06-25: 15 commits2026-06-26: 8 commits2026-06-27: 0 commits2026-06-28: 0 commits2026-06-29: 6 commits2026-06-30: 33 commits2026-07-01: 10 commits2026-07-02: 5 commits2026-07-03: 8 commits2026-07-04: 0 commits2026-07-05: 0 commits2026-07-06: 3 commits2026-07-07: 20 commits2026-07-08: 8 commits2026-07-09: 6 commits2026-07-10: 8 commits2026-07-11: 5 commits2026-07-12: 0 commits2026-07-13: 13 commits2026-07-14: 4 commits2026-07-15: 14 commits2026-07-16: 7 commits2026-07-17: 12 commits2026-07-18: 0 commits2026-07-19: 0 commits2026-07-20: 42 commits2026-07-21: 33 commits2026-07-22: 5 commits2026-07-23: 5 commits2026-07-24: 31 commits2026-07-25: 0 commits2026-07-26: 0 commits2026-07-27: 16 commits2026-07-28: 14 commits2026-07-29: 17 commits2026-07-30: 13 commits2026-07-31: 12 commits2026-08-01: 0 commits2026-08-02: 0 commits2026-08-03: 30 commits2026-08-04: 17 commits2026-08-05: 13 commits2026-08-06: 9 commits2026-08-07: 19 commits2026-08-08: 3 commits2026-08-09: 1 commit2026-08-10: 43 commits2026-08-11: 20 commits2026-08-12: 34 commits2026-08-13: 24 commits2026-08-14: 15 commits2026-08-15: 1 commit2026-08-16: 1 commit2026-08-17: 15 commits2026-08-18: 17 commits2026-08-19: 41 commits2026-08-20: 18 commits2026-08-21: 8 commits2026-08-22: 1 commit2026-08-23: 1 commit2026-08-24: 26 commits2026-08-25: 7 commits2026-08-26: 8 commits2026-08-27: 6 commits2026-08-28: 5 commits2026-08-29: 1 commit2026-08-30: 1 commit2026-08-31: 57 commits2026-09-01: 50 commits2026-09-02: 20 commits2026-09-03: 14 commits2026-09-04: 23 commits2026-09-05: 1 commit2026-09-06: 1 commit2026-09-07: 41 commits2026-09-08: 22 commits2026-09-09: 27 commits2026-09-10: 11 commits2026-09-11: 15 commits2026-09-12: 3 commits2026-09-13: 1 commit2026-09-14: 18 commits2026-09-15: 35 commits2026-09-16: 16 commits2026-09-17: 24 commits2026-09-18: 19 commits2026-09-19: 15 commits2026-09-20: 1 commit2026-09-21: 17 commits2026-09-22: 11 commits2026-09-23: 26 commits2026-09-24: 21 commits2026-09-25: 61 commits2026-09-26: 4 commits2026-09-27: 0 commits2026-09-28: 18 commits2026-09-29: 37 commits2026-09-30: 30 commits2026-10-01: 14 commits2026-10-02: 38 commits2026-10-03: 0 commits2026-10-04: 0 commits2026-10-05: 0 commits2026-10-06: 0 commits2026-10-07: 0 commits2026-10-08: 0 commits2026-10-09: 0 commits2026-10-10: 0 commits
3,369 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Widely adopted

    45,429 stars

  • Rising fast

    +8,219 stars this week

  • Very active

    3,369 commits in 52 weeks

  • Community-driven

    ~276 contributors

  • Permissive license

    MIT

  • Continuous integration

    Automated checks passing

  • Repeat trending

    12 trending appearances

What hindsight does

Hindsight is a specialized memory system built to create smarter, context-aware autonomous agents. It acts as a long-term storage and retrieval layer for AI models. The system allows agents to recall past interactions, decisions, and user preferences across separate sessions. By providing persistent memory, it enables more coherent and personalized experiences in multi-turn workflows.

AI developers and researchers building autonomous agents or complex language model applications. Users should have experience integrating APIs into AI workflows.

  • Persistent memory: Stores agent interactions to maintain context across multiple sessions.
  • Contextual retrieval: Fetches relevant historical data when the agent encounters similar situations.
  • Cloud integration: Provides a hosted backend for managing and querying agent memory at scale.
  • Developer API: Offers simple integrations for connecting custom agents to the memory backend.
  • Performance benchmarking: Includes tools to measure and optimize memory retrieval speeds.

Where teams use it

Building personalized assistants

Create AI chatbots that remember user preferences and past conversations over time.

Enhancing agent reasoning

Supply autonomous agents with historical context to improve decision-making in complex tasks.

Managing long-running workflows

Maintain state and memory for AI agents executing multi-step processes across days or weeks.

Evaluating agent memory

Use the built-in benchmarks to test the efficiency of different retrieval strategies.

README

main branch

What is Hindsight?

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

It eliminates the shortcomings of alternative techniques such as RAG and knowledge graph and delivers state-of-the-art performance on long term memory tasks.

Contents


Memory Performance & Accuracy

Hindsight is the most accurate agent memory system ever tested according to benchmark performance. It has achieved state-of-the-art performance on the LongMemEval benchmark, widely used to assess memory system performance across a variety of conversational AI scenarios. The current reported performance of Hindsight and other agent memory solutions as of January 2026 is shown here:

Overview

Live, continuously updated results — including per-model accuracy, latency and cost — are published at benchmarks.hindsight.vectorize.io.

The benchmark performance data for Hindsight has been independently reproduced by research collaborators at the Virginia Tech Sanghani Center for Artificial Intelligence and Data Analytics and The Washington Post. Other scores are self-reported by software vendors.

Hindsight is being used in production at Fortune 500 enterprises and by a growing number of AI startups.


🤖 Using a coding agent? Install the Hindsight documentation skill for instant access to docs while you code:

npx skills add https://github.com/vectorize-io/hindsight --skill hindsight-docs

Works with Claude Code, Cursor, and other AI coding assistants.


Quick Start

1. Start a server

Docker (recommended)
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

API: http://localhost:8888 UI: http://localhost:9999

Hindsight works with 25+ LLM providers via HINDSIGHT_API_LLM_PROVIDER — hosted (openai, anthropic, gemini, groq, bedrock, vertexai, minimax, deepseek, atlas, meta, …), fully local (ollama, lmstudio, llamacpp), any OpenAI-compatible endpoint, and gateways (litellm, litellmrouter) that reach the rest. Existing subscriptions work too: openai-codex (ChatGPT Plus/Pro), claude-code (Claude Pro/Max), cursor (Cursor) and github-copilot (GitHub Copilot) need no API key. See supported models.

Docker (external PostgreSQL)
export OPENAI_API_KEY=sk-xxx
export HINDSIGHT_DB_PASSWORD=choose-a-password
cd docker/docker-compose
docker compose up

Oracle AI Database is also supported for enterprise deployments with full feature parity. See the storage documentation for details.

Bare metal (pip)
pip install hindsight-api
export HINDSIGHT_API_LLM_API_KEY=sk-xxx

hindsight-api
Kubernetes (Helm)
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
Managed (no server)

Hindsight Cloud is the hosted option: managed infrastructure that scales automatically, plus a dashboard, backups, team collaboration and a 99.9% uptime SLA. Billing is usage-based with free credits to start — no fixed monthly or per-seat fee. Point any client at https://api.hindsight.vectorize.io with your API key and skip the deployment entirely.

Compare self-hosted, Cloud and Enterprise → · Sign up →

All options, including Windows and air-gapped setups, are covered in the installation guide.

2. Connect a client

pip install hindsight-client -U                                  # Python
npm install @vectorize-io/hindsight-client                        # Node.js / TypeScript
go get github.com/vectorize-io/hindsight/hindsight-clients/go     # Go
curl -fsSL https://hindsight.vectorize.io/get-cli | bash          # CLI
Python
from hindsight_client import Hindsight

client = Hindsight(base_url="http://localhost:8888")

# Retain: Store information
client.retain(bank_id="my-bank", content="Alice works at Google as a software engineer")

# Recall: Search memories
client.recall(bank_id="my-bank", query="What does Alice do?")

# Reflect: Generate disposition-aware response
client.reflect(bank_id="my-bank", query="Tell me about Alice")
Node.js / TypeScript
const { HindsightClient } = require('@vectorize-io/hindsight-client');

const main = async () => {
  const client = new HindsightClient({ baseUrl: 'http://localhost:8888' });

  await client.retain('my-bank', 'Alice loves hiking in Yosemite');

  const results = await client.recall('my-bank', 'What does Alice like?');
  console.log(results);
}

main();

Full reference: Python · Node.js · Go · CLI · REST API

Supported Platforms

Platform Docker Bare Metal (pip) Embedded DB (pg0)
Linux (x86_64, ARM64) ✅ ✅ ✅
macOS (Apple Silicon / arm64) ✅ ✅ ✅
macOS (Intel / x86_64) ✅ ⚠️ ✅
Windows (x86_64) ✅ ✅ ✅

⚠️ Intel Macs: use hindsight-all-slim — see the installation guide for details.

Python Embedded (no server required)

pip install hindsight-all -U

On Intel (x86_64) Macs, install hindsight-all-slim instead — see Supported Platforms.

import os
from hindsight import HindsightServer, HindsightClient

with HindsightServer(
    llm_provider="openai",
    llm_model="gpt-5-mini",
    llm_api_key=os.environ["OPENAI_API_KEY"]
) as server:
    client = HindsightClient(base_url=server.url)
    client.retain(bank_id="my-bank", content="Alice works at Google")
    results = client.recall(bank_id="my-bank", query="Where does Alice work?")

A Node.js equivalent and a daemon CLI are also available.


Adding Hindsight to Your Agent

LLM Wrapper (2 lines of code)

The easiest way to add memory to an existing agent is the LLM Wrapper. Swap your LLM client for a wrapped one — memories are then stored and retrieved automatically on every call, with no other changes to your code.

pip install hindsight-litellm
from openai import OpenAI
from hindsight_litellm import wrap_openai

# Wrap your existing LLM client and you're done.
# Defaults to Hindsight Cloud; pass hindsight_api_url for a self-hosted server.
client = wrap_openai(
    OpenAI(),
    bank_id="user-123",
    hindsight_api_url="http://localhost:8888",
)

# Hindsight recalls relevant memories before the call
# and retains the conversation after it.
response = client.chat.completions.create(
    model="gpt-5-mini",
    messages=[{"role": "user", "content": "What do you know about me?"}],
)

wrap_anthropic() does the same for the Anthropic SDK, and every setting — bank, recall budget, fact types, reflect instead of recall — can be overridden per call with hindsight_* kwargs. LiteLLM sits underneath, so the same integration covers 100+ models. See the LiteLLM integration.

If you need explicit control over when memories are stored and recalled, use the SDKs or REST API directly instead.

Integrations

60+ integrations — most need no code changes.

Coding agents Claude Code · Codex · Cursor · GitHub Copilot · opencode · Cline · Aider · Zed · Continue · Roo Code · OpenHands
Agent frameworks LangGraph / LangChain · LlamaIndex · CrewAI · Pydantic AI · OpenAI Agents SDK · Google ADK · Agno · Strands · AutoGen · Microsoft Agent Framework · Vercel AI SDK · Haystack
No-code / low-code n8n · Zapier · Dify · Flowise
Apps & tools ChatGPT · Perplexity · Obsidian · Pipecat · Vapi

👉 Browse all integrations

Coding Agents

One package gives CLI coding agents long-term project memory: a per-repo bank built automatically from git history and past sessions, injected into the agent as it starts working, plus curated knowledge pages covering architecture, conventions and in-flight work.

npx @vectorize-io/hindsight-coding-agents install all          # every detected agent, wired natively
npx @vectorize-io/hindsight-coding-agents install claude-code  # or just one

Supports Claude Code, Codex CLI, Cursor CLI, GitHub Copilot CLI, opencode, Kilo CLI, Cline CLI, Antigravity CLI, Devin CLI, pi, Prime Agent, Grok Build and DeepSeek Harness. Ingestion is automatic — there is no setup command. See the coding agents integration.

MCP Server

Every server ships a built-in Model Context Protocol endpoint, one per bank, enabled by default:

http://localhost:8888/mcp/{bank_id}/

Point any MCP client at it to expose retain, recall and reflect as tools. See the MCP server docs.


Core Concepts

Overview

Memory Types

Most agent memory implementations rely on basic vector search or sometimes use a knowledge graph. Hindsight uses biomimetic data structures to organize agent memories in a way that is more like how human memory works:

  • World facts: facts about the world ("The stove gets hot")
  • Experiences: the agent's own experiences ("I touched the stove and it really hurt")
  • Observations: consolidated, evidence-backed beliefs formed from many memories
  • Mental models: learned understanding of the agent's world, synthesized from observations and facts

Memories live in banks. When memories are added, they are pushed into either the world facts or the experiences pathway, then represented as a combination of entities, relationships, and time series with sparse/dense vector representations to aid in later recall.

The Three Operations

Retain

The retain operation is used to push new memories into Hindsight. It tells Hindsight to retain the information you pass in as an input.

client.retain(
    bank_id="my-bank",
    content="Alice got promoted to senior engineer",
    context="career update",
    timestamp="2025-06-15T10:00:00Z",
)

Behind the scenes, retain uses an LLM to extract key facts, temporal data, entities, and relationships. It passes these through a normalization process to transform extracted data into canonical entities, time series, and search indexes along with metadata. These representations create the pathways for accurate memory retrieval in the recall and reflect operations.

what-hindsight-does-retain.mp4

Retain docs →

Recall

The recall operation is used to retrieve memories. These memories can come from any of the memory types (world, experiences, etc.)

client.recall(bank_id="my-bank", query="What does Alice do?")
client.recall(bank_id="my-bank", query="What happened in June?")   # temporal

Recall performs 4 retrieval strategies in parallel:

  • Semantic: Vector similarity
  • Keyword: BM25 exact matching
  • Graph: Entity/temporal/causal links
  • Temporal: Time range filtering

what-hindsight-does-recall.mp4

The individual results are merged, ordered by relevance using reciprocal rank fusion and a cross-encoder reranking model, then trimmed as needed to fit within the token limit.

Recall docs →

Reflect

The reflect operation performs a more thorough analysis of existing memories. This allows the agent to form new connections between memories and build a more thorough understanding of its world — or to answer a question that needs deep thinking rather than lookup.

client.reflect(bank_id="my-bank", query="What should I know about Alice?")

For example, reflect supports use cases such as:

  • An AI Project Manager reflecting on what risks need to be mitigated on a project.
  • A Sales Agent reflecting on why certain outreach messages have gotten responses while others haven't.
  • A Support Agent reflecting on opportunities where customers have questions not answered by current product documentation.

what-hindsight-does-reflect.mp4

Reflect docs →

Observations

Retained facts don't stay a flat pile. In the background, Hindsight consolidates related facts into observations — deduplicated beliefs the bank has built up over time. Each observation keeps its supporting evidence with exact quotes and a proof count, and is refined rather than overwritten when new evidence arrives, so new information strengthens, weakens or extends an existing belief instead of silently replacing it.

Observations docs →

Mental Models & Knowledge Pages

A mental model is a standing answer to a question about a bank ("What are this user's preferences?"). You define the question once; Hindsight writes the answer, stores it, and rewrites it in the background as the bank learns more. Reading one is a database read — no retrieval, no LLM call — so an agent can boot with a page of settled knowledge instead of rediscovering it every session.

Knowledge pages are mental models with the mechanics hidden: living documents a bank writes about itself, organized in folders like a wiki, searchable, and projectable onto disk as ordinary markdown. Supply a name and a question; every other decision is a default you can override.

Mental models → · Knowledge pages →

Memory Banks

A bank is an isolated memory store — one "brain" for one user, agent, or project. Isolation is strict: no cross-bank leakage. Banks carry background context and disposition traits (skepticism, literalism, empathy) that shape how reflect reasons over their memories, and can be created from declarative bank templates.

Two more things worth knowing:

  • Multilingual by default. Input language is detected and preserved end to end — facts stay in their original language and entities keep their native script (张伟 stays 张伟, not "Zhang Wei"). Docs →
  • Memory Defense. An opt-in, per-bank policy that scans every retain for secrets and PII against 45 patterns and either redacts the match ([REDACTED:github_token]) or blocks the item before it reaches storage. Docs →

Use Cases

Hindsight is built to support conversational AI agents as well as agents that are intended to perform tasks autonomously. The ideal use case for Hindsight are agents that require a blend of these features such as AI employees that need to handle open-ended tasks, change behavior based on user feedback, and learn to perform complex tasks to automate work at a level that approximates a human work. Hindsight can be used with simple AI workflows like those built with n8n and other similar tools, but may be overkill for such applications.

Per-User Memories and Chat History

One of the simpler use cases you can use Hindsight for is to personalize AI chatbots and other conversational agents by storing and recalling memories associated with individual users.

The requirements for this use case usually look something like this:

Per-User Memories

per-user-memory.mp4

Satisfying these requirements in Hindsight is straightforward. When new user inputs and tool calls are ingested into Hindsight using the retain operation, custom metadata can be used to enrich the new memories. Metadata provides a convenient way to isolate memories that need to be restricted to a given user. Once these are fed into the retain operation, any raw memories and mental models that get created can be filtered when retrieving relevant memories.

Per-User Memories

More patterns in the Cookbook and Best Practices.


Running in Production

Storage PostgreSQL + pgvector, or Oracle AI Database 23ai with full feature parity — storage
Configuration Hierarchical: global env vars → per-tenant → per-bank — configuration
Monitoring Prometheus metrics and dashboards for LLM calls, tokens and latency — monitoring
Operations Admin CLI for migrations, bank repair and stuck operations — admin CLI
Events Webhooks for retain, consolidation and refresh lifecycle events — webhooks
Extensibility Tenant, auth and storage extension points — extensions
Managed Skip all of it with Hindsight Cloud — managed, usage-based, 99.9% uptime SLA

Resources

Documentation:

Clients:

Community:


Star History

Star History Chart


Contributing

See CONTRIBUTING.md.

License

MIT — see LICENSE


Built by Vectorize.io

View on GitHub

Recent activity

commits and pull requests

Releases and announcements

71 total
  1. v0.10.2v0.10.2Sep 29, 20261.5K downloads

    ## What's Changed * docs: changelog and blog post for v0.10.1 by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/4576 * docs: every Hindsight code example comes from a tested snippet (+4 fixes it surfaced) by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/4588 * blog: What's New in Hindsight Cloud (0.10.0), plus three stale-line fixes by @benfrank241 in https://github.com/vectorize-io/hindsight/pull/4583 * docs: show the tested snippets on the live (0.10) docs by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/4600 * fix(coding-agents): concise extraction by default, configurable and synced; cache append support (#4560) by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/4602 * fix(mental-models): refuse off-schema delta replies and ask the model again (#4443) by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/4601 * docs: remove versioned docs for 0.6 by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/4604 * bank list: page on the store's order instead of ranking the tenant by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/4605 * fix(metrics): gate the per-tenant metric

  2. v0.10.1v0.10.1Sep 21, 20262.5K downloads

    ## What's Changed * docs(skill): sync the docs skill's openapi.json to v0.10.0 by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/4362 * feat(api): attachment filenames for store-owned banks by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/4360 * fix(attachments): never reclaim attachments for a store-owned bank by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/4363 * fix(retain): guard concise prompt examples by @koriyoshi2041 in https://github.com/vectorize-io/hindsight/pull/4284 * fix(memory-defense): redact Hindsight Cloud API keys by @cdbartholomew in https://github.com/vectorize-io/hindsight/pull/4276 * fix(oauth): do not fail the store lock when the store cannot be written by @LoneExile in https://github.com/vectorize-io/hindsight/pull/4286 * blog: Onboarding an Engineer vs. Onboarding an Agent by @benfrank241 in https://github.com/vectorize-io/hindsight/pull/4100 * fix(coding-agents): take Codex user turns from UserMessage events by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/4377 * fix(reranker): release the MLX buffer cache after each jina-mlx batch by @w-seok in https://github.com/vectorize-io/hindsig

  3. v0.10.0v0.10.0Sep 14, 20261.2K downloads

    ## What's Changed * docs: changelog and blog post for v0.9.2 by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3765 * fix(retain): batch a document's chunk embeddings instead of one request per chunk by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3785 * perf(tokenizer): replace tiktoken with quicktok and default to o200k_base by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3788 * fix(benchmarks): repair retain_memory's imports of removed engine symbols by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3789 * retain: rebuild an oversized item's sub-batch from its original span by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3806 * fix(search): score pg_textsearch results per row by @mameikagou in https://github.com/vectorize-io/hindsight/pull/3802 * retain: accumulate a document's body instead of rebuilding it per sub-batch by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3809 * fix(coding-agents): don't let one stray file abort the Claude import, and give Prime Agent the companion skill (#3771, #3772) by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3812 *

  4. v0.9.2v0.9.2Aug 25, 20263.4K downloads

    ## What's Changed * Stop whole-schema claim test fixtures deleting other xdist workers' operations by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3469 * docs: changelog and blog post for v0.9.1 by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3438 * docs: rework the topbar, page chrome and skill installer by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3495 * docs: specify Claude Sonnet benchmark version by @Sanderhoff-alt in https://github.com/vectorize-io/hindsight/pull/3468 * fix(retain): enqueue relink victims before delta chunk deletion by @koriyoshi2041 in https://github.com/vectorize-io/hindsight/pull/3420 * fix(db): keep the DSN's application_name across pool reuse (blank pg_stat_activity behind pgbouncer) by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3491 * fix(retain): entity postings and witness coverage inside a write-group by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3497 * fix(recall): keep the most selective terms for native BM25 long queries by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3498 * perf(worker): one pooled connection per poll cycle, on

  5. v0.9.1v0.9.1Aug 14, 20262K downloads

    ## What's Changed * docs: 0.9.0 changelog + blog posts by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3189 * fix(coding-agents): seed the actual harness, not the "opencode" default (#3247, #3248) by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3266 * fix(docker): repair PGroonga Compose image by @JiehoonKwak in https://github.com/vectorize-io/hindsight/pull/3316 * fix(engine): stop concurrent bank deletes from deadlocking on vector-index DDL by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3245 * fix(coding-agents): fall back from filesystem-root worktrees by @koriyoshi2041 in https://github.com/vectorize-io/hindsight/pull/3286 * fix(worker): serialise graph_maintenance per bank at claim time by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3235 * fix(llm): forward extra body to Codex requests by @koriyoshi2041 in https://github.com/vectorize-io/hindsight/pull/3305 * fix(api): knowledge-base search 500s on non-native text-search backends (#3268) by @nicoloboschi in https://github.com/vectorize-io/hindsight/pull/3318 * test(ci): gate every build on hermes-agent@main co-installability by @nicoloboschi in https

Code frequency

additions and deletions
+7.8M-7.8MWeek of 2025-10-26: +125,734 linesWeek of 2025-10-26: -23,470 linesWeek of 2025-11-02: +2,186,157 linesWeek of 2025-11-02: -648,217 linesWeek of 2025-11-09: +5,517,066 linesWeek of 2025-11-09: -4,386,781 linesWeek of 2025-11-16: +2,685,488 linesWeek of 2025-11-16: -940,428 linesWeek of 2025-11-23: +7,397,711 linesWeek of 2025-11-23: -7,812,027 linesWeek of 2025-11-30: +32,936 linesWeek of 2025-11-30: -3,934,503 linesWeek of 2025-12-07: +67,089 linesWeek of 2025-12-07: -63,873 linesWeek of 2025-12-14: +27,726 linesWeek of 2025-12-14: -25,552 linesWeek of 2025-12-21: +32,846 linesWeek of 2025-12-21: -21,578 linesWeek of 2025-12-28: +7,513 linesWeek of 2025-12-28: -6,363 linesWeek of 2026-01-04: +23,328 linesWeek of 2026-01-04: -15,680 linesWeek of 2026-01-11: +26,895 linesWeek of 2026-01-11: -3,917 linesWeek of 2026-01-18: +36,201 linesWeek of 2026-01-18: -20,381 linesWeek of 2026-01-25: +57,586 linesWeek of 2026-01-25: -30,557 linesWeek of 2026-02-01: +29,312 linesWeek of 2026-02-01: -6,695 linesWeek of 2026-02-08: +39,249 linesWeek of 2026-02-08: -10,209 linesWeek of 2026-02-15: +88,360 linesWeek of 2026-02-15: -37,154 linesWeek of 2026-02-22: +23,875 linesWeek of 2026-02-22: -15,857 linesWeek of 2026-03-01: +34,745 linesWeek of 2026-03-01: -9,416 linesWeek of 2026-03-08: +110,707 linesWeek of 2026-03-08: -100,583 linesWeek of 2026-03-15: +45,084 linesWeek of 2026-03-15: -4,309 linesWeek of 2026-03-22: +27,354 linesWeek of 2026-03-22: -4,194 linesWeek of 2026-03-29: +72,984 linesWeek of 2026-03-29: -40,845 linesWeek of 2026-04-05: +40,135 linesWeek of 2026-04-05: -14,834 linesWeek of 2026-04-12: +50,754 linesWeek of 2026-04-12: -13,407 linesWeek of 2026-04-19: +19,418 linesWeek of 2026-04-19: -2,091 linesWeek of 2026-04-26: +40,284 linesWeek of 2026-04-26: -7,118 linesWeek of 2026-05-03: +35,678 linesWeek of 2026-05-03: -9,542 linesWeek of 2026-05-10: +18,968 linesWeek of 2026-05-10: -17,047 linesWeek of 2026-05-17: +2,146 linesWeek of 2026-05-17: -223 linesWeek of 2026-05-24: +65,896 linesWeek of 2026-05-24: -12,478 linesWeek of 2026-05-31: +65,373 linesWeek of 2026-05-31: -9,699 linesWeek of 2026-06-07: +81,879 linesWeek of 2026-06-07: -40,902 linesWeek of 2026-06-14: +60,844 linesWeek of 2026-06-14: -21,645 linesWeek of 2026-06-21: +53,914 linesWeek of 2026-06-21: -5,672 linesWeek of 2026-06-28: +8,422 linesWeek of 2026-06-28: -36,113 linesWeek of 2026-07-05: +20,344 linesWeek of 2026-07-05: -1,400 linesWeek of 2026-07-12: +20,219 linesWeek of 2026-07-12: -4,959 linesWeek of 2026-07-19: +34,083 linesWeek of 2026-07-19: -16,806 linesWeek of 2026-07-26: +65,199 linesWeek of 2026-07-26: -11,167 linesWeek of 2026-08-02: +56,633 linesWeek of 2026-08-02: -5,853 linesWeek of 2026-08-09: +57,637 linesWeek of 2026-08-09: -5,010 linesWeek of 2026-08-16: +48,167 linesWeek of 2026-08-16: -11,170 linesWeek of 2026-08-23: +15,728 linesWeek of 2026-08-23: -2,762 linesWeek of 2026-08-30: +71,915 linesWeek of 2026-08-30: -16,989 linesWeek of 2026-09-06: +64,806 linesWeek of 2026-09-06: -16,730 linesWeek of 2026-09-13: +62,064 linesWeek of 2026-09-13: -77,408 linesWeek of 2026-09-20: +69,159 linesWeek of 2026-09-20: -28,398 linesWeek of 2026-09-27: +43,538 linesWeek of 2026-09-27: -15,894 linesWeek of 2026-10-04: +0 linesWeek of 2026-10-04: -0 linesOct 26, 2025Oct 4, 2026
+19.9M lines added, -18.6M removed over the last year.

Commits per week

last 52 weeks
1660Week of 2025-10-12: 0 commitsWeek of 2025-10-19: 0 commitsWeek of 2025-10-26: 6 commitsWeek of 2025-11-02: 17 commitsWeek of 2025-11-09: 23 commitsWeek of 2025-11-16: 10 commitsWeek of 2025-11-23: 11 commitsWeek of 2025-11-30: 53 commitsWeek of 2025-12-07: 45 commitsWeek of 2025-12-14: 40 commitsWeek of 2025-12-21: 21 commitsWeek of 2025-12-28: 7 commitsWeek of 2026-01-04: 42 commitsWeek of 2026-01-11: 16 commitsWeek of 2026-01-18: 17 commitsWeek of 2026-01-25: 78 commitsWeek of 2026-02-01: 40 commitsWeek of 2026-02-08: 40 commitsWeek of 2026-02-15: 41 commitsWeek of 2026-02-22: 28 commitsWeek of 2026-03-01: 57 commitsWeek of 2026-03-08: 48 commitsWeek of 2026-03-15: 53 commitsWeek of 2026-03-22: 78 commitsWeek of 2026-03-29: 93 commitsWeek of 2026-04-05: 59 commitsWeek of 2026-04-12: 129 commitsWeek of 2026-04-19: 71 commitsWeek of 2026-04-26: 95 commitsWeek of 2026-05-03: 122 commitsWeek of 2026-05-10: 35 commitsWeek of 2026-05-17: 29 commitsWeek of 2026-05-24: 123 commitsWeek of 2026-05-31: 116 commitsWeek of 2026-06-07: 135 commitsWeek of 2026-06-14: 97 commitsWeek of 2026-06-21: 68 commitsWeek of 2026-06-28: 62 commitsWeek of 2026-07-05: 50 commitsWeek of 2026-07-12: 50 commitsWeek of 2026-07-19: 116 commitsWeek of 2026-07-26: 72 commitsWeek of 2026-08-02: 91 commitsWeek of 2026-08-09: 138 commitsWeek of 2026-08-16: 101 commitsWeek of 2026-08-23: 54 commitsWeek of 2026-08-30: 166 commitsWeek of 2026-09-06: 120 commitsWeek of 2026-09-13: 128 commitsWeek of 2026-09-20: 141 commitsWeek of 2026-09-27: 137 commitsWeek of 2026-10-04: 0 commitsOct 12, 2025Oct 4, 2026
3.4K commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 0 commitsSun 1:00 — 0 commitsSun 2:00 — 0 commitsSun 3:00 — 5 commitsSun 4:00 — 0 commitsSun 5:00 — 0 commitsSun 6:00 — 0 commitsSun 7:00 — 1 commitsSun 8:00 — 0 commitsSun 9:00 — 1 commitsSun 10:00 — 2 commitsSun 11:00 — 0 commitsSun 12:00 — 0 commitsSun 13:00 — 0 commitsSun 14:00 — 0 commitsSun 15:00 — 0 commitsSun 16:00 — 1 commitsSun 17:00 — 1 commitsSun 18:00 — 1 commitsSun 19:00 — 0 commitsSun 20:00 — 0 commitsSun 21:00 — 0 commitsSun 22:00 — 0 commitsSun 23:00 — 0 commitsMon 0:00 — 1 commitsMon 1:00 — 3 commitsMon 2:00 — 6 commitsMon 3:00 — 8 commitsMon 4:00 — 15 commitsMon 5:00 — 9 commitsMon 6:00 — 12 commitsMon 7:00 — 2 commitsMon 8:00 — 7 commitsMon 9:00 — 30 commitsMon 10:00 — 66 commitsMon 11:00 — 80 commitsMon 12:00 — 71 commitsMon 13:00 — 49 commitsMon 14:00 — 77 commitsMon 15:00 — 84 commitsMon 16:00 — 77 commitsMon 17:00 — 73 commitsMon 18:00 — 55 commitsMon 19:00 — 12 commitsMon 20:00 — 16 commitsMon 21:00 — 13 commitsMon 22:00 — 11 commitsMon 23:00 — 5 commitsTue 0:00 — 2 commitsTue 1:00 — 4 commitsTue 2:00 — 6 commitsTue 3:00 — 11 commitsTue 4:00 — 10 commitsTue 5:00 — 7 commitsTue 6:00 — 3 commitsTue 7:00 — 8 commitsTue 8:00 — 8 commitsTue 9:00 — 32 commitsTue 10:00 — 68 commitsTue 11:00 — 70 commitsTue 12:00 — 42 commitsTue 13:00 — 55 commitsTue 14:00 — 66 commitsTue 15:00 — 60 commitsTue 16:00 — 79 commitsTue 17:00 — 50 commitsTue 18:00 — 43 commitsTue 19:00 — 15 commitsTue 20:00 — 13 commitsTue 21:00 — 8 commitsTue 22:00 — 11 commitsTue 23:00 — 5 commitsWed 0:00 — 4 commitsWed 1:00 — 7 commitsWed 2:00 — 8 commitsWed 3:00 — 17 commitsWed 4:00 — 11 commitsWed 5:00 — 6 commitsWed 6:00 — 5 commitsWed 7:00 — 15 commitsWed 8:00 — 12 commitsWed 9:00 — 23 commitsWed 10:00 — 72 commitsWed 11:00 — 84 commitsWed 12:00 — 33 commitsWed 13:00 — 37 commitsWed 14:00 — 71 commitsWed 15:00 — 63 commitsWed 16:00 — 72 commitsWed 17:00 — 59 commitsWed 18:00 — 29 commitsWed 19:00 — 10 commitsWed 20:00 — 10 commitsWed 21:00 — 17 commitsWed 22:00 — 11 commitsWed 23:00 — 7 commitsThu 0:00 — 1 commitsThu 1:00 — 2 commitsThu 2:00 — 6 commitsThu 3:00 — 5 commitsThu 4:00 — 7 commitsThu 5:00 — 7 commitsThu 6:00 — 3 commitsThu 7:00 — 1 commitsThu 8:00 — 7 commitsThu 9:00 — 15 commitsThu 10:00 — 43 commitsThu 11:00 — 51 commitsThu 12:00 — 53 commitsThu 13:00 — 53 commitsThu 14:00 — 69 commitsThu 15:00 — 32 commitsThu 16:00 — 50 commitsThu 17:00 — 59 commitsThu 18:00 — 41 commitsThu 19:00 — 12 commitsThu 20:00 — 12 commitsThu 21:00 — 9 commitsThu 22:00 — 8 commitsThu 23:00 — 6 commitsFri 0:00 — 3 commitsFri 1:00 — 10 commitsFri 2:00 — 5 commitsFri 3:00 — 10 commitsFri 4:00 — 2 commitsFri 5:00 — 8 commitsFri 6:00 — 3 commitsFri 7:00 — 5 commitsFri 8:00 — 13 commitsFri 9:00 — 39 commitsFri 10:00 — 92 commitsFri 11:00 — 60 commitsFri 12:00 — 29 commitsFri 13:00 — 52 commitsFri 14:00 — 47 commitsFri 15:00 — 52 commitsFri 16:00 — 58 commitsFri 17:00 — 36 commitsFri 18:00 — 39 commitsFri 19:00 — 10 commitsFri 20:00 — 11 commitsFri 21:00 — 7 commitsFri 22:00 — 15 commitsFri 23:00 — 5 commitsSat 0:00 — 2 commitsSat 1:00 — 2 commitsSat 2:00 — 2 commitsSat 3:00 — 7 commitsSat 4:00 — 2 commitsSat 5:00 — 1 commitsSat 6:00 — 0 commitsSat 7:00 — 0 commitsSat 8:00 — 0 commitsSat 9:00 — 6 commitsSat 10:00 — 19 commitsSat 11:00 — 4 commitsSat 12:00 — 2 commitsSat 13:00 — 0 commitsSat 14:00 — 1 commitsSat 15:00 — 1 commitsSat 16:00 — 0 commitsSat 17:00 — 4 commitsSat 18:00 — 7 commitsSat 19:00 — 0 commitsSat 20:00 — 2 commitsSat 21:00 — 0 commitsSat 22:00 — 0 commitsSat 23:00 — 1 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.
DateListRankStars gained
Oct 4, 2026weekly#2+14,507
Oct 3, 2026weekly#2+16,183
Oct 2, 2026weekly#2+17,403
Oct 1, 2026weekly#2+18,389
Sep 30, 2026daily#3+2,541
Sep 30, 2026weekly#2+17,365
Sep 29, 2026daily#3+2,541
Sep 28, 2026daily#3+4,413
Sep 27, 2026daily#2+4,463
Sep 26, 2026daily#2+1,653
Sep 25, 2026daily#3+1,668
Sep 24, 2026daily#1+1,607