Product · Database

The memory engine, not a plugin on top of one

Free, open-source, and embeddable. A hybrid vector and graph index built specifically for agent memory. Run it locally, self-host it, or let ClawDB host it for you.

This is the engine underneath everything ClawDB does: the part that actually stores and searches an agent's memory. Most people never touch it directly, using it through the hosted MCP gateway and Memory Copilot's point-and-click schema builder instead. This page is for teams who want to embed it directly in their own code, or run their own instance instead of using ours.

One import, production-ready

The core runtime is MIT-licensed and has no hosted dependency. Embed it in your own service, or point the same client at ClawDB's hosted MCP gateway when you want zero infrastructure to manage.

npm install @clawdb/sdk

Git-like state branching

Fork memory to test a reasoning path, then merge or discard it, all without touching production state.

See how branching works
What's included

Everything you need, nothing you have to build

  • Hybrid vector + graph index for semantic search over structured relationships
  • Git-like state branching to fork, merge, or discard memory safely
  • ACID transactional writes with crash-safe recovery
  • Client libraries for TypeScript, Python, Go, and Rust
  • Optional reflection jobs that extract facts, preferences, and contradictions
  • No license fees, no usage caps when self-hosted
Every language

One client, every language

The same remember and recall API, whichever stack your agent runs on.

// zero config — auto-provisions on first run
import clawdb from '@clawdb/sdk';

const db = await clawdb();

await db.memory.remember('User prefers dark theme and Python for backend APIs.');
const hits = await db.memory.search('tech preferences');
// score: 0.97 · hybrid HNSW+FTS5 · 4ms

// Branch, simulate, merge — agents go deliberate
const branch = await db.branch.fork('experiment-A');
await db.branch.merge(branch, 'trunk');
Run it yourself

Self-host in three steps

No hosted dependency required. The runtime is embeddable and MIT-licensed.

1
Install the package
npm install @clawdb/sdk
2
Point it at a local data directory

No server process needed. It runs embedded, in-process.

new ClawDB({ storage: 'local', path: './clawdb-data' })
3
Or run it as a shared server

Want multiple services to share one instance? Run it standalone and point any client at it.

npx @clawdb/sdk serve --data ./clawdb-data --port 8420
new ClawDB({ apiUrl: 'http://localhost:8420' })
Knowledge Graph

Hybrid retrieval beats vector-only search

Entities, relationships, and temporal facts, resolved automatically.

01 · Temporal links

Time-aware facts

Tracks how facts change over time, so you know when a preference or spec changed and what it used to be.

02 · Entity resolution

Auto-deduplication

Merges duplicate entities like "John Smith" and "J. Smith" into one graph node automatically.

03 · Auto-distillation

Contradiction pruning

Detects conflicting memories and synthesizes a consolidated summary instead of leaving both around.

Performance

Built for how agents actually use memory

Lots of small reads and writes, not the bulk document search a general-purpose database expects.

Fast, even at scale

Lookups stay quick as memory grows into the millions of records.

HNSW + graph hybrid, sub-0.4ms P99
Never loses a write

A crash mid-write can't corrupt your data or lose what was already saved.

ACID transactional storage, WAL journal
Instant forking

Branching a memory space is immediate, not a slow copy operation.

Zero-copy branching, deterministic replay

Don't want to run it yourself?

The same engine is available as a hosted MCP gateway. Point Claude, Cursor, or any MCP client at a URL and skip the infrastructure entirely.

See the hosted MCP gateway
FAQ

Common questions

Yes. The core runtime is MIT-licensed and open-source. You can inspect the code, self-host it, and use it commercially with no license fees. The hosted MCP gateway is the paid layer on top, and it's optional.

Give your AI agents permanent memory today.

Deploy in under 2 minutes. Free tier included forever.

Launch Studio Free →