03 · Integrations

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

npm install -g ./vektor-slipstream-1.5.9.tgz npm install langchain @langchain/openai @langchain/community

Pattern

Recall relevant memories before the agent runs, store its output afterwards. Two lines of integration in your existing agent loop.

javascript
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);
Full Example
The complete LangChain researcher agent is included in the package at 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

npm install -g ./vektor-slipstream-1.5.9.tgz npm install openai
javascript
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 });
  }
}
Full Example
Complete interactive assistant with readline loop: 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

npm install -g ./vektor-slipstream-1.5.9.tgz npm install @anthropic-ai/sdk

Option A — Claude Desktop (MCP server)

Add to your claude_desktop_config.json:

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:

Option B — Direct chat mode

bash
ANTHROPIC_API_KEY=sk-ant-... VEKTOR_LICENCE_KEY=VEKTOR-... node example-claude-mcp.js
Full Example
Complete MCP server + direct chat mode: 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.

bash
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

json
{ "action": "recall",   "query": "user preferences", "key": "YOUR_LICENCE_KEY" }
{ "action": "remember", "content": "User prefers TypeScript", "key": "YOUR_LICENCE_KEY" }
Local-first
The Mistral bridge is included in the npm package and runs on your machine. Mistral calls localhost — your memory graph never touches any external server.

Groq

Use Groq's low-latency inference API for VEKTOR's LLM synthesis calls. Set up in seconds — no bridge required.

Setup

bash
GROQ_API_KEY=your_key vektor setup
js
const mem = await createMemory({ provider: 'groq', model: 'llama-3.3-70b-versatile' });

Recommended models: llama-3.3-70b-versatile, mixtral-8x7b, gemma2-9b-it.

Speed
Groq's GroqChip delivers sub-100ms first-token latency — recall synthesis feels instant even on large memory graphs.

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

bash
GEMINI_API_KEY=your_key vektor setup
js
const mem = await createMemory({
  provider: 'gemini',
  model: 'gemini-2.0-flash',
  apiKeys: ['key1', 'key2', 'key3'] // optional pool — rotates automatically
});
Key pooling
Pass an 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

bash
ollama pull llama3.2
# Then in VEKTOR config:
VEKTOR_PROVIDER=ollama VEKTOR_MODEL=llama3.2 vektor setup
js
const mem = await createMemory({ provider: 'ollama', model: 'llama3.2', baseUrl: 'http://localhost:11434' });
Air-gapped
With Ollama, no data ever leaves your machine — not even during LLM synthesis. Fully sovereign.

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

bash
OPENROUTER_API_KEY=your_key vektor setup
js
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

json — claude_desktop_config.json
{
  "mcpServers": {
    "vektor": {
      "command": "node",
      "args": ["/path/to/vektor-slipstream/vektor.mjs", "mcp"],
      "env": { "VEKTOR_LICENCE_KEY": "YOUR_KEY" }
    }
  }
}

Cursor

json — ~/.cursor/mcp.json
{
  "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

json — .continue/config.json
{
  "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.

Same database
All MCP clients — Claude Desktop, Cursor, Windsurf, Continue, Cline — share the same local SQLite memory graph. Switch clients freely; memories persist.

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

js
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

js
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

js
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

js
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

js
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

js
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

js
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

js
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

js
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.

In progress
CrewAI adapter ETA Q3 2026. Email us to join the beta.

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

bash
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

bash
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.