DOCS // QUICKSTART

Up and running
in 5 minutes.

Install VEKTOR, connect your agent, and make your first persistent memory call. No infrastructure, no cloud setup, no configuration hell.

ESTIMATED TIME: 5 MINUTES
01
PREREQUISITES
Requirements
VEKTOR runs on Node.js v18 or later. No Python environment, no Docker, no external database required. SQLite is bundled.
BASH
# Verify Node version (must be 18+)
node --version

# Expected: v18.x.x or higher
PLATFORM SUPPORT
macOS, Linux, Windows (WSL recommended). Raspberry Pi 4+ supported. Any server running Node.js v18+ works.
02
INSTALLATION
Install the SDK
One command. The package includes the MAGMA graph engine, AUDN curation loop, local embedding model (25MB), and all integration adapters.
BASH
npm install vektor-memory

# Or with yarn:
yarn add vektor-memory
LICENCE KEY
VEKTOR requires a licence key set as VEKTOR_LICENSE in your environment. Get yours at vektormemory.com/#pricing.
03
INITIALISATION
Create your memory instance
Call createMemory() once at agent startup. Choose your LLM provider and set a unique agentId — this namespaces the memory so multiple agents can share one database without collision.
JAVASCRIPT
import { createMemory } from 'vektor-memory';

const memory = await createMemory({
  provider: 'gemini',           // gemini | openai | groq | ollama
  apiKey:   process.env.GEMINI_API_KEY,
  agentId:  'my-agent',          // unique namespace per agent
  dbPath:   './my-agent.db',     // SQLite file location
});

// memory is now initialised — MAGMA graph ready, AUDN active
Supported providers:
PROVIDERENV VARNOTES
geminiGEMINI_API_KEYRecommended. Up to 9 keys pooled automatically for rate limit avoidance. FREE TIER
openaiOPENAI_API_KEYGPT-4o, o1, mini all supported. PAID
groqGROQ_API_KEYFast inference, generous free tier. FREE TIER
ollamaFully local, zero API cost. Air-gapped deployments. FREE
04
CORE LOOP
Remember & Recall
Two calls form the core loop. Call remember() on every agent turn output. Call recall() at session start to inject context into your system prompt. The AUDN loop handles deduplication and contradiction detection automatically.
JAVASCRIPT
// Store a memory — AUDN decides: ADD / UPDATE / DELETE / NO-OP
await memory.remember("User prefers TypeScript over JavaScript");
await memory.remember("Project deadline is March 15th");
await memory.remember("User updated deadline to March 22nd");
// ↑ AUDN detects contradiction, archives old deadline, stores new one

// Recall relevant context for a query
const ctx = await memory.recall("coding preferences");
// → [{ id, content, summary, importance, score }, ...]

// Inject into your system prompt
const systemPrompt = `You are a helpful assistant.
Relevant memory context:
${ctx.map(m => m.summary).join('\n')}
`;
05
ADVANCED RETRIEVAL
Graph traversal & delta
Beyond basic recall — traverse the associative graph to find non-obvious connections, or query what changed over a time window.
JAVASCRIPT
// Traverse the graph — find 2-hop connections from a concept
const graph = await memory.graph("TypeScript", { hops: 2 });
// → nodes + edges 2 hops away from "TypeScript" concept

// What changed in the last 7 days?
const delta = await memory.delta("architecture decisions", 7);
// → memories added, updated, or resolved in past 7 days

// Morning briefing — what did the agent learn while idle?
const brief = await memory.briefing();
// → human-readable summary of recent memory evolution
06
STUDIO ONLY
REM Cycle — run while idle
Schedule the 7-phase dream cycle to compress raw memory into high-density summaries. Typical result: 50 fragments → 1 insight, 98% noise removed, 60–80% token cost reduction per session.
BASH
# Run manually
node rem.js

# Or schedule nightly via cron
0 3 * * * cd /your/agent && node rem.js >> logs/rem.log 2>&1
JAVASCRIPT
// Or trigger programmatically
const stats = await memory.dream();
// → { nodes_archived, summaries_made, edges_added, duration_ms }
THAT'S IT
You're running a persistent, self-optimising memory layer. Your agent now remembers everything, resolves contradictions automatically, and gets smarter while idle. Questions: [email protected]
NEXT STEPS