Skip to main content

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(
    agent_id="my-agent",
    api_key="your-recallbricks-api-key",
    user_id="user-123"  # Optional
)

# 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(
    agent_id="my-agent",
    api_key="your-key",
    user_id="user-123",  # Optional
    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(
        agent_id="my-agent",
        api_key="your-key",
        user_id=user_id  # Isolates memory per user
    )
    return ConversationChain(llm=llm, memory=memory)

Get Your API Key

  1. Sign up at recallbricks.com
  2. Get your API key from the dashboard
  3. Start building!

Documentation

Examples

Check out the examples/ directory for:

  • basic_usage.py - Simple conversation example
  • with_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

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

recallbricks_langchain-0.2.1.tar.gz (28.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

recallbricks_langchain-0.2.1-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

Details for the file recallbricks_langchain-0.2.1.tar.gz.

File metadata

  • Download URL: recallbricks_langchain-0.2.1.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

Hashes for recallbricks_langchain-0.2.1.tar.gz
Algorithm Hash digest
SHA256 68178440923307ca99f3e9766d854f08d8d67a13626ae332daf26cc568773367
MD5 39a5102bfafaa2d36797ed6b2978afb6
BLAKE2b-256 8fdc2daa4678769dc10f9a48e0ac904b97e055eeefbeb0c973128e2b122435ef

See more details on using hashes here.

File details

Details for the file recallbricks_langchain-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for recallbricks_langchain-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 893ad3c6aabd32af83e40221a6d6c4116a775a53e3a5ffaad2799f66fd248a0c
MD5 cf628bdcaa248e99c61b5c1175e370ac
BLAKE2b-256 35deecf5230579a817893f89b1c80b4d204415a9def130fa50c0a0d19d5a6bc8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page