Integrations
xMem is designed to be modular and pluggable. You can integrate with a wide range of LLMs, vector stores, and session stores. Here are some common integrations:
LLM Integrations
- Llama.cpp
- Ollama
- Mistral
- HuggingFace Inference API
- OpenAI
- Gemini (Google AI)
import { LlamaCppAdapter } from class="text-amber-300">'./adapters/llamaCpp';
orchestrator.registerProvider(class="text-amber-300">'llm', class="text-amber-300">'llama', new LlamaCppAdapter({ apiUrl: class="text-amber-300">'http:class="text-slate-400">//localhost:8080' }));
Vector Store Integrations
- ChromaDB
- Qdrant
- Pinecone
- MockVectorStore (for dev/testing)
import { ChromaDBAdapter } from class="text-amber-300">'./adapters/chromadb';
orchestrator.registerProvider(class="text-amber-300">'vector', class="text-amber-300">'chromadb', new ChromaDBAdapter({ url: class="text-amber-300">'http:class="text-slate-400">//localhost:8000', collection: class="text-amber-300">'my_collection' }));
Session Store Integrations
- PostgreSQL
- MongoDB
Tip: You can register multiple providers of each type and select which to use per operation.
n8n Integration
n8n is an open-source workflow automation tool. You can connect n8n to xMem using the built-in HTTP Request node to automate memory upserts, queries, and more. No custom plugin is required—just use your xMem API endpoints!
- In n8n, add an HTTP Request node.
- Set the Method to
POST
(orGET
as needed). - Set the URL to your xMem API endpoint (e.g.,
https://your-xmem.com/api/session-memory
). - Configure authentication (API key or session, as required).
- Set the Body to
JSON
and provide the required fields (see below).
Example: Upsert Session Memory
POST https://your-xmem.com/api/session-memory
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"sessionId": "session-123",
"content": "Remember this fact.",
"role": "user"
}
n8n HTTP Request Node Config
{
"url": "https://your-xmem.com/api/session-memory",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY"
},
"body": {
"sessionId": "session-123",
"content": "Remember this fact.",
"role": "user"
},
"bodyContentType": "json"
}
Tip: You can use any xMem API endpoint in n8n. For advanced workflows, chain multiple HTTP Request nodes or use n8n's built-in logic to automate your LLM memory orchestration!