Memory that outlives the context window

Agents forget. Preferences, constraints, and confirmed outcomes disappear when the session ends. Recollect gives you a small, embeddable library to add facts from dialogue and search them later with semantic, keyword, and entity signals—without locking you into a hosted platform.

How it works

  1. 1

    Ingest

    Pass raw text or full message threads. Optional LLM extraction yields ADD-only atomic facts.

  2. 2

    Scope

    Tag memories with user_id, agent_id, or run_id filters.

  3. 3

    Embed & store

    Vectors and metadata land in local SQLite under ~/.recollect by default.

  4. 4

    Retrieve

    Hybrid ranking blends embeddings, BM25-style keywords, and entity overlap for the top hits.

Built for production-minded prototypes

ADD-only extraction

Facts accumulate over time. Nothing is silently overwritten during ingestion.

Hybrid retrieval

Semantic similarity plus keyword and entity boosts in one fused score.

Local-first

Ship with SQLite and a deterministic local embedder for tests—add OpenAI when ready.

Simple API

add, search, get, get_all, delete—five methods to start.

See it in action

Support bots, persistent assistants, and multi-agent scoping—with a fully interactive browser playground on the showcase page (add, search, and chat loop all run live).

Quickstart

git clone https://github.com/cobusgreyling/recollect.git
cd recollect
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
from recollect import Memory, RecollectConfig
from recollect.config import EmbedderConfig

memory = Memory(
    RecollectConfig(
        extraction_enabled=False,
        embedder=EmbedderConfig(provider="local"),
    )
)

memory.add("Prefers PostgreSQL over MySQL", user_id="alice", infer=False)
print(memory.search("database", filters={"user_id": "alice"}))