Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

fix(docs): install Hindsight as the memory/hindsight registry item (#4963)

roboeve[bot]f83e5f07fdf7
diff --git a/apps/docs/lib/geistdocs/redirects.test.ts b/apps/docs/lib/geistdocs/redirects.test.ts
index 791af2d00..8eba5c648 100644
--- a/apps/docs/lib/geistdocs/redirects.test.ts
+++ b/apps/docs/lib/geistdocs/redirects.test.ts
@@ -194,6 +194,14 @@ describe("compatibilityRedirects", () => {
permanent: true,
});
});
+
+ it("redirects the Hindsight extension registry item to its memory provider", () => {
+ expect(compatibilityRedirects).toContainEqual({
+ source: "/r/extension/hindsight.json",
+ destination: "/r/memory/hindsight.json",
+ permanent: true,
+ });
+ });
});
describe("defaultLanguageRedirects", () => {
diff --git a/apps/docs/lib/geistdocs/redirects.ts b/apps/docs/lib/geistdocs/redirects.ts
index c65fa8c56..b50f5e619 100644
--- a/apps/docs/lib/geistdocs/redirects.ts
+++ b/apps/docs/lib/geistdocs/redirects.ts
@@ -119,6 +119,11 @@ export const compatibilityRedirects: DocsRedirect[] = [
destination: "/r/memory/upstash-agentkit.json",
permanent: true,
},
+ {
+ source: "/r/extension/hindsight.json",
+ destination: "/r/memory/hindsight.json",
+ permanent: true,
+ },
{ source: "/evals", destination: "/benchmarks", permanent: true },
{ source: "/feed", destination: "/rss.xml", permanent: true },
{ source: "/feed.xml", destination: "/rss.xml", permanent: true },
diff --git a/apps/docs/lib/integrations/data.ts b/apps/docs/lib/integrations/data.ts
index 7a2c68483..94afb3981 100644
--- a/apps/docs/lib/integrations/data.ts
+++ b/apps/docs/lib/integrations/data.ts
@@ -1587,6 +1587,9 @@ export default githubExtension({
For local or non-Vercel deployments, omit \`connector\` and set \`GITHUB_TOKEN\`; the extension also accepts an explicit \`token\`. Prefer fine-grained credentials, expose only the presets the agent needs, and keep approval enabled for writes. See the [GitHub Tools eve documentation](https://github-tools.com/frameworks/eve#eve-extension) for token authentication, per-tool overrides, commit attribution, and the complete tool catalog.`,
relatedResources: [softwareFactoryGuide, incidentResponseGuide],
},
+};
+
+const memoryPresentations: Record<string, MemoryPresentation> = {
hindsight: {
logo: "hindsight",
docsHref: "https://hindsight.vectorize.io/sdks/integrations/eve",
@@ -1604,51 +1607,52 @@ For local or non-Vercel deployments, omit \`connector\` and set \`GITHUB_TOKEN\`
install: `Install Hindsight memory for eve:
\`\`\`bash
-eve add extension/hindsight
+eve add memory/hindsight
\`\`\`
-This installs \`@vectorize-io/hindsight-eve\` and writes \`agent/instructions/hindsight.ts\` for recall plus \`agent/hooks/hindsight.ts\` for retention. The package requires Node.js 24 or later.`,
- quickStart: `Create a Hindsight Cloud API key and add it to the agent's environment. The API URL defaults to Hindsight Cloud, and the bank defaults to \`default\`:
+This installs \`@vectorize-io/hindsight-eve\` and writes a memory slot. The provider requires Node.js 24 or later and eve 0.45.1 or later.`,
+ quickStart: `Create a Hindsight Cloud API key and add it to the agent's environment. The API URL defaults to Hindsight Cloud:
\`\`\`bash title=".env.local"
HINDSIGHT_API_KEY=...
-HINDSIGHT_BANK_ID=my-agent
\`\`\`
-The registry creates both capability files:
+The registry creates this memory slot:
-\`\`\`ts title="agent/instructions/hindsight.ts"
+\`\`\`ts title="agent/memory/hindsight.ts"
import { hindsightMemory } from "@vectorize-io/hindsight-eve";
+import { defineMemory } from "eve/memory";
+import { byPrincipal } from "eve/memory/scope";
-export default hindsightMemory();
-\`\`\`
-
-\`\`\`ts title="agent/hooks/hindsight.ts"
-import { hindsightRetainHook } from "@vectorize-io/hindsight-eve";
-
-export default hindsightRetainHook();
+export default defineMemory({
+ description: "Long-term memory about the current user.",
+ provider: hindsightMemory(),
+ scope: byPrincipal,
+});
\`\`\`
-Before each turn, the dynamic instructions resolver recalls the user's ambient profile and working context. After the turn, the hook retains the user message and assistant reply. Neither path depends on the model choosing to call a tool.`,
- configure: `Recall uses a fixed broad query rather than the live user message. Tune the profile context and response budget in the instructions file when needed:
+Before each turn, the provider recalls memories relevant to the user's message. After the turn, it retains the user message and assistant reply. Neither path depends on the model choosing to call a tool. The slot also exposes \`hindsight__reflect\`, so the model can ask long-term memory a question mid-turn.`,
+ configure: `Each eve memory scope gets its own Hindsight bank, so \`byPrincipal\` keeps every caller's memory separate. Tune recall in the memory slot when needed:
-\`\`\`ts title="agent/instructions/hindsight.ts"
+\`\`\`ts title="agent/memory/hindsight.ts"
import { hindsightMemory } from "@vectorize-io/hindsight-eve";
+import { defineMemory } from "eve/memory";
+import { byPrincipal } from "eve/memory/scope";
-export default hindsightMemory({
- recallQuery: "user preferences, identity, projects, and working context",
- budget: "high",
- maxTokens: 2048,
+export default defineMemory({
+ description: "Long-term memory about the current user.",
+ provider: hindsightMemory({
+ budget: "high",
+ maxTokens: 2048,
+ }),
+ scope: byPrincipal,
});
\`\`\`
-For a self-hosted server, set \`HINDSIGHT_API_URL\` and pass \`apiKey: null\` to both factories when the server has no authentication. Other shared options include \`bankId\`, \`context\`, \`includeAssistantReply\`, \`timeoutMs\`, and \`onError\`.
+For a self-hosted server, set \`HINDSIGHT_API_URL\`, and pass \`apiKey: null\` when the server has no authentication. Other options include \`recallQuery\`, \`context\`, \`includeAssistantReply\`, \`capture\`, \`tools\`, \`timeoutMs\`, and \`onError\`.
-A bank is one isolated memory store, and both files must use the same bank. Do not share the default bank across untrusted users; use separate agent deployments with distinct \`HINDSIGHT_BANK_ID\` values for separate users or tenants. See the [Hindsight eve integration guide](https://hindsight.vectorize.io/sdks/integrations/eve) for Cloud, self-hosted, and factory configuration.`,
+A string \`bankId\` or \`HINDSIGHT_BANK_ID\` pins every scope to one shared bank, which removes that isolation. Use it only for single-user agents. See the [Hindsight eve integration guide](https://hindsight.vectorize.io/sdks/integrations/eve) for Cloud, self-hosted, and bank configuration.`,
},
-};
-
-const memoryPresentations: Record<string, MemoryPresentation> = {
file: {
logo: "vercel",
docsHref: "/docs/memory/file",
diff --git a/apps/docs/package.json b/apps/docs/package.json
index c5d8e0ce8..f416ff123 100644
--- a/apps/docs/package.json
+++ b/apps/docs/package.json
@@ -87,7 +87,7 @@
"@types/three": "0.184.1",
"@upstash/agentkit-eve": "0.9.0",
"@upstash/redis": "^1.38.4",
- "@vectorize-io/hindsight-eve": "^0.2.1",
+ "@vectorize-io/hindsight-eve": "^0.3.1",
"@veltdev/chat-sdk-adapter": "0.2.4",
"@vercel/connect": "2.2.0",
"@vercel/otel": "catalog:",
diff --git a/apps/docs/registry.json b/apps/docs/registry.json
index d2b8f42ec..c6689df39 100644
--- a/apps/docs/registry.json
+++ b/apps/docs/registry.json
@@ -339,28 +339,27 @@
]
},
{
- "name": "extension/hindsight",
+ "name": "memory/hindsight",
"type": "registry:item",
"title": "Hindsight",
"description": "Recall relevant context before every turn and retain each exchange automatically.",
"dependencies": [
- "@vectorize-io/hindsight-eve"
+ "@vectorize-io/hindsight-eve@^0.3.1"
],
"envVars": {
"HINDSIGHT_API_KEY": "",
- "HINDSIGHT_API_URL": "",
- "HINDSIGHT_BANK_ID": ""
+ "HINDSIGHT_API_URL": ""
+ },
+ "meta": {
+ "eve": {
+ "requires": ">=0.45.1"
+ }
},
"files": [
{
- "path": "registry/extensions/hindsight-instructions.ts",
- "type": "registry:file",
- "target": "agent/instructions/hindsight.ts"
- },
- {
- "path": "registry/extensions/hindsight-hook.ts",
+ "path": "registry/memory/hindsight.ts",
"type": "registry:file",
- "target": "agent/hooks/hindsight.ts"
+ "target": "agent/memory/hindsight.ts"
}
]
},
diff --git a/apps/docs/registry/extensions/hindsight-hook.ts b/apps/docs/registry/extensions/hindsight-hook.ts
deleted file mode 100644
index 2af435494..000000000
--- a/apps/docs/registry/extensions/hindsight-hook.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { hindsightRetainHook } from "@vectorize-io/hindsight-eve";
-
-export default hindsightRetainHook();
diff --git a/apps/docs/registry/extensions/hindsight-instructions.ts b/apps/docs/registry/extensions/hindsight-instructions.ts
deleted file mode 100644
index c9ed1b8a4..000000000
--- a/apps/docs/registry/extensions/hindsight-instructions.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { hindsightMemory } from "@vectorize-io/hindsight-eve";
-
-export default hindsightMemory();
diff --git a/apps/docs/registry/memory/hindsight.ts b/apps/docs/registry/memory/hindsight.ts
new file mode 100644
index 000000000..b583af290
--- /dev/null
+++ b/apps/docs/registry/memory/hindsight.ts
@@ -0,0 +1,9 @@
+import { hindsightMemory } from "@vectorize-io/hindsight-eve";
+import { defineMemory } from "eve/memory";
+import { byPrincipal } from "eve/memory/scope";
+
+export default defineMemory({
+ description: "Long-term memory about the current user.",
+ provider: hindsightMemory(),
+ scope: byPrincipal,
+});
diff --git a/packages/eve-catalog/src/index.ts b/packages/eve-catalog/src/index.ts
index d1ac2f4da..c5efe16a5 100644
--- a/packages/eve-catalog/src/index.ts
+++ b/packages/eve-catalog/src/index.ts
@@ -368,7 +368,7 @@ export const INTEGRATIONS: readonly IntegrationEntry[] = [
{
slug: "hindsight",
name: "Hindsight",
- kind: "extension",
+ kind: "memory",
tagline: "Recall relevant context before every turn and retain each exchange automatically.",
surfaces: { scaffoldable: false, registry: true, gallery: true },
},
diff --git a/packages/eve/test/scenarios/registry-hindsight.scenario.test.ts b/packages/eve/test/scenarios/registry-hindsight.scenario.test.ts
index 2e4a5857b..722cd570e 100644
--- a/packages/eve/test/scenarios/registry-hindsight.scenario.test.ts
+++ b/packages/eve/test/scenarios/registry-hindsight.scenario.test.ts
@@ -8,7 +8,7 @@ import { useScenarioApp } from "../../src/internal/testing/scenario-app.js";
import { runPnpmCommand } from "../../src/internal/testing/run-pnpm-command.js";
const REGISTRY_ROOT = fileURLToPath(new URL("../../../../apps/docs/", import.meta.url));
-const ITEM_NAME = "extension/hindsight";
+const ITEM_NAME = "memory/hindsight";
const scenarioApp = useScenarioApp();
@@ -28,7 +28,7 @@ function dependencyEntry(specifier: string): [string, string] {
describe(`registry ${ITEM_NAME}`, () => {
// https://github.com/vercel/eve/issues/4961
- it.fails("builds the agent the registry item installs", async () => {
+ it("builds the agent the registry item installs", async () => {
const registry = JSON.parse(await readFile(join(REGISTRY_ROOT, "registry.json"), "utf8")) as {
readonly items: readonly RegistryItem[];
};
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 3284f272e..15b20794c 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -527,8 +527,8 @@ importers:
specifier: ^1.38.4
version: 1.38.4
'@vectorize-io/hindsight-eve':
- specifier: ^0.2.1
- version: 0.2.1(eve@packages+eve)
+ specifier: ^0.3.1
+ version: 0.3.1(eve@packages+eve)
'@veltdev/chat-sdk-adapter':
specifier: 0.2.4
@@ -7767,11 +7767,11 @@ packages:
'@upstash/[email protected]':
resolution: {integrity: sha512-ZX69mKReun/yieyHYLoBg0eSiF6hjCQjd8zUKkJ5eCHehDV6P8S8oZOHxGSfkH1spfOhGZk0EGerBrfUsXow8g==}
- '@vectorize-io/[email protected]':
- resolution: {integrity: sha512-dFrCRgX/fXNV7bCCXfifmKTEQnj4insbxOQ79GU9mHMwZ9XfjQ1Oq8679C9xHwpItCtx6cDPqWZkluq8iY+qNg==}
+ '@vectorize-io/[email protected]':
+ resolution: {integrity: sha512-Qi8CTDKB3ZFmepyBVsc5BPCZptKL/OLwrs+K4re8LaQlHyxZw2WtRRo0mkNuEJWJu5wdks/KF0Gp2+BfBFsINw==}
engines: {node: '>=24'}
peerDependencies:
- eve: '>=0.11.0'
+ eve: '>=0.45.1'
'@veltdev/[email protected]':
resolution: {integrity: sha512-Amzn9rMKpkDjpC1uxpn9ztsIdFSF6sC+6KOUhyIPkQhinKCS5AUI1XCO8aLZTlolyDObPt4Gmib8XSmSg9Uclg==}
@@ -21807,7 +21807,7 @@ snapshots:
dependencies:
uncrypto: 0.1.3
- '@vectorize-io/[email protected](eve@packages+eve)':
+ '@vectorize-io/[email protected](eve@packages+eve)':
dependencies:
eve: link:packages/eve