Skip to main content

supabase

Give an app a real Postgres database with one tool: run_sql executes SQL - CREATE TABLE, inserts, queries - against the app's managed Supabase instance. For connecting to an external database you already run, use database instead.

Exact tools and parameters

catalog.describe_module supabase returns the real tool and every parameter, from the live registry.

Tool, at a glance: run_sql.

Gotchas​

  • This is the module for the app's own managed database. Don't reach for it to talk to a customer's external DB - that's database.
  • Describe the schema you expect in the prompt so the agent writes correct SQL instead of guessing table and column names.

A working app​

Compiles as-is. The brain uses a Digitorn gateway model (the default - no API key of your own needed); see the note below to use your own key or a local model instead.

yaml
app:
app_id: supabase_app
name: Supabase App
runtime:
entry_agent: main
agents:
- id: main
system_prompt: |
Manage the app's Supabase database: run SQL to create tables and query
data. Confirm the schema before writing.
brain:
provider: openai
backend: openai_compat
model: mimo-v2.5-free # a model the Digitorn gateway serves
config:
api_key: placeholder # ignored in gateway mode
tools:
modules:
supabase: {}
capabilities:
grant:
- module: supabase
tools: [run_sql]
  • database - connect to an external database you host