Eve
Automatic long-term memory for Vercel Eve agents using Hindsight. Eve is filesystem-first โ an agent gains a capability by dropping a file under agent/. The @vectorize-io/hindsight-eve package wires two files that call Hindsight's REST API directly, so your agent gets memory that just works โ relevant memory is injected before every turn and each exchange is retained after โ without the model ever choosing to call a tool.
Installโ
npm install @vectorize-io/hindsight-eve
eve is a peer dependency you already have in an Eve project.
Quick Startโ
Create two files:
// agent/instructions/hindsight.ts โ recall: inject memory before each turn
import { hindsightMemory } from "@vectorize-io/hindsight-eve";
export default hindsightMemory();
// agent/hooks/hindsight.ts โ retain: save each exchange after the turn
import { hindsightRetainHook } from "@vectorize-io/hindsight-eve";
export default hindsightRetainHook();
Both read their config from the environment:
| Env var | Purpose |
|---|---|
HINDSIGHT_API_KEY | Bearer token sent as Authorization: Bearer <key> |
HINDSIGHT_API_URL | Hindsight REST base (defaults to Hindsight Cloud) |
HINDSIGHT_BANK_ID | Bank to scope memory to (defaults to default; auto-created) |
Hindsight Cloudโ
Set HINDSIGHT_API_KEY from your Hindsight Cloud dashboard. HINDSIGHT_API_URL defaults to https://api.hindsight.vectorize.io, so no URL is needed.
Self-hostedโ
import { hindsightMemory } from "@vectorize-io/hindsight-eve";
// A local server with no auth:
export default hindsightMemory({ apiUrl: "http://localhost:8000", apiKey: null });
Optionsโ
Both factories accept the same options (each falls back to its env var):
hindsightMemory({
apiUrl, // REST base; defaults to HINDSIGHT_API_URL, then Cloud
apiKey, // bearer token; null = no auth (local dev)
bankId, // bank to scope memory to
recallQuery, // the broad query used for recall (see below)
budget, // "low" | "mid" | "high" โ recall result budget (default "mid")
maxTokens, // recall token budget (default 1024)
context, // `context` tag written on retained items (default "eve")
includeAssistantReply, // also retain the assistant's reply (default true)
timeoutMs, // HTTP timeout (default 15000)
onError, // (err, phase) => void โ failures degrade silently (default console.warn)
});
Recall is profile-based, not per-messageโ
Eve's instruction resolver runs at the start of a turn and cannot see the live user message, so recall uses a fixed broad query (default: "user preferences, identity, and working context") to surface the user's ambient profile/context each turn. This is ideal for "the agent knows you" โ preferences, identity, ongoing context โ and is fully deterministic. Tune it with recallQuery. Per-message, query-specific retrieval inherently needs a tool the model calls and is out of scope here.
Verifyโ
Run your agent. Tell it a durable preference in one chat ("whenever you write me code, use Python with full type hints and no comments"). Start a fresh chat and ask for something โ the agent applies the remembered preference, because the memory was injected before the model ran, with no tool call.