Documentation

MumpixDB docs for the database layer.

MumpixDB is the reasoning ledger and structured memory engine of the Mumpix platform. This page is the fast path: install it, run hello world, understand the core API, then move deeper into the full storage-plane docs.

Install

Install the Node package:

bash
npm install mumpix

Hello World

Create hello-world.js:

hello-world.js
const { Mumpix } = require("mumpix");

async function main() {
  const db = await Mumpix.open("./hello-world.mumpix", {
    consistency: "eventual",
  });

  await db.remember("User prefers short answers.");
  await db.remember("Project uses MumpixDB for memory.");

  const answer = await db.recall("what does the user prefer?");
  console.log("recall:", answer);

  const all = await db.list();
  console.log("memories:", all);

  const stats = await db.stats();
  console.log("stats:", stats);

  await db.close();
}

main().catch((err) => {
  console.error(err);
  process.exit(1);
});

Run it:

bash
node hello-world.js

What Happened

  1. The script opened a local .mumpix database file.
  2. It wrote two memory records.
  3. It recalled the best matching record for a query.
  4. It listed the stored records and printed database stats.
Fast mental model

MumpixDB gives you a local-first durable memory loop: write memory, read memory, inspect state, close cleanly.

Core API

Open a database

js
const db = await Mumpix.open("./agent.mumpix", {
  consistency: "eventual",
});

Common methods

js
await db.remember(text);
await db.rememberAll(["one", "two"]);

await db.recall(query);
await db.recallMany(query, 5);

await db.has(query);
await db.list();
await db.clear();
await db.stats();
await db.close();

Consistency Modes

  • eventual — fastest local mode for development and prototypes
  • strict — stronger durability path for production apps and agents
  • verified — durability plus audit-oriented surfaces
js
const db = await Mumpix.open("./agent.mumpix", {
  consistency: "strict",
});

Verified Mode

Use verified mode when you need audit-oriented flows:

js
const db = await Mumpix.open("./verified.mumpix", {
  consistency: "verified",
});

await db.remember("Verified write example.");

const audit = await db.audit();
console.log(audit);

await db.close();

Next Steps

  • Read the deeper storage-plane reference: mumpixdb.com/benchmark
  • Explore file workflows with MumpixFS.
  • Use MumpixSL when you want daemon and native transport access.
  • Build higher-level products like WYD Code on top of the database layer, not inside it.