vectorize-io/hindsight
Hindsight: Agent Memory That Learns
What it solves
Hindsight is an agent memory system designed to move beyond simple conversation history or basic RAG. It enables AI agents to learn and evolve over time by organizing information as world facts, personal experiences, and mental models, rather than just recalling raw text snippets.
How it works
Hindsight uses biomimetic data structures to categorize memories into three pathways: World (general facts), Experiences (agent-specific events), and Mental Models (insights derived from reflection). It provides three primary operations:
- Retain: Uses an LLM to extract entities, relationships, and temporal data from input, normalizing them into search indexes and time series.
- Recall: Employs four parallel retrieval strategies—semantic (vector), keyword (BM25), graph (causal/temporal links), and temporal (time range)—merging results via reciprocal rank fusion and cross-encoder reranking.
- Reflect: Analyzes existing memories to generate new observations, insights, and deeper connections between disparate pieces of information.
Who it’s for
It is built for developers of conversational AI agents and autonomous agents, particularly those creating "AI employees" that must handle open-ended tasks, adapt behavior based on user feedback, and automate complex workflows.
Highlights
- State-of-the-art performance: Achieves high accuracy on the LongMemEval benchmark.
- Flexible Integration: Offers an LLM wrapper for 2-line integration, a dedicated API/SDK (Python/Node.js), and an embedded mode for no-server deployments.
- Multi-provider support: Compatible with OpenAI, Anthropic, Gemini, Groq, Ollama, LM Studio, and others.
- Hybrid Retrieval: Combines vector, keyword, graph, and temporal search for higher precision.