Long-term memory layer for AI agents and assistants
Project description
Recollect
🌐 Live Demo · Interactive Showcase · LangChain · LlamaIndex
The showcase on this page is raw code.
For the real interactive presentation (add memories, hybrid search, chat simulation), go to the live site above.
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
🌐 Live Interactive Showcase (recommended)
The best way to experience Recollect is the fully interactive browser demo:
→ https://cobusgreyling.github.io/recollect/showcase.html
It includes:
- Live add memory form with full scoping (
user_id,agent_id,run_id) - Hybrid search lab that shows semantic + keyword + entity scores (mirrors the Python implementation)
- Chat simulation — retrieve memories, get a simulated reply, and write the exchange back
Everything runs 100% in your browser using the same local-embedder + hybrid retrieval logic as the library. Data stays in your localStorage.
(The links to docs/showcase.html and docs/index.html in this README point at the source code on GitHub, which is why it looks like “just code”. The real presentation is at the link above.)
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.1.tar.gz.
File metadata
- Download URL: recollect_ai-0.2.1.tar.gz
- Upload date:
- Size: 461.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f77728c3833db5e14b65104961f1d7be0f02df91ed1aa219dcbbc5506867206b
|
|
| MD5 |
90f834d9904f767d3f8af8f117bc9f3c
|
|
| BLAKE2b-256 |
f5509af609fb4e125799050d9f6a64790b9e43f206638cc23f70a108fba7f802
|
File details
Details for the file recollect_ai-0.2.1-py3-none-any.whl.
File metadata
- Download URL: recollect_ai-0.2.1-py3-none-any.whl
- Upload date:
- Size: 25.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f682f43c16ed7741d4e89f706d6acc93bf7d41c13bd3a08246904191a7fdd3d0
|
|
| MD5 |
a2c86e5c800f1170568bff5c7ebfcc67
|
|
| BLAKE2b-256 |
e70546abc41df449d319da8541fa4a0c10fc7516425db4a52bad15f9252537c4
|