LangChain handles the chain. Hebbrix handles the memory.
LangChain's built-in memory options live in Python objects. The moment your process restarts, they're gone. Hebbrix gives your chains memory that survives deployments, scales to millions of users, and gets sharper the more it's used.
Where memory slots into your chain
Hebbrix wraps your LangChain call. It searches for context before the call and stores what was learned after. Your chain logic doesn't change.

Pick the approach that fits your architecture
Automatic, zero-config
Point ChatOpenAI at Hebbrix's endpoint. Memory search and injection happen automatically around every LLM call. Your chain logic stays untouched.
from langchain_openai import ChatOpenAI llm = ChatOpenAI( base_url="https://api.hebbrix.com/v1", api_key="your_hebbrix_key", model="gpt-4" ) # Use in any chain. Memory is automatic. response = llm.invoke("What does Sarah prefer?") # Hebbrix searches memories, injects # context, then forwards to the LLM.
Full control
Run the Hebbrix Python SDK alongside your chains when you want to decide exactly when memory happens: store after a tool call, search before a chain invocation, on your terms.
from hebbrix import MemoryClient from langchain_openai import ChatOpenAI llm = ChatOpenAI(model="gpt-4") # MemoryClient is async-first async with MemoryClient(api_key="YOUR_API_KEY") as mem: # Before chain: get relevant context memories = await mem.search("user preferences") ctx = "\n".join(m["content"] for m in memories) # After chain: store what was learned await mem.add( content="User asked about billing, wants email" )
LangChain built-in vs. Hebbrix memory
LangChain's memory modules are great for prototyping. Hebbrix is built for production agents.
Give your LangChain agent a memory upgrade
Free tier, no credit card. Enough to build a full prototype and decide for yourself if it's worth it.