Quickstart · 5 minutes

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.

Step 1

Install

Pick your language. Recall ships as a single package per ecosystem.

bash
# TypeScript / Node
pnpm add @arc-labs/recall

# Python
pip install recall

# Rust
cargo add arc-labs-recall
Step 2

Initialize 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.

typescript
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.
});
Step 3

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.

typescript
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)
Step 4

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.

typescript
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 }
Step 5

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.

typescript
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:

Updates from the lab.

Engineering notes, research drops, occasional product updates. Roughly monthly.