The pipeline

From question to answer, without leaving your data.

Install the Composer package, exclude the tables that are off-limits, and DBMind handles the rest — writing one guarded SELECT, executing it on your server, answering from the real rows.

01

Step 01

Approve & auto-configure

During install you answer one question: which tables the AI must NOT answer from — framework tables are pre-selected. Every other table is approved and auto-configured straight from the schema: primary keys, readable columns, real foreign-key join paths, indexed columns. Sensitive columns (passwords, tokens, secrets, API keys) are stripped before the schema is ever shown to a model.

php artisan dbmind1:install    # exclude tables → everything else auto-configured
php artisan dbmind1:discover   # read-only listing of DBs, tables, columns
php artisan dbmind1:sync       # after migrations: approve new tables, refresh metadata
02

Step 02

Write & guard the SQL

For each question the model sees the sanitised schema — approved tables, foreign keys, indexed columns — and writes exactly one read-only SELECT, JOINing along the keys it was given. SqlGuard rejects anything else: DML, comments, stacked statements, unapproved tables, denied columns, SELECT *, a missing LIMIT. The query runs on your own read-only connection under a database-side statement timeout; failures feed a bounded repair loop.

? "which users spent the most? top 3"
→ SELECT users.name, SUM(orders.grand_total) AS total
  FROM orders JOIN users ON users.id = orders.user_id
  GROUP BY users.id ORDER BY total DESC LIMIT 3
✓ SqlGuard · read-only · 5s timeout · executed locally
03

Step 03

Answer from real rows — encrypted in transit

The result rows — capped and deny-list-sanitised — go back to the model, which phrases a grounded answer. In cloud mode, private text values (names, emails, phones) are first sealed into AES-256-GCM tokens the model copies blindly; your package decrypts the answer locally, so the cloud never reads them. If the query returns nothing, it says so instead of guessing. The question, the answer and the exact SQL land in your dashboard conversation log, and --show-sql prints the query in the CLI, so every answer is auditable.

POST /v1/sql/answer  Authorization: Bearer sk_live_…
{ "rows": "1) name=[[DBM1:gV1xb…]], total=4210", "encrypted": true }
← { "answer": "1. [[DBM1:gV1xb…]] — $4,210 …" }
→ package decrypts locally → "1. Jane — $4,210 …"

Data boundaries

What stays, what travels.

Stays on your server

  • Your database — the cloud never gets a connection
  • SQL guarding and execution, in every mode
  • The read-only connection and statement timeout
  • Denied columns — stripped from schema, SQL and rows
  • Excluded tables — invisible to the AI entirely
  • The encryption key — private values are decrypted only here

Sent to the gateway (cloud mode)

  • The question being asked
  • Schema metadata of approved tables — names, keys, never rows you excluded
  • The executed query's result rows — capped, sanitised, private text values as AES-256-GCM ciphertext
  • Your hashed API token and token counts for metering
  • Nothing else — no credentials, no connection string, no encryption key

Ten minutes from install
to your first grounded answer.

One package, one wizard, one guarded SELECT per question.