Long-term memory layer for AI agents and assistants
Project description
Recollect
Home · Interactive Showcase · LangChain · LlamaIndex
Long-term memory layer for AI agents and assistants—self-hosted, library-first, and integration-ready for LangChain and LlamaIndex OSS workflows.
Why Recollect
- ADD-only facts from conversations (optional LLM extraction)
- Scoped memory —
user_id,agent_id,run_id - Hybrid retrieval — semantic + keyword + entity boost
- Pluggable stores — SQLite (default), Qdrant, Chroma, pgvector
- No platform required — embed in your app; open Apache 2.0
Install
git clone https://github.com/cobusgreyling/recollect.git
cd recollect
pip install -e ".[dev]"
pip install -e packages/llama-index-memory-recollect # LlamaIndex adapter
PyPI (package name recollect-ai, import recollect):
pip install recollect-ai
pip install llama-index-memory-recollect
Extras
| Extra | Purpose |
|---|---|
openai |
OpenAI LLM + embeddings |
langchain |
Tools + Runnable helpers |
llamaindex |
Core types for LlamaIndex apps |
qdrant / chroma / pgvector |
Vector backends |
huggingface |
HF sentence-transformers embedder |
all |
Everything |
5-minute local demo (no API keys)
pip install -e .
recollect demo
from recollect import Memory, RecollectConfig
memory = Memory(RecollectConfig.local_dev())
memory.add("Prefers PostgreSQL over MySQL", user_id="alice", infer=False)
print(memory.search("database", filters={"user_id": "alice"}))
LangChain
from recollect import Memory, RecollectConfig
from recollect.integrations.langchain import create_recollect_tools, memory_runnable
memory = Memory(RecollectConfig.local_dev())
tools = create_recollect_tools(memory, user_id="alice")
ctx = memory_runnable(memory, user_id="alice").invoke({"input": "database prefs"})
Examples: examples/langchain_travel_agent.py, examples/langgraph_memory_node.py
LlamaIndex
from llama_index.memory.recollect import RecollectMemory
from recollect.config import RecollectConfig
memory = RecollectMemory.from_config(
context={"user_id": "alice"},
config=RecollectConfig.local_dev(),
)
# SimpleChatEngine.from_defaults(llm=llm, memory=memory)
Package: packages/llama-index-memory-recollect
API
| Method | Purpose |
|---|---|
add(...) |
Extract/store memories |
search(query, filters={}, top_k=5) |
Hybrid retrieval |
get / get_all / delete |
CRUD |
AsyncMemory provides the same API with async/await.
Development
make install
make test
make demo
Roadmap
- LangChain tools + Runnable
- LlamaIndex
RecollectMemory - Async API, multi-backend stores
- LlamaHub listing + upstream LlamaIndex notebook PR
- LangGraph cookbook in docs site
GitHub Pages Demo
The docs/ folder contains a fully interactive showcase (no backend) that runs the same hybrid retrieval and scoping logic live in the browser:
- Add memories with any combination of
user_id/agent_id/run_id - Real-time hybrid search (semantic + keyword + entity signals, using the same local hashing embedder approach)
- Full chat simulation: retrieve context, simulated reply, write the exchange back to memory
Once you enable GitHub Pages for this repository (Settings → Pages → Source: Deploy from a branch → main / docs), the demo will be live at:
https://<yourname>.github.io/recollect/showcase.html
Acknowledgments
Patterns draw on public agent-memory research and OSS work, including additive extraction and multi-signal retrieval popularized by Mem0. Recollect is an independent codebase.
License
Apache 2.0 — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file recollect_ai-0.2.0.tar.gz.
File metadata
- Download URL: recollect_ai-0.2.0.tar.gz
- Upload date:
- Size: 460.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf790d34f1c684b7f4c1f20bc6cff95787e5719bb61b0ab5110d4e01e23c4a06
|
|
| MD5 |
5be216cbd75574f01d6a757455decdc5
|
|
| BLAKE2b-256 |
3d3c1ad5da342a3cb1017eca43e1c9f5e71f5672e360bd71178723c270cce3ca
|
File details
Details for the file recollect_ai-0.2.0-py3-none-any.whl.
File metadata
- Download URL: recollect_ai-0.2.0-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d23575c502a11731b5a4ce4f745e24e77a8651b16d5ea6f9b4b0525a7d8d135b
|
|
| MD5 |
6350702560fffd2fefca67cd19924d1d
|
|
| BLAKE2b-256 |
359f6d5e7ef67f0d963328b26564edddd765d6ce48e921174bda6ad4de5461c6
|