Skip to main content
1

Install

npm install @deyta-ai/sdk
2

Create a client

import { Deyta } from "@deyta-ai/sdk";

const deyta = new Deyta({ apiKey: process.env.DEYTA_API_KEY! });
baseUrl defaults to https://api.deyta.ai. Override it for staging or self-hosted gateways.
3

Store a memory

const stored = await deyta.memory.remember({
  namespace_id: "ns_123",
  content: "The team standup is every Tuesday at 10am UTC.",
  title: "Standup time",
});

// stored: { document_id, chunks_created, entities_extracted, relationships_created }
4

Recall it

const result = await deyta.memory.recall({
  namespace_id: "ns_123",
  query: "when is the standup?",
});

// result.results[]: RecallMatch[]

Next: stop repeating namespace_id

If you’ll issue several operations against the same namespace, scope the client once and drop the per-call namespace_id:
const ns = deyta.namespaces.scope("ns_123");

await ns.remember({ content: "..." });
await ns.recall({ query: "..." });
See Scoping for the full sub-client surface.