API referenceConsole
Cloud provider
Polylane reads your Supabase logs, health and advisor findings, traces a failure to the layer that broke, and writes the fix. It never touches your rows.

Connect

Connect Supabase from the terminal. Pass --help for the flags Supabase accepts, plus --no-browser for headless environments.

Terminal
polylane cloud connect --provider supabase

How it works

Resources in the context graph

Polylane maps each project of the organization, with its databases and read replicas, connection pooler, Auth, Storage, Realtime and REST services, edge functions, database branches, storage buckets, custom domains, secrets and network restrictions. For a secret, Polylane stores the name only. Polylane syncs every 15 minutes, and refreshes the OAuth token when it expires.

Anomaly detection

Each project, database, edge function and bundled service gets its own monitor. Polylane reads the service logs through the Supabase Management API and makes series from them: Postgres errors and log volume, edge function invocations, errors and execution time, Auth errors, REST 5xx errors and API gateway 5xx errors. Polylane compares each series with its usual level, and opens an issue when a change is a real problem.

What agents can do

During an investigation, agents read the service logs of a project: API gateway, edge functions, Postgres, Auth, Storage and Realtime. They read the live health of the database, REST, Auth, Storage and Realtime services, and the security and performance advisor findings of a project.

Agents never query your database. Polylane blocks the Management API endpoints that run SQL, return API keys, secret values or Auth settings, or create database credentials.

Agents can request other changes through the Management API, such as a change to an edge function or a branch. The account is read-only by default, and each change needs safety review and approval before it runs.

Personal access token

To connect with a long-lived token instead of OAuth:

  1. In Supabase, go to Account → Access Tokens.
  2. Click Generate new token and copy the token. It starts with sbp_.
  3. Paste the token into Polylane. If your account can open more than one organization, also give the slug of the organization to connect.
  4. Polylane checks the token and starts the first sync.

Troubleshooting

"Invalid access token" error

  • Check that the token is not revoked in the Supabase account settings.
  • A personal access token has the permissions of your account. Make sure your account can open the organization.

"Multiple Supabase organizations are reachable" error

  • The credentials can open more than one organization, so name the organization to connect.
  • With OAuth in the console, select the organization when Polylane asks after authorization.
  • With the API, set the organization field to the slug of the organization.

Missing resources

  • The first sync can take a few minutes.
  • Polylane lists paused projects, but syncs their edge functions, branches and buckets only while the project is active.
  • Click Sync in the account header to sync again.

Disconnecting

Disconnecting does not change Supabase. Revoke the OAuth grant or the personal access token in your Supabase account settings.

Disconnect

Disconnecting stops every sync and check and deletes the credentials Polylane held. Polylane removes what Supabase's API lets it remove. The following stays until you remove it yourself:

  • OAuth grant
Terminal
polylane cloud disconnect <id>

Tools

4

Operations agents can perform in threads.

supabaseApi
Call any Supabase Management API endpoint that lacks a dedicated tool
supabaseGetLogs
Get Supabase service logs for a project: API gateway, edge functions, Postgres, Auth, Storage, or Realtime
supabaseGetAdvisors
Get Supabase security and performance advisor findings for a project
supabaseGetProjectHealth
Get the live health of a Supabase project's bundled services (database, REST, Auth, Storage, Realtime)

Supported resources

13

Resource types that show up in your infrastructure graph.

Project
Postgres Database
Connection Pooler
Edge Function
Database Branch
Storage Bucket
Auth Service
Storage Service
Realtime Service
REST API
Custom Domain
Secret
Network Restrictions