Openclaw

From db0-ai/db0 · View interactive version

Openclaw is an AI agent skill from the GitHub repository db0-ai/db0. You are an AI agent. Follow these instructions exactly to install db0 — a persistent memory plugin for OpenClaw.

How to use this skill

Skill file

Install db0 for OpenClaw

You are an AI agent. Follow these instructions exactly to install db0 — a persistent memory plugin for OpenClaw.

What you are installing

db0 replaces OpenClaw's default compaction-based memory with a proper memory system that:

Step 1: Run the init command

Run this command in the terminal:

npx @db0-ai/openclaw init

This will:

If the user's OpenClaw is installed in a non-default location, ask them for the path and use:

npx @db0-ai/openclaw init --dir /path/to/openclaw

Or they can set the OPENCLAW_HOME environment variable.

Step 2: Restart OpenClaw

Tell the user to restart OpenClaw so it picks up the new plugin configuration.

Step 3: Confirm to the user

Tell the user that db0 is installed and configured. Their agent now has:

Fallback: Manual Setup

If the init command fails, set up manually:

  1. Create the extension directory and install the package:
mkdir -p ~/.openclaw/extensions/db0
cd ~/.openclaw/extensions/db0
npm init -y
npm install @db0-ai/openclaw
  1. Create ~/.openclaw/extensions/db0/index.js:
module.exports = async function register(api) {
  const { db0 } = await import("@db0-ai/openclaw");
  api.registerContextEngine("db0", () => db0());
};
  1. Create ~/.openclaw/extensions/db0/openclaw.plugin.json:
{
  "id": "db0",
  "name": "db0 Context Engine",
  "version": "0.1.0",
  "configSchema": {
    "type": "object",
    "properties": {},
    "additionalProperties": false
  }
}
  1. Add to ~/.openclaw/openclaw.json:
{
  "plugins": {
    "slots": {
      "memory": "none",
      "contextEngine": "db0"
    },
    "entries": {
      "db0": { "enabled": true }
    }
  }
}
  1. Tell the user to restart OpenClaw.

Optional Upgrades

After installation, the user can edit ~/.openclaw/extensions/db0/index.js to customize:

Semantic search with real embeddings:

module.exports = async function register(api) {
  const { db0 } = await import("@db0-ai/openclaw");
  api.registerContextEngine("db0", () => db0({
    embeddingFn: async (text) => {
      // OpenAI, Ollama, transformers.js, etc.
    },
    minScore: 0.65,
  }));
};

Cross-device sync with Postgres:

api.registerContextEngine("db0", () => db0({
  storage: "postgresql://user:pass@your-host/db0",
  embeddingFn: myEmbed,
  minScore: 0.65,
}));

Troubleshooting

Learn More

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.