APISDK
Satori SDK
Add and search memories
Overview
You can add the SDK to add data and search data from your memory layers. If you need to wrap your model calls with Satori to capture sessions in realtime, use either the OpenAI or aisdk Satori packages.
An API Key is required, which you can get through the CLI.
Install
npm i @satori-sh/sdkEnv
SATORI_API_KEY(required)SATORI_MEMORY_ID(optional, scopes session)
Methods
Add
import { satori } from "@satori-sh/sdk";
const client = satori();
await client.add({ memory: "User likes pizza." });Search
import { satori } from "@satori-sh/sdk";
const client = satori();
const results = await client.search({ query: "What does the user like?" });
console.log(results);