CortexDB Docs
Integrations

Eliza OS

Give Eliza OS agents long-term memory via the CortexDB TypeScript SDK.

Eliza OS is a TypeScript agent framework. There is no dedicated adapter — wire CortexDB in through the TypeScript SDK inside a provider or action.

Install

npm install cortexdbai

Recall in a provider

import { V1Client } from "cortexdbai/v1";

const client = new V1Client({
  apiUrl: "https://api-v1.cortexdb.ai",
  actor: "agent:eliza",
  bearer: process.env.CORTEX_TOKEN!,
});
const scope = "org:acme/agent:eliza";

// In a provider: pull long-term context before the model runs
const pack = await client.recall(scope, { view: "holistic", query: message.content.text,
                                          diagnostics: "none" });
const context = pack.context_block ?? "";

// In an action / evaluator: capture the turn
await client.experience(scope, {
  content: { kind: "message", role: "user", text: message.content.text },
  context: { observed_at: new Date().toISOString() },
  idempotency_key: `eliza-${message.id}`,
});

See also

On this page