Drop-in LangChain components backed by Dakera — persistent agent memory and server-side RAG with no local embedding model.
langchain-dakera
Dakera is a self-hosted memory server. Spin it up with Docker:
docker run -d \ --name dakera \ -p 3300:3300 \ -e DAKERA_ROOT_API_KEY=dk-mykey \ ghcr.io/dakera-ai/dakera:latest # Verify it's running curl http://localhost:3300/health
For production with persistent storage, use Docker Compose.
pip install langchain-dakera
Requirements: Python ≥ 3.10, a running Dakera server.
from langchain_dakera import DakeraMemory, DakeraVectorStore # Persistent conversation memory memory = DakeraMemory( api_url="http://localhost:3300", api_key="dk-mykey", agent_id="my-agent", ) # RAG vector store — server handles embedding vectorstore = DakeraVectorStore( api_url="http://localhost:3300", api_key="dk-mykey", namespace="my-docs", )
Persistent semantic memory for LangChain conversation chains. Stores and recalls conversation history using Dakera's hybrid search (BM25 + vector).
from langchain.chains import ConversationChain from langchain_openai import ChatOpenAI from langchain_dakera import DakeraMemory memory = DakeraMemory( api_url="http://localhost:3300", api_key="dk-mykey", agent_id="chat-agent", top_k=5, # memories to recall per turn importance=0.7, # importance score for stored memories ) chain = ConversationChain( llm=ChatOpenAI(model="gpt-4o"), memory=memory, ) # First session response = chain.predict(input="My name is Alice and I'm building a chatbot.") # Later session — memory persists across restarts response = chain.predict(input="What was I building?") print(response) # "You mentioned you were building a chatbot."
api_url
api_key
""
agent_id
recall_k
5
min_importance
0.0
importance
0.7
memory_key
"history"
input_key
Server-side embedded vector store for RAG. Dakera handles embeddings on the server — no OpenAI or Hugging Face API calls needed for indexing or retrieval.
from langchain_community.document_loaders import DirectoryLoader from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain_dakera import DakeraVectorStore loader = DirectoryLoader("./docs", glob="**/*.md") docs = loader.load() splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=50) chunks = splitter.split_documents(docs) # Index into Dakera — server handles embedding vectorstore = DakeraVectorStore( api_url="http://localhost:3300", api_key="dk-mykey", namespace="my-docs", ) vectorstore.add_documents(chunks)
from langchain.chains import RetrievalQA from langchain_openai import ChatOpenAI from langchain_dakera import DakeraVectorStore vectorstore = DakeraVectorStore( api_url="http://localhost:3300", api_key="dk-mykey", namespace="my-docs", ) qa_chain = RetrievalQA.from_chain_type( llm=ChatOpenAI(model="gpt-4o"), retriever=vectorstore.as_retriever(search_kwargs={"k": 4}), ) answer = qa_chain.run("How does Dakera handle memory decay?") print(answer)
namespace
embedding_model
import os from langchain_dakera import DakeraMemory memory = DakeraMemory( api_url=os.environ["DAKERA_URL"], api_key=os.environ["DAKERA_API_KEY"], agent_id="my-agent", )
Long-term memory for multi-agent crews
Memory store and vector index for agents
Persistent memory for AutoGen agents
TypeScript / Node.js integration