Database

Native OpenClaw SQLite database plugin with schema, query, and CRUD tools

Readme

Database Plugin

Native OpenClaw plugin that adds local SQLite database management with:

  • schema inspection for tables, columns, indexes, and full CREATE statements
  • raw SQL query and execution tools for advanced SQLite workflows
  • transactional multi-statement execution with rollback on failure
  • structured table, index, insert, select, update, and delete helpers

Install

bash
npm install
npm run build
openclaw plugins install .
openclaw plugins enable database
openclaw gateway restart

Config

json5
{
  plugins: {
    entries: {
      database: {
        enabled: true,
        config: {
          storagePath: "~/.openclaw/state/database/database.sqlite",
          resultRowLimit: 100,
          busyTimeoutMs: 5000,
          enableWal: true,
        },
      },
    },
  },
}

If storagePath is omitted, the plugin stores data in ~/.openclaw/state/database/database.sqlite.

Tools

  • database_list_tables
  • database_describe_table
  • database_schema
  • database_create_table
  • database_create_index
  • database_drop_index
  • database_drop_table
  • database_query
  • database_execute
  • database_transaction
  • database_insert
  • database_select
  • database_update
  • database_delete