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(
    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

  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.0.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.0-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

Hashes for recallbricks_langchain-0.2.0.tar.gz
Algorithm Hash digest
SHA256 aabe10cc513048ed06b2a597c662324a6b0fc98826b0ec689581c56b0d1e44d7
MD5 ed270c2d5424c46c839a39bbd0d9ccc4
BLAKE2b-256 2f9d88c4245aa6ab709a39fca241f27ab2841ce8dcb8bf53e1f4aae25a1a9a8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for recallbricks_langchain-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 15e9cfd58c5ca448e1611c7d582df5e16e815a1ddaf45637d62899f79f83b659
MD5 17c8fa84783844c8a506bb6c2d46d847
BLAKE2b-256 5cc55b7943bc4b73f404487906eaddbafb3edea1b513d32f02b1ec99a5b81185

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