Local Memory banner
swarmclawai swarmclawai

Local Memory

AI community

Description

100% local, OpenAI-compatible memory layer for AI agents. On-device embeddings via Ollama + SQLite (sqlite-vec) vector search. Zero cloud round-trips. Built for agents.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

local-memory

100% local, OpenAI-compatible memory layer for AI agents. On-device embeddings via Ollama, SQLite + `sqlite-vec` for vector search, zero cloud round-trips. Drop-in for any code that already speaks `/v1/embeddings`.

[![npm version](https://img.shields.io/npm/v/@swarmclawai/local-memory.svg)](https://www.npmjs.com/package/@swarmclawai/local-memory) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE) [![CI](https://github.com/swarmclawai/local-memory/actions/workflows/ci.yml/badge.svg)](https://github.com/swarmclawai/local-memory/actions/workflows/ci.yml)

Why this exists

Every AI-agent memory repo today — Supermemory, claude-mem, mem0, Graphiti — assumes you'll call OpenAI for embeddings and often a hosted vector DB on top. That means three things for a solo dev or privacy-conscious user:

  1. Every agent interaction has a network round-trip.
  2. A paid API bill scales with your agent's usage.
  3. Your memory lives off-device, off-machine, in someone else's cloud.

`local-memory` is the opposite: a single Node process, one SQLite file on disk, embeddings via a local Ollama instance running on your own laptop. It exposes an **OpenAI-compatible `/v1/embeddings`** endpoint so any existing client that accepts a `baseURL` override just works — no SDK swap, no code rewrite. It also exposes a small first-class memory API (`POST /memory`, `/memory/search`, namespaces, export, import) for when you want more than just embeddings.

30-second demo

# Prereq: Ollama running with an embedding model pulled
ollama pull nomic-embed-text
ollama serve &   # listens on 127.0.0.1:11434

# Start the memory server
npx -y @swarmclawai/local-memory start

# Point your OpenAI client at it
export OPENAI_BASE_URL=http://localhost:3456/v1
export OPENAI_API_KEY=not-used

# From another shell, store and search memories
npx -y @swarmclawai/local-memory add "User prefers kebab-case for slugs"
npx -y @swarmclawai/local-memory search "casing co