Memory-enabled agent in 5 minutes.
Install Recall, write a memory, retrieve it, render it into a prompt. Three steps, three languages, one CTA when you finish.
Below is the language-agnostic version. The per-language pages walk through the same steps with idiomatic code.
Install
Pick your language. Recall ships as a single package per ecosystem.
# TypeScript / Node
pnpm add @arc-labs/recall
# Python
pip install recall
# Rust
cargo add arc-labs-recallInitialize a store
The default store is embedded SQLite + sqlite-vec — perfect for prototypes; scales to ~100K memories per user. For production, swap in Postgres + pgvector with one config change later.
import { Recall } from "@arc-labs/recall";
const recall = new Recall({
store: { type: "sqlite", path: "./recall.db" },
// Pre-filter, types, and decay use sensible defaults.
// Override only when you have a reason.
});Write a memory
The write API takes a conversational turn and runs the 7-stage pipeline: pre-filter, extract, classify, resolve, dedupe, conflict-check, persist.
await recall.write({
scope: { user_id: "u_alice" },
source: {
turn: {
user: "I prefer dark mode in my IDE — light themes hurt my eyes.",
assistant: "Noted — I'll default to dark mode for editor recommendations.",
},
},
});
// What's stored:
// - 1 preference: "user prefers dark mode in IDE" (confidence 0.93)
// - 0 facts (the eye-strain is a cause, not a durable fact)Retrieve memories
Five retrievers run in parallel and fuse via RRF. The default top-K is 10; the budget for prompt rendering is 1500 tokens.
const results = await recall.search({
scope: { user_id: "u_alice" },
query: "what theme should I use?",
// Optional: hint type, time range, entities
});
// → results[0]: { content: "user prefers dark mode in IDE", type: "preference", score: 0.91 }Render into your prompt
Memory's output is structured, not free text. Render it into the prompt with a stable ID per memory so the model can cite back.
const ctx = await recall.context({
scope: { user_id: "u_alice" },
query: userMessage,
budget: 1500, // tokens
});
const prompt = `
You have these memories about the user:
${ctx.render("structured")}
Respond to: ${userMessage}
`;What now?
You have a working memory layer. From here, three directions:
- · Learn the architecture — 28 pages on the design choices behind the defaults.
- · Pick your use case — patterns and pitfalls for support, coding, personal assistants, sales, research.
- · Read the docs — full API reference, configuration, deployment.