{"id":35650844,"url":"https://github.com/vectorize-io/hindsight","last_synced_at":"2026-02-18T15:02:37.329Z","repository":{"id":328162180,"uuid":"1086419061","full_name":"vectorize-io/hindsight","owner":"vectorize-io","description":"Hindsight: Agent Memory That Works Like Human Memory","archived":false,"fork":false,"pushed_at":"2026-01-23T15:00:43.000Z","size":277564,"stargazers_count":1161,"open_issues_count":10,"forks_count":135,"subscribers_count":16,"default_branch":"main","last_synced_at":"2026-01-24T01:58:46.028Z","etag":null,"topics":["agentic-ai","agents","memory"],"latest_commit_sha":null,"homepage":"https://hindsight.vectorize.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vectorize-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-10-30T11:49:48.000Z","updated_at":"2026-01-23T23:51:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vectorize-io/hindsight","commit_stats":null,"previous_names":["vectorize-io/hindsight"],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/vectorize-io/hindsight","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorize-io%2Fhindsight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorize-io%2Fhindsight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorize-io%2Fhindsight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorize-io%2Fhindsight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vectorize-io","download_url":"https://codeload.github.com/vectorize-io/hindsight/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vectorize-io%2Fhindsight/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28877887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","agents","memory"],"created_at":"2026-01-05T14:07:20.109Z","updated_at":"2026-02-18T15:02:37.322Z","avatar_url":"https://github.com/vectorize-io.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n\n![Hindsight Banner](./hindsight-docs/static/img/hindsight-github-banner.png)\n\n[Documentation](https://hindsight.vectorize.io) • [Paper](https://arxiv.org/abs/2512.12818) • [Cookbook](https://hindsight.vectorize.io/cookbook) • [Hindsight Cloud](https://ui.hindsight.vectorize.io/signup)\n\n[![CI](https://github.com/vectorize-io/hindsight/actions/workflows/release.yml/badge.svg)](https://github.com/vectorize-io/hindsight/actions/workflows/release.yml)\n[![Slack Community](https://img.shields.io/badge/Slack-Join%20Community-4A154B?logo=slack)](https://join.slack.com/t/hindsight-space/shared_invite/zt-3nhbm4w29-LeSJ5Ixi6j8PdiYOCPlOgg)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/hindsight-api?label=PyPI)\n![NPM Downloads](https://img.shields.io/npm/dm/%40vectorize-io%2Fhindsight-client?logoColor=orange\u0026label=NPM\u0026color=blue\u0026link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2F%40vectorize-io%2Fhindsight-client)\n\n\n\u003c/div\u003e\n\n---\n\n## What is Hindsight?\n\nHindsight™ 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.\n\n\n\u003cvideo src=\"https://github.com/user-attachments/assets/923b798d-3581-4897-bb62-9cfa5a931682\" controls\u003e\u003c/video\u003e\n\nIt eliminates the shortcomings of alternative techniques such as RAG and knowledge graph and delivers state-of-the-art performance on long term memory tasks.\n\n## Memory Performance \u0026 Accuracy\n\nHindsight 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:\n\n![Overview](./hindsight-docs/static/img/hindsight-bench.jpg)\n\nThe benchmark performance data for Hindsight has been independently reproduced by research collaborators at the Virginia Tech [Sanghani Center for Artificial Intelligence and Data Analytics](https://sanghani.cs.vt.edu/) and The Washington Post. Other scores are self-reported by software vendors.\n\nHindsight is being used in production at Fortune 500 enterprises and by a growing number of AI startups. \n\n## Adding Hindsight to Your AI Agents\n\nThe easiest way use Hindsight with an existing agent is with the LLM Wrapper. You can add memory to your agent with 2 lines of code. That will swap your current LLM client out with the Hindsight wrapper. After that, memories will be stored and retrieved automatically as you make LLM calls.\n\nIf you need more control over how and when your agent stores and recalls memories, there's also a simple API you can integrate with using the SDKs or directly via HTTP.\n\n![Hindsight Banner](./hindsight-docs/static/img/migration-code.png)\n\n---\n\n\u003e 🤖 **Using a coding agent?** Install the Hindsight documentation skill for instant access to docs while you code:\n\u003e ```bash\n\u003e npx skills add https://github.com/vectorize-io/hindsight --skill hindsight-docs\n\u003e ```\n\u003e Works with Claude Code, Cursor, and other AI coding assistants.\n\n---\n\n\n## Quick Start\n\n### Docker (recommended)\n\n```bash\nexport OPENAI_API_KEY=sk-xxx\n\ndocker run --rm -it --pull always -p 8888:8888 -p 9999:9999 \\\n  -e HINDSIGHT_API_LLM_API_KEY=$OPENAI_API_KEY \\\n  -v $HOME/.hindsight-docker:/home/hindsight/.pg0 \\\n  ghcr.io/vectorize-io/hindsight:latest\n```\n\n\u003eAPI: http://localhost:8888\n\u003eUI: http://localhost:9999\n\nYou can modify the LLM provider by setting `HINDSIGHT_API_LLM_PROVIDER`. Valid options are `openai`, `anthropic`, `gemini`, `groq`, `ollama`, and `lmstudio`. The documentation provides more details on [supported models](https://hindsight.vectorize.io/developer/models).\n\n\n\n### Docker (external PostgreSQL)\n\n```bash\nexport OPENAI_API_KEY=sk-xxx\nexport HINDSIGHT_DB_PASSWORD=choose-a-password\ncd docker/docker-compose\ndocker compose up \n```\n\n\n\u003eAPI: http://localhost:8888\n\u003eUI: http://localhost:9999\n\n### Client\n\n```bash\npip install hindsight-client -U\n# or\nnpm install @vectorize-io/hindsight-client\n```\n\n#### Python\n\n```python\nfrom hindsight_client import Hindsight\n\nclient = Hindsight(base_url=\"http://localhost:8888\")\n\n# Retain: Store information\nclient.retain(bank_id=\"my-bank\", content=\"Alice works at Google as a software engineer\")\n\n# Recall: Search memories\nclient.recall(bank_id=\"my-bank\", query=\"What does Alice do?\")\n\n# Reflect: Generate disposition-aware response\nclient.reflect(bank_id=\"my-bank\", query=\"Tell me about Alice\")\n```\n\n#### Node.js / TypeScript\n\n```bash\nnpm install @vectorize-io/hindsight-client\n```\n\n```javascript\nconst { HindsightClient } = require('@vectorize-io/hindsight-client');\n\nconst main = async () =\u003e {\n  const client = new HindsightClient({ baseUrl: 'http://localhost:8888' });\n\n  await client.retain('my-bank', 'Alice loves hiking in Yosemite');\n\n  const results = await client.recall('my-bank', 'What does Alice like?');\n  console.log(results);\n}\n\nmain();\n```\n\n\n### Python Embedded (no server required)\n\n```bash\npip install hindsight-all -U\n```\n\n```python\nimport os\nfrom hindsight import HindsightServer, HindsightClient\n\nwith HindsightServer(\n    llm_provider=\"openai\",\n    llm_model=\"gpt-5-mini\", \n    llm_api_key=os.environ[\"OPENAI_API_KEY\"]\n) as server:\n    client = HindsightClient(base_url=server.url)\n    client.retain(bank_id=\"my-bank\", content=\"Alice works at Google\")\n    results = client.recall(bank_id=\"my-bank\", query=\"Where does Alice work?\")\n```\n\n\n---\n\n## Use Cases\n\n\nHindsight 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.\n\n### Per-User Memories and Chat History\n\nOne 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.\n\nThe requirements for this use case usually look something like this:\n\n![Per-User Memories](./hindsight-docs/static/img/per-user-memory-requirements.png)\n\n\u003cvideo src=\"https://github.com/user-attachments/assets/4805e8e1-e7d1-47c6-a4f8-2344a5ec8906\" controls\u003e\u003c/video\u003e\n\nSatisfying 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. \n\n![Per-User Memories](./hindsight-docs/static/img/per-user-memory-howto.png)\n\n---\n\n## Architecture \u0026 Operations\n\n![Overview](./hindsight-docs/static/img/hindsight-overview.webp)\n\nMost agent memory implementation 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:\n\n- **World:** Facts about the world (\"The stove gets hot\")\n- **Experiences:** Agent's own experiences (\"I touched the stove and it really hurt\")\n- **Mental Models:** Learned understanding of the agent's world formed by reflecting on raw memories and experiences.\n\nMemories in Hindsight are stored in banks (i.e. memory banks). When memories are added to Hindsight, they are pushed into either the world facts or experiences memory pathway. They are then represented as a combination of entities, relationships, and time series with sparse/dense vector representations to aid in later recall.\n\nHindsight provides three simple methods to interact with the system:\n\n- **Retain:** Provide information to Hindsight that you want it to remember\n- **Recall:** Retrieve memories from Hindsight\n- **Reflect:** Reflect on memories and experiences to generate new observations and insights from existing memories.\n\n### Retain\n\nThe `retain` operation is used to push new memories into Hindsight. It tells Hindsight to _retain_ the information you pass in as an input.\n\n```python\nfrom hindsight_client import Hindsight\n\nclient = Hindsight(base_url=\"http://localhost:8888\")\n\n# Simple\nclient.retain(\n    bank_id=\"my-bank\",\n    content=\"Alice works at Google as a software engineer\"\n)\n\n# With context and timestamp\nclient.retain(\n    bank_id=\"my-bank\",\n    content=\"Alice got promoted to senior engineer\",\n    context=\"career update\",\n    timestamp=\"2025-06-15T10:00:00Z\"\n)\n```\n\nBehind the scenes, the retain operation 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. \n\n![Retain Operation](hindsight-docs/static/img/retain-operation.webp)\n\n### Recall\n\nThe recall operation is used to retrieve memories. These memories can come from any of the memory types (world, experiences, etc.)\n\n```python\nfrom hindsight_client import Hindsight\n\nclient = Hindsight(base_url=\"http://localhost:8888\")\n\n# Simple\nclient.recall(bank_id=\"my-bank\", query=\"What does Alice do?\")\n\n# Temporal\nclient.recall(bank_id=\"my-bank\", query=\"What happened in June?\")\n```\n\nRecall performs 4 retrieval strategies in parallel:\n- Semantic: Vector similarity\n- Keyword: BM25 exact matching\n- Graph: Entity/temporal/causal links\n- Temporal: Time range filtering\n\n![Retain Operation](hindsight-docs/static/img/recall-operation.webp)\n\nThe individual results from the retrievals are merged, then ordered by relevance using reciprocal rank fusion and a cross-encoder reranking model.\n\nThe final output is trimmed as needed to fit within the token limit.\n\n### Reflect\n\nThe reflect operation is used to perform 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.\n\nFor example, the `reflect` operation can be used to support use cases such as:\n\n- An **AI Project Manager** reflecting on what risks need to be mitigated on a project.\n- A **Sales Agent** reflecting on why certain outreach messages have gotten responses while others haven't.\n- A **Support Agent** reflecting on opportunities where customers have questions not answered by current product documentation.\n\nThe `reflect` operation can also be used to handle on-demand question answering or analysis which require more deep thinking.\n\n```python\nfrom hindsight_client import Hindsight\n\nclient = Hindsight(base_url=\"http://localhost:8888\")\n\nclient.reflect(bank_id=\"my-bank\", query=\"What should I know about Alice?\")\n```\n\n![Retain Operation](hindsight-docs/static/img/reflect-operation.webp)\n\n---\n\n## Resources\n\n**Documentation:** \n- [https://hindsight.vectorize.io](https://hindsight.vectorize.io)\n\n**Clients:**\n- [Python](http://hindsight.vectorize.io/sdks/python)\n- [Node.js](http://hindsight.vectorize.io/sdks/nodejs)\n- [REST API](https://hindsight.vectorize.io/api-reference)\n- [CLI](https://hindsight.vectorize.io/sdks/cli)\n\n**Community:**\n- [Slack](https://join.slack.com/t/hindsight-space/shared_invite/zt-3nhbm4w29-LeSJ5Ixi6j8PdiYOCPlOgg)\n- [GitHub Issues](https://github.com/vectorize-io/hindsight/issues)\n\n---\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=vectorize-io/hindsight\u0026type=date\u0026legend=top-left)](https://www.star-history.com/#vectorize-io/hindsight\u0026type=date\u0026legend=top-left)\n---\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n## License\n\nMIT — see [LICENSE](./LICENSE)\n\n---\n\nBuilt by [Vectorize.io](https://vectorize.io)\n","funding_links":[],"categories":["AI Memory \u0026 RAG","Python","AI Agent Frameworks \u0026 SDKs","Agent Infrastructure","MCP Servers","Runtime","Ecosystem"],"sub_categories":["Memory","Cognitive Architecture Frameworks","Memory \u0026 State","Knowledge \u0026 Memory","Database","Quick Setup with cc-safe-setup"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorize-io%2Fhindsight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvectorize-io%2Fhindsight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvectorize-io%2Fhindsight/lists"}