How to Connect Supabase to an AI Agent Step by Step
· DoubleX
Quick answer
To connect Supabase to an AI agent, open the Connectors screen in DoubleX Agentes, add Supabase, and authorize it with the right account. Then choose which actions the agent can run, keep data-changing actions off at first, and test with a read-only request before allowing anything more.
Supabase holds the data behind many products: tables, migrations, edge functions. Connecting it to an AI agent lets your team ask questions about that data in plain language. The risk is giving the agent more power than it needs, so this guide focuses on who authorizes the connection, which actions you allow, and how to test safely.
What can the Supabase connector let an agent do?#
The Supabase connector lets an agent manage projects, databases, migrations, and edge functions. A connector is a system linked to the platform; the agents you choose use its tools.
That range includes actions that only look and actions that change things. You decide which ones each agent gets.
| Task | How the agent helps | Type of action |
|---|---|---|
| Check what tables exist in a project | Reads the structure and summarizes it | Read |
| Answer a question about your data | Queries the database and explains the result | Read |
| Review pending migrations | Lists them and flags what to double-check | Read |
| Apply a migration | Runs it after you confirm | Changes data |
| Update an edge function | Edits it after you confirm | Changes data |
What should you prepare before connecting?#
Before connecting, you need a DoubleX Agentes account, a Supabase account with access to the project, and a decision about who will authorize the connection. If you are new to the platform, the Quickstart covers account creation, which is free and needs no credit card.
Check these items first:
- The Supabase project the agent should work with.
- A person whose Supabase access matches what the agent should be able to reach.
- A clear first goal, such as "answer questions about customer records", so you know which actions to allow.
- Whether this is a test project or production. If you can, start with the test one.
How do you connect Supabase on the Connectors screen?#
You connect Supabase from the Connectors screen by adding it and authorizing access with your Supabase account. Then you attach it to the agent that will use it.
- Sign in to DoubleX Agentes and create the agent, or use the diagnostic to get a team of agents with your company's instructions already in place.
- Open the Connectors screen and choose Supabase.
- Pick the scope of the connection: personal, team, or company.
- Authorize access with the Supabase account you prepared. Credentials and tokens are stored encrypted with AES-256-GCM.
- Open the agent on the Agents screen and add the Supabase connector to it.
- Set the allowed actions, as described in the next section.
Developers can also manage connectors through the API; see the Connectors API reference.
How do you limit the agent to read actions and require confirmation?#
For each agent, you choose which systems it uses and, within each system, which actions it may run. Turn off the actions that change data and leave only the ones that read.
In practice:
- Enable listing and querying actions for the Supabase connector.
- Leave migrations, edge function changes, and other write actions off for now.
- Keep in mind that before sending, deleting, or changing anything in your systems, the agent asks for confirmation and shows the steps it took.
When you later need write access, enable only the specific action, ideally on a test project first. Roles (owner, administrator, member) and team sharing also control who can edit the agent's permissions.
How do you test the connection with a first request?#
Test with a request that only reads. Open the agent and ask something simple that proves it can reach your project without touching any data.
Examples you can copy:
- "List the tables in my Supabase project and describe what each one seems to store."
- "How many rows does the customers table have right now?"
- "Show the most recent migrations and tell me if anything looks unfinished."
- "List the edge functions in this project and what each one does."
If the agent answers with real names from your project, the connection works. If it reports an access error, go back to the Connectors screen and check that the authorization is still valid and the connector is attached to this agent.
Once you trust the setup, you can move to routines. The guide Supabase with an AI agent: example requests and routines shows what to ask for next.
What should you check in the task history after the test?#
Every request becomes a task on the Tasks screen, with the full history: the request, each tool the agent used, and the result. Open the test task and confirm three things:
- The request was what you typed and who asked for it is correct.
- The tools used were only reading ones. No write action should appear.
- The result matches what you see in Supabase itself.
This record is also your audit trail later, when the agent runs on a schedule. Routines run with the permissions of the person who created them, so create them from an account that has only the access you intend.
Frequently asked questions#
Can the agent change my database by default?#
Only if you allow it. You choose the actions per agent and per system, and data-changing actions can stay off so the agent is read-only. Even when enabled, the agent asks for confirmation before altering anything.
Is my Supabase data used to train AI models?#
No. Your company's content is not used to train models, and requests only go to AI providers that do not use what they receive for training. You can also choose zero-retention providers on the Models screen.
Should I connect a production or a test project first?#
Start with a test project when you can. Run the read-only test there, then connect production with the same limited permissions.
Who can see what the agent did?#
The task history records the request, every tool used, and the result, so you can see who asked, what was done, and when.
Can I connect other tools alongside Supabase?#
Yes. An agent can use several connectors, such as Google Sheets or Slack, with separate permissions for each. For other connection examples, see how to connect Jam to an AI agent.
Related guides
- How to Connect Box to an AI Agent: Step-by-Step GuideLearn how to connect Box to an AI agent: set up the connector, limit it to read-only, choose who can use it, and check the history of your first request.
- How to Connect Jam to an AI Agent: Step-by-Step GuideLearn how to connect Jam bug reports to an AI agent in DoubleX Agentes: set up the connector, pick who can use it, limit permissions, and run a first test.