Open Source · NextClaw · Apache 2.0

AI Memory System

Let your AI remember every customer

Ordinary AI forgets the moment a chat ends — every conversation starts from zero. NextClaw gives your AI long-term memory: it remembers each customer and the context of past conversations, then picks up right where you left off, with sharper answers. Repeat questions are handled fast without hitting the LLM every time — quicker and cheaper. Data can live on your own server with sensitive info auto-redacted. Free and open source, Apache 2.0.

Ordinary AI forgets after every chat and starts from zero. NextClaw is open-source long-term memory for AI: it remembers each customer and the thread of past conversations, so the next chat picks up where you left off. Repeat questions answered fast without re-hitting the LLM. Self-hostable. Apache 2.0.

What It Does

8 ways to find a memory, 4 priority layers, each AI's data kept separate — the model only gets called when there's genuinely something new.

Repeat questions answered instantly — and cheaper

Frequently asked questions are pulled straight from memory in milliseconds, no AI call needed — faster and cheaper. Tested: 75%+ of repeat questions answered in under 5ms. Only genuinely new questions reach the AI.

8 routes to the same memory

The same piece of customer information is indexed from 8 angles — keyword, time, name, topic category, and more. However the question is phrased, it won't slip through.

Saves AI spend when storing memories

When new content comes in, NextClaw extracts what it can automatically, only handing off to the AI model when extraction fails. Accurate memories without burning through AI credits.

Each AI sees only its own data

When multiple AIs share one memory system, the database itself enforces who sees what — enforced at the storage level, not a gentleman's agreement in app code. One agent cannot read another's memories, period.

Live bilingual dashboard

A real-time monitoring panel in both English and Chinese. Memory changes show up the moment they happen. Health and medical information is automatically hidden before it ever reaches the display.

Anything can write into memory

Website chat, Discord bots, automated crawlers, third-party system webhooks — they all write into the same memory store over a standard web interface. One unified record.

Tunes itself

Automatically checks the health of the memory store daily, weekly, and monthly — suggesting what to clean up, merge, or retire. Proposals can be auto-applied with rollback if something goes wrong.

Slot in, nothing else changes

Drops straight into OpenClaw as a replacement memory module. After install, OpenClaw automatically uses the new memory — your existing settings and workflows stay exactly as they are.

How It Works

Four priority layers check memory in order before reaching the AI model; seven automated steps handle every new piece of content going in; Postgres + pgvector store everything; the dashboard updates in real time.

Where memories live

Postgres 16 (a proven, reliable database) + pgvector (a module designed for AI-style understanding). Supports meaning-based search, keyword search, time-based lookup, and more.

How memories are found

Checks the most recently used memories first, then works down four layers — only reaching the AI model as a last resort. Each layer's success rate is visible so you're never guessing.

How new content gets stored

Receive → deduplicate → extract key info → categorize → write → index → notify the dashboard. Seven steps, fully automatic, no manual intervention.

Runtime

Node 22+, TypeScript, pnpm. A one-command startup script is included for local testing.

Up in 5 steps

Add NextClaw to an existing OpenClaw installation — five commands total.

1

Step 1: Download NextClaw into OpenClaw's plugin folder

git clone https://github.com/NextAgentBC/nextclaw.git ~/openclaw/extensions/memory-postgres
2

Step 2: Start the database

cd ~/openclaw/extensions/memory-postgres/dev && docker compose up -d
3

Step 3: Download the language understanding model (Ollama)

ollama pull nomic-embed-text
4

Step 4: Generate a dashboard access token

export NEXTCLAW_DASH_TOKEN=$(openssl rand -hex 24)
5

Step 5: Start the memory receiver

pnpm openclaw gateway start

Requirements

  • OpenClaw ≥ 2026.4.25
  • Node ≥ 22
  • Postgres ≥ 16, pgvector ≥ 0.7.0
  • Language model interface: OpenAI-compatible format or Ollama

Frequently Asked Questions

What is NextClaw?

An open-source system that gives AI long-term memory. Ordinary AI forgets after every chat — NextClaw lets your AI agents remember each customer and the context of past conversations, then pick up right where they left off.

What problem does NextClaw solve?

Standard AI starts fresh every conversation — it can't remember preferences, past instructions, or project context, so you keep re-explaining. NextClaw gives agents reliable long-term memory: less rework, sharper answers, smoother automation.

How does NextClaw pull it off?

It's built on a mature, stable database. Lookups happen in layers: common questions are pulled straight from memory in an instant, and only genuinely new ones fall back to the AI — fast and cheap. When several AIs share one memory, each sees only its own — no cross-talk.

Is NextClaw free? What license does it use?

Completely free and open source under Apache 2.0 — commercial use, modification, and redistribution all allowed, at no cost.

How do I deploy or try NextClaw?

There's a step-by-step install guide in the GitHub repo — follow it to set up on your own machine or server. It takes some technical know-how; if you'd rather not, we can deploy it for you.

Want to give your AI a real memory?

NextClaw has been running in NexAgent's real production environment for months. Apache 2.0 — fork it, ship it, change it.