ADD-only extraction
Facts accumulate over time. Nothing is silently overwritten during ingestion.
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.
Pass raw text or full message threads. Optional LLM extraction yields ADD-only atomic facts.
Tag memories with user_id, agent_id, or run_id filters.
Vectors and metadata land in local SQLite under ~/.recollect by default.
Hybrid ranking blends embeddings, BM25-style keywords, and entity overlap for the top hits.
Facts accumulate over time. Nothing is silently overwritten during ingestion.
Semantic similarity plus keyword and entity boosts in one fused score.
Ship with SQLite and a deterministic local embedder for tests—add OpenAI when ready.
add, search, get, get_all, delete—five methods to start.
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"}))