Enterprise-grade persistent memory for LangChain agents
Project description
RecallBricks LangChain Integration
Official LangChain integration for RecallBricks Memory Graph.
What is RecallBricks?
RecallBricks provides memory infrastructure that goes beyond vector search by understanding relationships, causality, and patterns - not just similar text.
Perfect for LangChain agents that need:
- Context across conversations
- Understanding of cause-and-effect
- Relationship-aware memory retrieval
Installation
pip install recallbricks-langchain
Quick Start
from langchain.chains.conversation.base import ConversationChain
from langchain_openai import ChatOpenAI
from recallbricks_langchain import RecallBricksMemory
# Initialize memory with RecallBricks
memory = RecallBricksMemory(
api_key="your-recallbricks-api-key",
user_id="user-123" # Optional: for multi-user apps
)
# Use with any LangChain chain
llm = ChatOpenAI()
conversation = ConversationChain(
llm=llm,
memory=memory
)
# Your agent now has relationship-aware memory!
conversation.run("Deploy the new authentication feature")
# Later...
conversation.run("Why did the deployment fail?")
# RecallBricks provides context: "Related to the auth feature you deployed"
Features
✅ Drop-in replacement for ConversationBufferMemory ✅ Automatic relationship detection - understands causality and patterns ✅ Persistent across sessions - memories don't disappear ✅ Multi-user support - isolate memory per user ✅ Production-ready - 99.9% uptime, enterprise security
Why RecallBricks vs Standard LangChain Memory?
| Feature | ConversationBufferMemory | RecallBricksMemory |
|---|---|---|
| Stores conversations | ✅ | ✅ |
| Persists across sessions | ❌ | ✅ |
| Understands relationships | ❌ | ✅ |
| Detects causality | ❌ | ✅ |
| Finds patterns | ❌ | ✅ |
| Explains connections | ❌ | ✅ |
Advanced Usage
With Custom Parameters
memory = RecallBricksMemory(
api_key="your-key",
user_id="user-123",
limit=20, # Number of memories to retrieve
min_relevance=0.7, # Minimum relevance score
return_messages=True # Return as Message objects
)
Multi-User Applications
def get_conversation_for_user(user_id: str):
memory = RecallBricksMemory(
api_key="your-key",
user_id=user_id # Isolates memory per user
)
return ConversationChain(llm=llm, memory=memory)
Get Your API Key
- Sign up at recallbricks.com
- Get your API key from the dashboard
- Start building!
Documentation
Examples
Check out the examples/ directory for:
basic_usage.py- Simple conversation examplewith_openai.py- Advanced multi-user scenarios with relationship detection
Development
Installation
# Clone the repository
git clone https://github.com/recallbricks/recallbricks-langchain.git
cd recallbricks-langchain
# Install in development mode
pip install -e .
# Install development dependencies
pip install -r requirements.txt
Running Tests
python -m pytest tests/
Support
- Email: support@recallbricks.com
- GitHub: github.com/recallbricks
License
MIT
Project details
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 recallbricks_langchain-0.1.0.tar.gz.
File metadata
- Download URL: recallbricks_langchain-0.1.0.tar.gz
- Upload date:
- Size: 28.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b493960825940c2dd1288c0704c31dee11d3976825f05e1c85f987b2969b7817
|
|
| MD5 |
35ca5759e9ffc567b6a2d655b8018f30
|
|
| BLAKE2b-256 |
8711b2f92214cf619e4606b7639b0b83974d9e1494b8bb7f7f5588da594e7682
|
File details
Details for the file recallbricks_langchain-0.1.0-py3-none-any.whl.
File metadata
- Download URL: recallbricks_langchain-0.1.0-py3-none-any.whl
- Upload date:
- Size: 32.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10696ef4f56348c553e9db1e6a950b0fe6034b9e2110419a255ccbb1694731c1
|
|
| MD5 |
fcb7993b2ef07ea348a4663998645746
|
|
| BLAKE2b-256 |
b0a2063aa164f76ca0275884bf794c1b8358471c134b4ff71ae664d98a878774
|