Skip to content

Instantly share code, notes, and snippets.

@marcelsamyn
marcelsamyn / index.ts
Last active June 27, 2025 08:08
Example: Ingesting documents into your Petals memory
// Using the SDK, run npm install @marcelsamyn/memory first
import { MemoryClient } from "@marcelsamyn/memory/sdk";
const memory = new MemoryClient({
baseUrl: "https://petals.chat/api/memory",
apiKey: "your-petals-api-key-here"
});
await memory.ingestDocument({
document: {