All skills
vectorize-io avatar

/hindsight-docs

@5bfef3c
by vectorize-iovectorize-io/hindsight44k stars
5,845

Complete Hindsight documentation for AI agents. Use this to learn about Hindsight architecture, APIs, configuration, and best practices.

Use this Skill: https://skilld.dev/gh/vectorize-io/hindsight/hindsight-docs

This session only. Nothing lands on disk.

referencessdksintegrationseliza.md

≈816 tokens on demand. Your agent reads this file only when SKILL.md points to it.

elizaOS

The @vectorize-io/hindsight-eliza package gives elizaOS agents long-term memory backed by Hindsight.

It registers two components on your agent:

  • A provider (HINDSIGHT_MEMORY) that recalls relevant memories and injects them into the prompt before each model call.
  • An evaluator (HINDSIGHT_RETAIN) that retains conversation messages to Hindsight after each turn.

Both are enabled by default, layer on top of elizaOS's existing memory, and fail safe — a memory-service hiccup never blocks your agent from responding.

View Changelog →

Installation

npm install @vectorize-io/hindsight-eliza @vectorize-io/hindsight-client

This package targets @elizaos/core ^1.7.2 (declared as a peer dependency).

Usage

Create the plugin and add it to your character's plugin list:

import { createHindsightPlugin } from "@vectorize-io/hindsight-eliza";
import { Hindsight } from "@vectorize-io/hindsight-client";

const hindsightPlugin = createHindsightPlugin({
  client: new Hindsight({ apiKey: process.env.HINDSIGHT_API_KEY }),
  recall: { budget: "high", includeEntities: true },
  retain: { tags: ["source:eliza"] },
});

export const character = {
  name: "Ada",
  plugins: [
    // ...your other plugins
    hindsightPlugin,
  ],
};

By default each agent message is stored under a memory bank keyed by the message's entityId, giving every user an isolated memory store.

Configuration

createHindsightPlugin({
  client,

  // Which memory bank to read/write. A string uses one fixed bank for all
  // messages; a function derives the bank per message. Defaults to
  // `message.entityId` (one bank per user).
  bank: (message) => message.entityId,

  recall: {
    enabled: true,            // set false to disable recall
    budget: "mid",            // "low" | "mid" | "high" — latency vs. depth
    types: ["world", "experience"], // restrict to fact types
    maxTokens: 1000,          // cap recalled tokens
    includeEntities: false,   // include entity observations
    heading: "# Relevant long-term memories", // prompt heading
  },

  retain: {
    enabled: true,            // set false to disable retain
    async: true,              // fire-and-forget; never adds turn latency
    tags: ["source:eliza"],   // tags on every retained memory
    metadata: { env: "prod" },
    includeAgentMessages: false, // also store the agent's own replies
  },
});

Using only recall or only retain

Disable either side with recall.enabled: false or retain.enabled: false. You can also build the components directly with createHindsightProvider and createHindsightEvaluator if you want to wire them into a plugin yourself.

How it works

Component elizaOS seam When it runs What it does
HINDSIGHT_MEMORY Provider During prompt composition, before the model call Calls Hindsight recall with the incoming message and injects the results into context
HINDSIGHT_RETAIN Evaluator After the agent processes the turn Calls Hindsight retain to persist the message (and optionally the agent's replies)

Source: SKILL.md on GitHub

1 alerttoday5 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    The skill is a comprehensive documentation set for the Hindsight memory system, providing architecture overviews, API references, and integration guides for multiple AI agent frameworks. No security risks were identified in the documentation or provided examples.

  • Sockettoday

    No alerts

  • Snyktoday

    Risk: LOW · No issues

  • Runlayer6mo

    30/42 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 5bfef3c. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 15 hours ago.

Activeupdated 2 months ago

README badge

README badge for vectorize-io/hindsight/hindsight-docs