Quickstart Guide
Get up and running with Libro—the best free AMM Layer—in under two minutes. Our SDK is completely typed and native to modern JavaScript environments.
1. Install the SDK
npm install @libro/sdk
2. Basic Ingestion
Import and initialize the client, then ingest your first memory.
import { Libro } from '@libro/sdk';
const ctx = new Libro({ apiKey: process.env.LIBRO_API_KEY });
await ctx.ingest({
userId: "user_789",
content: "User loves dark mode and functional programming."
});
3. Retrieve Context
In your AI route, pull the context before generating the response.
const context = await ctx.getContext("user_789", "How should I structure my app?");
// AI can now suggest functional programming paradigms.