Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion agents/available-connections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,17 @@ agent card for the full list.
/>
<span className="text-lg font-semibold">Supabase</span>
</div>
Supabase is an open‑source Firebase alternative.
Supabase is the PostgresSQL development platform.

<p className="mt-4">
<a
className="underline text-pink-600 font-bold"
href="/agents/connections/supabase"
>
Using Supabase with Hypermode 👉
</a>
</p>

</Card>
<Card>
<div className="flex items-center gap-2">
Expand Down
177 changes: 177 additions & 0 deletions agents/connections/supabase.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
---
title: Using Supabase with Hypermode
sidebarTitle: Supabase
description:
Connect your Hypermode agent to Supabase for real-time database operations
---

<div className="flex items-center gap-3 mb-6">
<img
src="/images/agents/connections/icons/supabase.svg"
alt="Supabase"
width={48}
height={48}
/>
<div>
<h2 className="text-2xl font-bold m-0">Supabase</h2>
<p className="text-gray-600 m-0">
Supabase is the PostgresSQL development platform.
</p>
</div>
</div>

## Overview

In this document you will learn how to connect your Hypermode agent to Supabase,
enabling real-time database operations and interactions.

Bwfore getting started you need to make an account with supabase, you can do

Check failure on line 28 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'Bwfore'?

Check failure on line 28 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'Supabase' instead of 'supabase'.
that here: [Supabase](https://supabase.com/)

![Signup](/images//connections/supabase/signup-supabase.png)

Check failure on line 31 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'Signup'?

Then you need to make a database and go to the settings to make a new API key.

![Create Key](/images/connections/supabase/create-key.png)

This key will become the service key when you connect using Hypermode Agents and
the subdomain will be the projeect id in the URL:

Check failure on line 38 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'projeect'?

Examples: https://supabase.com/dashboard/project/my-project-id/settings/api-keys

Subdomain ID: my-project-id Service Key: --key-from-supabase--

Check failure on line 42 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Avoid first-person pronouns such as 'my'.

Check failure on line 42 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'Supabase' instead of 'supabase'.

Now you have got all you need setup with supabase we can now make our agent in

Check failure on line 44 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'Supabase' instead of 'supabase'.
hypermode.

Creating your supabase agent.

Check failure on line 47 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'Supabase' instead of 'supabase'.

Firslty ensure you have signed up and created a workspace on

Check failure on line 49 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'Firslty'?
[Hypermode](https://hypermode.com/).

Now frmo the threads interfaces, lets manually create a new agent to streamline

Check failure on line 52 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'frmo'?
the process.

You can create agets with either conciege or manually, we will do this manually,

Check failure on line 55 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'agets'?

Check failure on line 55 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'conciege'?
from the UI find the create agent dropdown: ]\

![Find Create Agent](/images/connections/supabase/navigate-create-agent.png)

Then select the "Create new Agent" option, this will open a modal to create your
agent:

![Create Agent](/images/connections/supabase/create-agent-modal.png)

To streanline this process we will use the following settings:

Check failure on line 65 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'streanline'?

Agent Name: SupaAgent Agent Title: Connects to Supabase Description: SupaAgent

Check failure on line 67 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] ': S' should be in lowercase.

Check failure on line 67 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] ': C' should be in lowercase.

Check failure on line 67 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] ': S' should be in lowercase.
issues queries Instructions: You have a connection to Supabase and various other

Check failure on line 68 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] ': Y' should be in lowercase.
developer tools to streamline data access and awareness. Model: GPT 4.1

Check failure on line 69 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] ': G' should be in lowercase.

Once created you will see the agent in the sidebar living and breathing ready to
interact with, take yourself to the agents setting page via the agents icon and
see the profile:

![Agent Profile](/images/connections/supabase/agent-profile.png)

Now navgiate to the connections tab, this is where we will add our supabase

Check failure on line 77 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'navgiate'?

Check failure on line 77 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'Supabase' instead of 'supabase'.
connection.

![Dropdown supabase](/images/connections/supabase/add-supabase-connection.png)

Check failure on line 80 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'Supabase' instead of 'supabase'.

This is where we need to add our supabase connection, click the dropdown and

Check failure on line 82 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'Supabase' instead of 'supabase'.
select "Supabase" from the list, then you will be presented with a Modal, from
here we should take the Domain ID and Service Key we created earlier and paste
them into the relevant fields:

![Supabase Connection](/images/connections/supabase/supabase-connection-modal.png)

Great now you Agent is connected to Supabase, you can now use it to issue
queries and interact with your database.

You can learn more about this supabase connector here:

Check failure on line 92 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'Supabase' instead of 'supabase'.
https://mcp.pipedream.com/app/supabase

<Note>
The supabase connector does not let you modify the schema, for this reason

Check failure on line 96 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'Supabase' instead of 'supabase'.

Check failure on line 96 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'doesn't' instead of 'does not'.
lets manually create the schema for interaction.
</Note>

Lets migrate our database with some movie data, to do this we will need to
navigate back to the supabase workspace and find the query editor, this is where

Check failure on line 101 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'Supabase' instead of 'supabase'.
we can run SQL queries to create our schema and insert data, here is the schema
we will work with:

```sql
-- 1. Movies Table
CREATE TABLE IF NOT EXISTS public."Movies" (
id SERIAL PRIMARY KEY,
title VARCHAR(255) NOT NULL,
year INTEGER
);

-- 2. Actors Table
CREATE TABLE IF NOT EXISTS public."Actors" (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL
);

-- 3. MovieActors Join Table
CREATE TABLE IF NOT EXISTS public."MovieActors" (
movie_id INTEGER NOT NULL REFERENCES public."Movies"(id) ON DELETE CASCADE,
actor_id INTEGER NOT NULL REFERENCES public."Actors"(id) ON DELETE CASCADE,
PRIMARY KEY (movie_id, actor_id)
);
```

![Migrate Supabase](/images/connections/supabase/migrate.png)

![Schema](/images/connections/supabase/supabase-schema.png)

<Note>
The supabase connector does not let you modify the schema, for this reason

Check failure on line 132 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'Supabase' instead of 'supabase'.

Check failure on line 132 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'doesn't' instead of 'does not'.
lets manually create the schema for interaction - you can ask your Agent to
help you build the schema.
</Note>

Finnaly one last step before our agent can understand our db we need to modify

Check failure on line 137 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'Finnaly'?
the system prompt of the agent to include the schema, you can do this by copying
the schema and navigtaing the the agents page pasting in the schema into the

Check failure on line 139 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'navigtaing'?

Check failure on line 139 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] 'the' is repeated!
system prompt, this will allow the agent to understand the schema and issue
queries against it.

![Agent update prompt](/images/connections/supabase/agent-update-prompt.png)

Now we are ready to work with our agent and ou supabase database.

Check failure on line 145 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'we're' instead of 'we are'.

Check failure on line 145 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'ou'?

Check failure on line 145 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'Supabase' instead of 'supabase'.

Testing the connection, its always best to test the connection first, lets ask
it to fetch a list of Movies, note we will have empty mooives but you are

Check failure on line 148 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'mooives'?
looking for success tool call in the chat history.

Try asking in a new thread:

```text
Can you list the movies ?
```

You will see the Supabase select row tool call in the chat history, this is a
good sign that the connection is working and the agent can issue queries against
the database.

![Empty movies](/images/connections/supabase/empty-movies.png)

Now we have all we need to start inserting movies and actors in our database.

Check failure on line 163 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'we've' instead of 'we have'.

Adding a movie:

Try asking in a new thread:

```text
Can you Add the Matrix 1999 and Neo the actor into my Supabase database?
```

![Add Movie](/images/connections/supabase/add-matrix.png)

Thats it your connected, try adding more data, scheming a new schema and reading

Check failure on line 175 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'Thats'?
the data in your instace, finally supabase can be paird well with other

Check failure on line 176 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'instace'?

Check failure on line 176 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Use 'Supabase' instead of 'supabase'.

Check failure on line 176 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'paird'?
connections such as Gthub and Slack and Stripe.

Check failure on line 177 in agents/connections/supabase.mdx

View workflow job for this annotation

GitHub Actions / Trunk Check

vale(error)

[new] Did you really mean 'Gthub'?
6 changes: 5 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@
"agents/work",
{
"group": "Connect Your Agent",
"pages": ["agents/connections", "agents/available-connections"]
"pages": [
"agents/connections",
"agents/available-connections",
"agents/connections/supabase"
]
},
"agents/model-selection",
{
Expand Down
Binary file added images/connections/supabase/add-matrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/connections/supabase/agent-profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/connections/supabase/create-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/connections/supabase/empty-movies.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/connections/supabase/migrate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/connections/supabase/signup-supabase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/connections/supabase/supabase-schema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading