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.3.0.tar.gz (28.9 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.3.0-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: recallbricks_langchain-0.3.0.tar.gz
  • Upload date:
  • Size: 28.9 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.3.0.tar.gz
Algorithm Hash digest
SHA256 872c67a6ef6f24dbe49a77f640f4b9234e84c59b431c0231e7ef4180ada5a45d
MD5 23d3e590b6780b16027d5fbe4895464e
BLAKE2b-256 bd245abd4e5dbdffedbf84d9c11bfcaa8d672ba917a6a654853d6730a3063175

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for recallbricks_langchain-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f2597c01cff462b9c3ef9f58e94576ed010d6414078fae5947200d23d2648a6
MD5 ca7d91b686ebb0c57dbccaacb8dab95b
BLAKE2b-256 d61d94455b8cb2d053ec50042b783f36db1cd2226af177b6c96e9b958bb4bd24

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