Supabase Integration
Connect Supabase to Brief so your AI agent can query your product database and answer questions with real data.
Supabase gives Brief direct access to your product data. Instead of manually pulling reports, ask your agent questions like "how many users signed up this week?" or "what's our most active feature?" and get answers backed by real data.
What can Brief do with Supabase?
- Query your data — Ask natural language questions, get SQL-backed answers
- Explore schema — List tables, describe columns, understand your data model
- Run analytics — Aggregations, counts, trends, and ad-hoc analysis
- Table-level access control — Admins choose exactly which tables the agent can see
Which database should I connect?
We strongly recommend connecting a read replica or analytics database rather than your production instance. This is the same best practice used with BI tools like Metabase, Looker, or Mode.
Benefits of using a read replica:
- Zero risk to production — Even in a worst-case scenario, production data is unaffected
- No performance impact — Queries don't compete with your application's traffic
- Standard practice — Same setup you'd use for any analytics or BI tool
If you don't have a read replica, Supabase makes it easy to create one from your project dashboard under Settings → Database → Read Replicas.
How do I set up this integration?
Initial sync: Instant (no background sync needed)
Updates: Real-time queries on each use
Steps
Part 1: Connect your Supabase account
- Go to Settings → Integrations in Brief
- Find Supabase and click Connect
- You'll be redirected to Supabase to authorize Brief
- Review the permissions and click Authorize
Part 2: Select your project
- After authorization, you'll see a list of your Supabase projects
- Select the project you want Brief to query (we recommend a read replica)
- Click Next: Choose Tables
Part 3: Choose which tables to expose
- You'll see all tables in the selected project
- Uncheck any tables you don't want the agent to access
- Click Connect
- Done! Your agent can now query the selected tables.
What permissions does Brief request?
Brief uses Supabase's OAuth to authenticate. The authorization includes:
| Permission | What it does | Why Brief needs it |
|---|---|---|
| Database Read | Read table schemas and column types | Lets the agent understand your data model |
| Database Write | Execute SQL queries via the Management API | Required by Supabase for any SQL execution, even read-only queries |
Security model
Brief applies three layers of protection:
- Statement validation — Queries are parsed and only
SELECT,WITH(CTE), andEXPLAINstatements are allowed.INSERT,UPDATE,DELETE, andDROPare rejected before they reach your database. - Read-only transactions — All queries execute inside a read-only Postgres transaction. Even if a write statement somehow passed validation, the database itself would reject it.
- Table allowlist — The agent can only query tables your admin explicitly approved during setup. Queries referencing other tables are blocked.
How does it work in chat?
Once connected, your agent can answer data questions directly:
You: How many users signed up this month? Agent: runs SELECT count(*) FROM public.users WHERE created_at >= '2026-03-01' You had 847 new signups this month, up 12% from February.
The agent discovers your database through Brief's skill system — it won't see database tools until the conversation is relevant, keeping context focused.
Managing connections
Adding more projects
Go to Settings → Integrations, find Supabase, and click Add Project to connect additional databases.
Changing table access
To modify which tables are accessible:
- Go to Settings → Integrations
- Find the Supabase project you want to modify
- Click the settings icon
- Update the table selection
- Save
Disconnecting
To remove a Supabase project:
- Go to Settings → Integrations
- Find the project and click Disconnect
Common Issues
"SQL execution requires additional permissions"
Cause: Your Supabase connection was authorized without the database query scope. Fix: Disconnect and reconnect Supabase. The updated authorization flow will request the necessary permissions.
Agent says "I can see tables but can't query data"
Cause: Same as above — the agent can read schema (which needs fewer permissions) but can't execute queries. Fix: Reconnect Supabase from Settings → Integrations.
"Access denied: table not in the allowed list"
Cause: The table you're asking about wasn't selected during setup. Fix: Update the table allowlist in Settings → Integrations → your Supabase project.
Queries are slow
Cause: Complex queries on large tables, or querying a production database under load. Fix:
- Use a read replica instead of production
- Ask more specific questions (the agent will use
LIMITand targetedWHEREclauses) - Results are automatically truncated to prevent context overflow
What's Next?
Now that Supabase is connected:
- Connect PostHog — Complement database data with event analytics
- Connect Linear — Cross-reference user data with your roadmap
- View Integrations — See all available integrations