Standalone Mode | OpenMemory

Run OpenMemory locally without a backend server. Learn how the local-first architecture works for privacy and speed.

Standalone Mode

OpenMemory Architecture

OpenMemory is designed to be local-first. You do not need to run a backend server to use it. The core cognitive engine is embedded directly into the JavaScript and Python SDKs.

How it works

In Standalone Mode, OpenMemory runs entirely within your application's process.

  1. Storage: Uses a local SQLite database file (default: ./memory.sqlite) or an in-memory instance.
  2. Embeddings: Uses local embeddings (e.g., ONNX, Transformers) or calls external APIs (OpenAI, Gemini) directly from your client.
  3. No Network: No HTTP requests are made to a separate OpenMemory server.

When to use Standalone vs Backend

FeatureStandalone ModeBackend Mode
Setupnpm install / pip install (Zero config)Docker / Node server required
Data LocationLocal file in your projectCentralized database (Postgres/SQLite)
Multi-userSingle-tenant (usually)Multi-tenant (built-in auth)
Use CaseCLI tools, local agents, scripts, single-user appsWeb apps, teams, shared memory, dashboards
PerformanceIn-process (Fastest)Network overhead

Configuration

Standalone mode accepts a configuration object to tune behavior:

const mem = new OpenMemory({
  path: "./memory.db",
  embeddings: {
    provider: "openai", // or 'local', 'gemini', 'ollama'
    model: "text-embedding-3-small",
    apiKey: process.env.OPENAI_API_KEY
  },
  // ... other options
});

Limitations

  • Concurrency: SQLite handles concurrent reads well, but heavy concurrent writes from multiple processes might encounter locks.
  • Scaling: For massive datasets (millions of memories) shared across many concurrent users, Backend Mode with Postgres is recommended.
© 2025 OpenMemory · MIT License