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 Available
Persistent cross-session memory for CrewAI multi-agent pipelines. Drop-in VektorMemory class for any CrewAI agent. Local HTTP bridge, zero cloud dependency.
node_modules/vektor-slipstream/crewai/crewai-vektor-setup.js
Vex — Memory Portability
Export memory from VEKTOR and import it anywhere. The open .vmig.jsonl interchange format gives you full portability — no lock-in. 12 connectors: Qdrant, Pinecone, Chroma, Weaviate, pgvector, Redis, Milvus, Neo4j, and more. Migrate Claude or ChatGPT conversation exports directly into VEKTOR memory with LLM fact extraction.
Install
npm install -g @vektormemory/vex
Export VEKTOR memory
vex export --from vektor --db ~/.vektor/slipstream-memory.db --output memories.vmig.jsonl
Migrate to another vector store
# VEKTOR → Qdrant vex migrate --from vektor --to qdrant --db memory.db --collection memories # VEKTOR → Pinecone vex migrate --from vektor --to pinecone --db memory.db --api-key $KEY --index my-index --host $HOST # VEKTOR → pgvector / Supabase vex migrate --from vektor --to pgvector --db memory.db --url postgres://user:pass@localhost/db # VEKTOR → Redis Stack vex migrate --from vektor --to redis --db memory.db --redis-url redis://localhost:6379 # VEKTOR → Neo4j vex migrate --from vektor --to neo4j --db memory.db --neo4j-url bolt://localhost:7687
Migrate Claude conversation history into VEKTOR
# Export your Claude conversations from claude.ai → Settings → Export Data # Then migrate with smart LLM fact extraction: vex migrate --from claude-export --to vektor \ --file conversations.json \ --db ~/.vektor/slipstream-memory.db \ --mode smart \ --openai-key $OPENAI_KEY \ --namespace my-history
Inspect or validate a migration file
vex inspect memories.vmig.jsonl vex validate memories.vmig.jsonl
Apache 2.0 — github.com/Vektor-Memory/Vex. Node.js 18+, zero dependencies.
Vek-Sync — MCP Config Sync
Keep your MCP server configs in sync across every AI editor. One source of truth for Claude Desktop, Cursor, Windsurf, VS Code, Cline, Roo Code, Gemini CLI, Copilot, Continue, and Codex. AES-256-GCM encrypted credential vault included — no plaintext secrets in config files.
Install
npm install -g @vektormemory/vek-sync
Set up your source config
# Run the setup wizard — choose your source editor and target editors vek-sync setup # Or manually create ~/.vek-sync/mcp.json with your MCP server definitions # Then sync to all configured editors: vek-sync sync
Store credentials in the vault
# Store an API key (AES-256-GCM encrypted, OS-bound key derivation) vek-sync vault set openai-key sk-... # Retrieve it vek-sync vault get openai-key # List all stored keys vek-sync vault list
Sync to specific editors
# Sync to all configured editors vek-sync sync # Sync to a specific editor only vek-sync sync --target cursor vek-sync sync --target windsurf
Apache 2.0 — github.com/Vektor-Memory/Vek-Sync. 11 editors supported, zero dependencies.
Via — Universal AI Integration
Route context, tasks, and memory across every AI tool. Via connects Claude, Cursor, Windsurf, ChatGPT, and LangChain to a shared context bus — so your work follows you across every tool, every session, every machine. Includes codebase graph indexing, a file watcher, and an MCP server with 8 tools.
Install
npm install -g @vektormemory/via
Start Via and index your project
# Run setup wizard — configures connected tools and MCP server via setup # Index your project codebase (token-aware file anatomy) via index # Start the context bus and MCP server via start
Connect to Claude Desktop
{
"mcpServers": {
"via": {
"command": "via",
"args": ["mcp"]
}
}
}
Add this to your claude_desktop_config.json. Via exposes 8 MCP tools: context recall, file conversion, project scaffold, file watcher, task routing, and more.
Connect to Cursor or Windsurf
{
"mcpServers": {
"via": {
"command": "via",
"args": ["mcp"],
"env": {}
}
}
}
Add to .cursor/mcp.json or your Windsurf MCP config. Via indexes your codebase on startup so every agent session starts with full project context.
Watch for file changes
# Auto-reindex when project files change via watch # Check current project context via status
Apache 2.0 — github.com/Vektor-Memory/Via. Node.js 18+, zero dependencies.