Integration Guides
Step-by-step guides for every supported framework. Each guide is self-contained — pick your stack and follow the steps. Full example files are included in the package under examples/.
LangChain
Add persistent memory to any LangChain agent. Vektor handles storage and recall — you keep your existing agent logic unchanged.
Install
Pattern
Recall relevant memories before the agent runs, store its output afterwards. Two lines of integration in your existing agent loop.
const { createMemory } = require('vektor-slipstream'); const { ChatOpenAI } = require('@langchain/openai'); const { AgentExecutor, createOpenAIFunctionsAgent } = require('langchain/agents'); const { TavilySearchResults } = require('@langchain/community/tools/tavily_search'); const { ChatPromptTemplate, MessagesPlaceholder } = require('@langchain/core/prompts'); async function main() { // 1. Init Vektor memory const memory = await createMemory({ agentId: 'langchain-agent', licenceKey: process.env.VEKTOR_LICENCE_KEY, }); // 2. Recall what we already know const prior = await memory.recall('user research topic', 5); const priorContext = prior.map(m => m.content).join('\n') || 'No prior research found.'; // 3. Build LangChain agent with memory context in system prompt const llm = new ChatOpenAI({ modelName: 'gpt-4o-mini', temperature: 0.1 }); const tools = [new TavilySearchResults({ maxResults: 5 })]; const prompt = ChatPromptTemplate.fromMessages([ ['system', `You are a research agent with persistent memory.\n\nPRIOR KNOWLEDGE:\n${priorContext}`], ['human', '{input}'], new MessagesPlaceholder('agent_scratchpad'), ]); const agent = await createOpenAIFunctionsAgent({ llm, tools, prompt }); const executor = new AgentExecutor({ agent, tools }); // 4. Run agent const result = await executor.invoke({ input: 'Research agentic AI memory systems' }); // 5. Store the findings await memory.remember(result.output, { importance: 2 }); console.log('Done. Memory stored for next session.'); } main().catch(console.error);
examples/example-langchain-researcher.js
OpenAI Agents SDK
Add persistent memory to an OpenAI tool-use agent loop. The agent gets three memory tools — remember, recall, and graph — and manages its own memory automatically.
Install
const { createMemory } = require('vektor-slipstream'); const OpenAI = require('openai'); const memory = await createMemory({ agentId: 'openai-assistant', licenceKey: process.env.VEKTOR_LICENCE_KEY, }); const client = new OpenAI(); const brief = await memory.briefing(); // last 24h summary // Memory tools for the agent const tools = [ { type: 'function', function: { name: 'remember', description: 'Store an important fact in long-term memory.', parameters: { type: 'object', properties: { content: { type: 'string' }, importance: { type: 'number' }, }, required: ['content'], }, }, }, { type: 'function', function: { name: 'recall', description: 'Search long-term memory for relevant context.', parameters: { type: 'object', properties: { query: { type: 'string' } }, required: ['query'], }, }, }, ]; // Tool executor async function runTool(name, args) { if (name === 'remember') { const { id } = await memory.remember(args.content, { importance: args.importance || 2 }); return `Stored memory #${id}`; } if (name === 'recall') { const results = await memory.recall(args.query, 5); return results.map(r => r.content).join('\n'); } } // Agent loop with tool handling const messages = [ { role: 'system', content: `You are a helpful assistant with memory.\n\n${brief}` }, { role: 'user', content: 'What do you know about my coding preferences?' }, ]; while (true) { const res = await client.chat.completions.create({ model: 'gpt-4o-mini', messages, tools }); const msg = res.choices[0].message; messages.push(msg); if (!msg.tool_calls?.length) { console.log(msg.content); break; } for (const tc of msg.tool_calls) { const result = await runTool(tc.function.name, JSON.parse(tc.function.arguments)); messages.push({ role: 'tool', tool_call_id: tc.id, content: result }); } }
examples/example-openai-assistant.js
Claude MCP
Connect Claude Desktop to Vektor persistent memory via the Model Context Protocol. Claude gets four native memory tools and can recall, store, and traverse the memory graph directly.
Install
Option A — Claude Desktop (MCP server)
Add to your claude_desktop_config.json:
{
"mcpServers": {
"vektor-slipstream": {
"command": "node",
"args": ["/absolute/path/to/example-claude-mcp.js", "--mcp"],
"env": {
"VEKTOR_LICENCE_KEY": "VEKTOR-XXXX-XXXX-XXXX",
"SLIPSTREAM_AGENT_ID": "claude-desktop"
}
}
}
}
Restart Claude Desktop. The following tools become available natively:
vektor_recall— semantic search across all memoriesvektor_store— save important informationvektor_graph— traverse connected memoriesvektor_delta— see what changed recently on a topic
Option B — Direct chat mode
ANTHROPIC_API_KEY=sk-ant-... VEKTOR_LICENCE_KEY=VEKTOR-... node example-claude-mcp.js
examples/example-claude-mcp.js
Mistral
Connect Mistral agents (Le Chat, Mistral API, La Plateforme) to Vektor via a local HTTP bridge. Your memory runs entirely on your machine — nothing leaves it.
Setup
Run the setup script once after installing the package. It validates your licence key and starts a local bridge on port 3847.
node node_modules/vektor-slipstream/mistral/mistral-setup.js
The bridge runs at http://localhost:3847/api/v1/mistral/vektor_memoire. Add mistral/vektor-tool-manifest.json from the package to your Mistral agent or La Plateforme project.
Tool calls
{ "action": "recall", "query": "user preferences", "key": "YOUR_LICENCE_KEY" }
{ "action": "remember", "content": "User prefers TypeScript", "key": "YOUR_LICENCE_KEY" }
Groq
Use Groq's low-latency inference API for VEKTOR's LLM synthesis calls. Set up in seconds — no bridge required.
Setup
GROQ_API_KEY=your_key vektor setup
const mem = await createMemory({ provider: 'groq', model: 'llama-3.3-70b-versatile' });
Recommended models: llama-3.3-70b-versatile, mixtral-8x7b, gemma2-9b-it.
Google Gemini
Connect VEKTOR to Gemini's API with automatic key pooling across up to 9 API keys — ideal for high-throughput workflows and rate-limit avoidance.
Setup
GEMINI_API_KEY=your_key vektor setup
const mem = await createMemory({
provider: 'gemini',
model: 'gemini-2.0-flash',
apiKeys: ['key1', 'key2', 'key3'] // optional pool — rotates automatically
});
apiKeys array to spread load across multiple Gemini keys. VEKTOR rotates on rate-limit response automatically.
Ollama (local models)
Run VEKTOR entirely offline with Ollama. Zero API keys, zero cloud calls — fully air-gapped.
Setup
ollama pull llama3.2 # Then in VEKTOR config: VEKTOR_PROVIDER=ollama VEKTOR_MODEL=llama3.2 vektor setup
const mem = await createMemory({ provider: 'ollama', model: 'llama3.2', baseUrl: 'http://localhost:11434' });
OpenRouter
Access 200+ models via a single API key. Useful for fallback chains, cost optimisation, or testing multiple models against the same memory graph.
Setup
OPENROUTER_API_KEY=your_key vektor setup
const mem = await createMemory({
provider: 'openrouter',
model: 'anthropic/claude-3.5-sonnet' // or any OpenRouter model slug
});
VEKTOR's multi-LLM waterfall can chain OpenRouter as a fallback tier when primary providers hit rate limits.
MCP Clients
VEKTOR runs as an MCP server — any MCP-compatible client gets access to all 49 VEKTOR tools without writing a line of code.
Claude Desktop
{
"mcpServers": {
"vektor": {
"command": "node",
"args": ["/path/to/vektor-slipstream/vektor.mjs", "mcp"],
"env": { "VEKTOR_LICENCE_KEY": "YOUR_KEY" }
}
}
}
Cursor
{
"mcpServers": {
"vektor": {
"command": "node",
"args": ["/path/to/vektor-slipstream/vektor.mjs", "mcp"],
"env": { "VEKTOR_LICENCE_KEY": "YOUR_KEY" }
}
}
}
Windsurf
Config path: ~/.codeium/windsurf/mcp_config.json — same server block as above. Cascade agent can then query VEKTOR memory across sessions.
VS Code — Continue
{
"experimental": {
"modelContextProtocolServers": [{
"transport": { "type": "stdio", "command": "node",
"args": ["/path/to/vektor-slipstream/vektor.mjs", "mcp"],
"env": { "VEKTOR_LICENCE_KEY": "YOUR_KEY" }
}
}]
}
}
VS Code — Cline
Open Cline settings → MCP Servers → Add Server → paste the server block. Cline's autonomous agent mode can then use VEKTOR recall to maintain context across multi-step coding tasks.
LiteLLM Proxy
Route any model through a LiteLLM proxy and attach VEKTOR memory. Zero code changes — point VEKTOR at localhost:4000 and LiteLLM handles provider switching.
Config
const mem = await createMemory({ provider: 'openai', baseURL: 'http://localhost:4000', // LiteLLM proxy model: 'gpt-4o', // any model LiteLLM knows licenceKey: process.env.VEKTOR_LICENCE_KEY });
LM Studio
LM Studio exposes a local OpenAI-compatible endpoint. Point VEKTOR at it for fully offline, zero-cost memory with any locally loaded model.
Config
const mem = await createMemory({ provider: 'openai', baseURL: 'http://localhost:1234/v1', // LM Studio default port model: 'local-model', licenceKey: process.env.VEKTOR_LICENCE_KEY });
NVIDIA NIM
NVIDIA NIM provides near-local inference latency for cloud-hosted models. VEKTOR routes to NIM via the OpenAI-compatible endpoint with automatic failover to Anthropic or OpenAI.
Config
const mem = await createMemory({ provider: 'nvidia', apiKey: process.env.NVIDIA_API_KEY, model: 'meta/llama-3.1-70b-instruct', licenceKey: process.env.VEKTOR_LICENCE_KEY });
MiniMax
MiniMax abab6.5s delivers the lowest cost-per-token for high-volume summarisation and batch memory ops. Used internally by VEKTOR for REM compression passes.
Config
const mem = await createMemory({ provider: 'minimax', apiKey: process.env.MINIMAX_API_KEY, model: 'abab6.5s-chat', licenceKey: process.env.VEKTOR_LICENCE_KEY });
DeepSeek
DeepSeek-V3 and DeepSeek-R1 with persistent VEKTOR memory. Uses the OpenAI-compatible endpoint — no special adapter required.
Config
const mem = await createMemory({ provider: 'openai', baseURL: 'https://api.deepseek.com/v1', apiKey: process.env.DEEPSEEK_API_KEY, model: 'deepseek-chat', licenceKey: process.env.VEKTOR_LICENCE_KEY });
xAI / Grok
Grok-3 and Grok-3-mini with persistent memory. xAI exposes an OpenAI-compatible API — route VEKTOR at api.x.ai.
Config
const mem = await createMemory({ provider: 'openai', baseURL: 'https://api.x.ai/v1', apiKey: process.env.XAI_API_KEY, model: 'grok-3', licenceKey: process.env.VEKTOR_LICENCE_KEY });
Together AI
Access 200+ open models — Llama, Mistral, Qwen, and more — via Together's inference API with VEKTOR memory attached.
Config
const mem = await createMemory({ provider: 'openai', baseURL: 'https://api.together.xyz/v1', apiKey: process.env.TOGETHER_API_KEY, model: 'meta-llama/Llama-3-70b-chat-hf', licenceKey: process.env.VEKTOR_LICENCE_KEY });
Cohere
Command R and Command R+ are optimised for RAG workloads. Pair them with VEKTOR's MAGMA graph for persistent, structured retrieval.
Config
const mem = await createMemory({ provider: 'cohere', apiKey: process.env.COHERE_API_KEY, model: 'command-r-plus', licenceKey: process.env.VEKTOR_LICENCE_KEY });
Perplexity
Perplexity Sonar online models give web-augmented answers. VEKTOR memory adds persistent session context on top of the live search grounding.
Config
const mem = await createMemory({ provider: 'openai', baseURL: 'https://api.perplexity.ai', apiKey: process.env.PERPLEXITY_API_KEY, model: 'sonar-pro', licenceKey: process.env.VEKTOR_LICENCE_KEY });
CrewAI Coming Soon
Persistent cross-session memory for CrewAI multi-agent pipelines. A Python adapter is in progress — drop-in VektorMemory class for any CrewAI agent.
Vex — Memory Portability
Export memory from VEKTOR and import it anywhere. Open .vmig.jsonl interchange format. Round-trip to Pinecone, Qdrant, pgvector, and more.
Install
git clone https://github.com/minimaxa1/Vex cd Vex && npm install node vex.js export --out memories.vmig.jsonl node vex.js import --in memories.vmig.jsonl --target pinecone
Apache 2.0 — fork it, ship it. Node.js 18+, zero dependencies beyond the Vex repo itself.
Vek-Sync — MCP Config Sync
Sync MCP server configs across every AI editor — Claude Desktop, Cursor, Windsurf, VS Code, Cline. AES-256 credential vault included.
Install
git clone https://github.com/Vektor-Memory/Vek-Sync cd Vek-Sync && npm install node vek-sync.js sync
Open source on GitHub. Write once, deploy everywhere.