Graphrt

SQLite

SQLite files in allowed directories (built-in node:sqlite, Node.js 22.13+), parameterised queries on read-only connections, a killable worker per call for timeouts, writes and DDL (nodes, or agents with an opt-in), tables, columns and plans

Stable v0.1.0 Node.js 5 actions
Use in Graphrt Desktop

About

A Graphrt plugin that runs parameterised SQL on local SQLite files with Node's built-in node:sqlite module, so there are no npm dependencies. Files may only come from directories you allow. Agents get read-only access by default: query opens the file read-only, so SQLite itself refuses writes.

What it can do

  • query: one parameterised statement (?, ?1, :name placeholders filled from params in order) on a read-only connection. Returns rows (objects), fields (name and declared type), row_count and truncated.
  • execute: one INSERT/UPDATE/DELETE/DDL statement, autocommitted. Returns changes, last_insert_rowid and any RETURNING rows. create_if_missing creates a new database file. Workflow nodes only, unless SQLITE_TOOL_ALLOW_WRITES=1.
  • explain: EXPLAIN QUERY PLAN as an indented tree plus the raw steps, the statement is not run.
  • list_tables and describe_table: tables and views with their CREATE statements, columns (type, nullable, default, primary key position), primary key, indexes and foreign keys.
  • Every operation is a node sqlite.<operation> and an agent tool. The full reference is in OPERATIONS.md.

Actions

Each action is a step you can add to a workflow. Agents can also use most of them as tools.

  • Run a read-only query sqlite.query
  • Run a write or DDL statement sqlite.execute
  • Explain a query plan sqlite.explain
  • List tables sqlite.list_tables
  • Describe a table sqlite.describe_table

Settings

Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.

  • SQLITE_ALLOWED_DIRS (required)
    Comma-separated directories (absolute or ~/...) that database files may be opened from, including subdirectories
  • SQLITE_PATH (none)
    Default database file, used when a call has no database
  • SQLITE_STATEMENT_TIMEOUT_MS 30000
    Default statement timeout (100 to 600000). Nodes may pass any statement_timeout_ms, for agent tool calls this value is also the ceiling.
  • SQLITE_BUSY_TIMEOUT_MS 5000
    How long to wait for a lock held by another connection (0 to 60000)
  • SQLITE_MAX_RESULT_BYTES 1000000
    Most JSON bytes of returned rows per call (1000 to 8000000)
  • SQLITE_TOOL_ALLOW_WRITES (off)
    1 lets agents call execute

How to use it

In Graphrt Desktop

  1. Open Plugins and search for SQLite.
  2. Click Install and approve it.
  3. Follow the setup steps on the plugin's page, then paste the settings it needs.
  4. Describe a job that needs it, and the builder adds the steps.
Plugins in Graphrt Desktop

With the CLI

terminal
$ graphrt plugin install sqlite
workflow.yaml
- id: create
  type: sqlite.execute
  sql: "CREATE TABLE IF NOT EXISTS leads (id INTEGER PRIMARY KEY, phone TEXT UNIQUE, name TEXT, seen_at TEXT)"
  create_if_missing: true
- id: save
  type: sqlite.execute
  sql: "INSERT INTO leads (phone, name, seen_at) VALUES (?, ?, datetime('now')) ON CONFLICT (phone) DO NOTHING"
  params: ["{{#start.phone#}}", "{{#start.name#}}"]
- id: recent
  type: sqlite.query
  sql: "SELECT phone, name FROM leads WHERE seen_at >= ? ORDER BY seen_at DESC"
  params: ["2026-11-01"]
Plugins in the docs