CortexDB Docs
Docs for CortexDB 0.12.8, the version running on CortexDB Cloud (api.cortexdb.ai).
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, {
  text: message.content.text,
  role: "user",
  observedAt: new Date().toISOString(),
  idempotencyKey: `eliza-${message.id}`,
});

See also

On this page