{"_id":"@vectorize-io/hindsight-eve","_rev":"3-51bc0bfe5c2f0663800bfb2ff1fb0409","name":"@vectorize-io/hindsight-eve","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@vectorize-io/hindsight-eve","version":"0.1.0","keywords":["eve","vercel","agents","mcp","memory","hindsight","llm","long-term-memory"],"author":{"name":"Vectorize","email":"support@vectorize.io"},"license":"MIT","_id":"@vectorize-io/hindsight-eve@0.1.0","maintainers":[{"name":"nicoloboschi","email":"boschi1997@gmail.com"},{"name":"dk09876","email":"Dikshant.pradhan@vectorize.io"},{"name":"benfrank241","email":"benbart02@gmail.com"}],"homepage":"https://github.com/vectorize-io/hindsight#readme","bugs":{"url":"https://github.com/vectorize-io/hindsight/issues"},"dist":{"shasum":"28967fbb5fedd6a5750a776fb07924921cecfc32","tarball":"https://registry.npmjs.org/@vectorize-io/hindsight-eve/-/hindsight-eve-0.1.0.tgz","fileCount":5,"integrity":"sha512-Hy7T/MmB/aTdtT71Gq3WgiYMGIIHgQDLPfdWDFQBtsPVLJzMFnfgbko9aS1QEMAaXROMzoFPTOmb1f1v7kP3qg==","signatures":[{"sig":"MEYCIQDev/r02K15LeRMi0zyIQyBe/hGW5cAatu6gOxfZF+9XAIhAJv9OYg2gJ3UMCnpRbYZPta9QtzfRp/gWVV8DSrmlIRA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@vectorize-io%2fhindsight-eve@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17715},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"9dafadc7eb562dc1edce1fa1ec25f69ea83ff65d","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsup","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"nicoloboschi","email":"boschi1997@gmail.com"},"overrides":{"vite":">=8.0.5","rollup":"^4.59.0","picomatch":">=2.3.2 <3.0.0 || >=4.0.4"},"repository":{"url":"git+https://github.com/vectorize-io/hindsight.git","type":"git","directory":"hindsight-integrations/eve"},"_npmVersion":"10.9.8","description":"Hindsight long-term memory for Vercel Eve agents - a one-line MCP connection exposing retain, recall, and reflect","directories":{},"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"devDependencies":{"eve":"0.11.4","tsup":"^8.5.1","vitest":"^4.1.2","typescript":"^5.7.0","@types/node":"^22.0.0"},"peerDependencies":{"eve":">=0.11.0"},"_npmOperationalInternal":{"tmp":"tmp/hindsight-eve_0.1.0_1782327158384_0.5127289909569905","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@vectorize-io/hindsight-eve","version":"0.2.0","keywords":["eve","vercel","agents","hooks","memory","hindsight","llm","long-term-memory"],"author":{"name":"Vectorize","email":"support@vectorize.io"},"license":"MIT","_id":"@vectorize-io/hindsight-eve@0.2.0","maintainers":[{"name":"nicoloboschi","email":"boschi1997@gmail.com"},{"name":"dk09876","email":"Dikshant.pradhan@vectorize.io"},{"name":"benfrank241","email":"benbart02@gmail.com"}],"homepage":"https://github.com/vectorize-io/hindsight#readme","bugs":{"url":"https://github.com/vectorize-io/hindsight/issues"},"dist":{"shasum":"9a57b9d7cdb0b7bcae1f5e8f570c6d4a808c263f","tarball":"https://registry.npmjs.org/@vectorize-io/hindsight-eve/-/hindsight-eve-0.2.0.tgz","fileCount":5,"integrity":"sha512-7EoVoLnSTdh2wD8Lv6f0PUdFfHXxn7tLRqxfy3cTUS89kyJUfJj21QGyVQZI5TUKBwI7pS+3/anfzE+XssHGmg==","signatures":[{"sig":"MEYCIQD7SsAERo0hDDksucEL+1o6SsnVDBiMSgYx9xf+ZxDRYQIhAPHcR4BWb+9SPjRg1y4UFQlUJOGhMy0nkm0n0kv/tpqj","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@vectorize-io%2fhindsight-eve@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":41839},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=24"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"016b5f03639eb44f9f54ce1fd624d0f4792aac46","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsup","clean":"rm -rf dist","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"nicoloboschi","email":"boschi1997@gmail.com"},"overrides":{"vite":">=8.0.5","rollup":"^4.59.0","picomatch":">=2.3.2 <3.0.0 || >=4.0.4"},"repository":{"url":"git+https://github.com/vectorize-io/hindsight.git","type":"git","directory":"hindsight-integrations/eve"},"_npmVersion":"10.9.8","description":"Automatic long-term memory for Vercel Eve agents — Hindsight memory injected before each turn and retained after, with no model tool-calling","directories":{},"_nodeVersion":"22.23.1","_hasShrinkwrap":false,"devDependencies":{"eve":"0.11.4","tsup":"^8.5.1","vitest":"^4.1.2","typescript":"^5.7.0","@types/node":"^22.0.0"},"peerDependencies":{"eve":">=0.11.0"},"_npmOperationalInternal":{"tmp":"tmp/hindsight-eve_0.2.0_1783091285147_0.5544651278628487","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@vectorize-io/hindsight-eve","version":"0.2.1","description":"Automatic long-term memory for Vercel Eve agents — Hindsight memory injected before each turn and retained after, with no model tool-calling","main":"dist/index.js","types":"dist/index.d.ts","type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"keywords":["eve","vercel","agents","hooks","memory","hindsight","llm","long-term-memory"],"author":{"name":"Vectorize","email":"support@vectorize.io"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/vectorize-io/hindsight.git","directory":"hindsight-integrations/eve"},"scripts":{"build":"tsup","dev":"tsc --watch","clean":"rm -rf dist","test":"vitest run","test:watch":"vitest","prepublishOnly":"npm run clean && npm run build"},"peerDependencies":{"eve":">=0.11.0"},"devDependencies":{"@types/node":"^22.0.0","eve":"0.11.4","tsup":"^8.5.1","typescript":"^5.7.0","vitest":"^4.1.2"},"engines":{"node":">=24"},"overrides":{"rollup":"^4.59.0","picomatch":">=2.3.2 <3.0.0 || >=4.0.4","vite":">=8.0.5"},"_id":"@vectorize-io/hindsight-eve@0.2.1","gitHead":"e97b6155473631b35804fcb8fb65bb09cb862e5d","bugs":{"url":"https://github.com/vectorize-io/hindsight/issues"},"homepage":"https://github.com/vectorize-io/hindsight#readme","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-dFrCRgX/fXNV7bCCXfifmKTEQnj4insbxOQ79GU9mHMwZ9XfjQ1Oq8679C9xHwpItCtx6cDPqWZkluq8iY+qNg==","shasum":"1cd19aebd0f8c5e27eaa02c3477034b51ae44ea0","tarball":"https://registry.npmjs.org/@vectorize-io/hindsight-eve/-/hindsight-eve-0.2.1.tgz","fileCount":5,"unpackedSize":42106,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@vectorize-io%2fhindsight-eve@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC5koRfnA8+xLTrO4NdbQ8DzZDU5z6pWSTRP4t5H5Qq3AIgU9ehFyyM9c7+yt9vcr7aQNl9xeSnBPVsZm23OnNAftU="}]},"_npmUser":{"name":"nicoloboschi","email":"boschi1997@gmail.com"},"directories":{},"maintainers":[{"name":"nicoloboschi","email":"boschi1997@gmail.com"},{"name":"dk09876","email":"Dikshant.pradhan@vectorize.io"},{"name":"benfrank241","email":"benbart02@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hindsight-eve_0.2.1_1783361387624_0.40596830182921106"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-24T18:52:38.211Z","modified":"2026-07-06T18:09:48.047Z","0.1.0":"2026-06-24T18:52:38.526Z","0.2.0":"2026-07-03T15:08:05.278Z","0.2.1":"2026-07-06T18:09:47.746Z"},"bugs":{"url":"https://github.com/vectorize-io/hindsight/issues"},"author":{"name":"Vectorize","email":"support@vectorize.io"},"license":"MIT","homepage":"https://github.com/vectorize-io/hindsight#readme","keywords":["eve","vercel","agents","hooks","memory","hindsight","llm","long-term-memory"],"repository":{"type":"git","url":"git+https://github.com/vectorize-io/hindsight.git","directory":"hindsight-integrations/eve"},"description":"Automatic long-term memory for Vercel Eve agents — Hindsight memory injected before each turn and retained after, with no model tool-calling","maintainers":[{"name":"nicoloboschi","email":"boschi1997@gmail.com"},{"name":"dk09876","email":"Dikshant.pradhan@vectorize.io"},{"name":"benfrank241","email":"benbart02@gmail.com"}],"readme":"# Hindsight for Eve\n\nAutomatic long-term memory for [Vercel Eve](https://github.com/vercel/eve) agents, powered by\n[Hindsight](https://vectorize.io/hindsight). Two files give your agent memory that **just\nworks** — relevant memory is injected before every turn, and each exchange is saved after —\n**without the model ever choosing to call a tool.**\n\n## How it works\n\nEve is filesystem-first. This package wires two authored files that call Hindsight's REST API\ndirectly, so memory never depends on the LLM deciding to call a tool:\n\n- **`agent/instructions/hindsight.ts`** — a dynamic instructions resolver that, before each\n  turn, recalls the user's stored memory from Hindsight and injects it as a system message.\n- **`agent/hooks/hindsight.ts`** — a hook that, after each turn, retains the user message and\n  the assistant's answer to Hindsight.\n\n## Install\n\n```bash\nnpm install @vectorize-io/hindsight-eve\n```\n\n`eve` is a peer dependency — you already have it in an Eve project.\n\n## Quick start\n\nCreate two files:\n\n```ts\n// agent/instructions/hindsight.ts\nimport { hindsightMemory } from \"@vectorize-io/hindsight-eve\";\n\nexport default hindsightMemory();\n```\n\n```ts\n// agent/hooks/hindsight.ts\nimport { hindsightRetainHook } from \"@vectorize-io/hindsight-eve\";\n\nexport default hindsightRetainHook();\n```\n\nThat's it. Both read their config from the environment:\n\n| Env var             | Purpose                                                       |\n| ------------------- | ------------------------------------------------------------- |\n| `HINDSIGHT_API_KEY` | Bearer token sent as `Authorization: Bearer <key>`            |\n| `HINDSIGHT_API_URL` | Hindsight REST base (defaults to Hindsight Cloud)             |\n| `HINDSIGHT_BANK_ID` | Bank to scope memory to (defaults to `default`; auto-created) |\n\n### Hindsight Cloud\n\nSet `HINDSIGHT_API_KEY` to a key from your [Hindsight Cloud](https://hindsight.vectorize.io)\ndashboard. `HINDSIGHT_API_URL` defaults to `https://api.hindsight.vectorize.io`, so no URL is\nneeded.\n\n### Self-hosted\n\n```bash\nexport HINDSIGHT_API_URL=\"http://localhost:8000\"\nexport HINDSIGHT_BANK_ID=\"my-project\"\nexport HINDSIGHT_API_KEY=\"…\"   # or pass apiKey: null below for a no-auth server\n```\n\n```ts\nimport { hindsightMemory } from \"@vectorize-io/hindsight-eve\";\n\nexport default hindsightMemory({ apiUrl: \"http://localhost:8000\", apiKey: null });\n```\n\n## Options\n\nBoth factories accept the same options (each falls back to its env var):\n\n```ts\nhindsightMemory({\n  apiUrl, // string  — REST base; defaults to HINDSIGHT_API_URL, then Cloud\n  apiKey, // string | null — bearer token; null = no auth (local dev)\n  bankId, // string  — bank to scope memory to\n  recallQuery, // string  — the broad query used for recall (see below)\n  budget, // \"low\" | \"mid\" | \"high\" — recall result budget (default \"mid\")\n  maxTokens, // number  — recall token budget (default 1024)\n  context, // string  — `context` tag written on retained items (default \"eve\")\n  includeAssistantReply, // boolean — also retain the assistant's reply (default true)\n  timeoutMs, // number  — HTTP timeout (default 15000)\n  onError, // (err, phase) => void — failures degrade silently via this (default console.warn)\n});\n```\n\n## Recall is profile-based, not per-message\n\nEve's instruction resolver runs at the start of a turn and **cannot see the live user\nmessage**, so recall uses a fixed broad query (default:\n`\"user preferences, identity, and working context\"`) to surface the user's ambient\nprofile/context each turn. This is ideal for \"the agent knows you\" — preferences, identity,\nongoing context — and is deterministic. Tune it with `recallQuery`. (Per-message, query-\nspecific retrieval inherently needs a tool the model calls; that's out of scope here.)\n\n## Notes\n\n- Memory is scoped to a **bank** (one isolated store, e.g. per user). Point both files at the\n  same `HINDSIGHT_BANK_ID`.\n- By default **both** the user's message and the assistant's reply are retained — the\n  reply is usually where the answer lives. Set `includeAssistantReply: false` to store\n  only the user's message.\n- Retains run asynchronously and never block a turn; failures degrade via `onError`.\n- The recall block injected into context is fenced with a sentinel so recalled facts are never\n  re-retained.\n\n## Verify\n\nRun your agent. Tell it a durable preference in one chat (\"whenever you write me code, use\nPython with full type hints and no comments\"). Start a **fresh** chat and ask for something —\nthe agent applies the remembered preference, because the memory was injected before the model\nran, with no tool call.\n\n## Links\n\n- [Hindsight docs](https://hindsight.vectorize.io)\n- [Eve hooks](https://github.com/vercel/eve/blob/main/docs/guides/hooks.md) ·\n  [Eve dynamic capabilities](https://github.com/vercel/eve/blob/main/docs/guides/dynamic-capabilities.md)\n","readmeFilename":"README.md"}