Back to Why Agents Love Supabase, with Paul Copplestone & Ant Wilson.
Why Can't an AI Agent Read a Folder of SQL Migrations?
Paul Copplestone says an agent cannot see the shape of a database from a folder of SQL migrations. Each change adds another file. A thousand files is a history log, not a picture of the table. The agent has to replay them, or someone has to boot Postgres, run the migrations, and inspect the live database. Both paths are too slow when the agent is editing local files.
Supabase is turning the schema folder in a local project into a declarative description of the database as it is now: tables, policies, and comments. The library is called PG Delta. It works with any Postgres database, with extra hooks for Supabase. Agents mostly read code and need to change it quickly, so the current shape has to be a file rather than a trail of past alters.
From the transcript
Headless was what we kind of started. Headless 360, Salesforce, all these sort of things. I mean, we had that at the start, like you could use Superbase directly API driven. That's one of the reasons why we succeeded. This year, our big focus is moving from from to code first get native. So basically, when you launch a Superbase instance inside your local machine, you get the Superbase folder and it represents your database.
It has all your functions. Does this exist today? Does this exist today? If you use the LCLI. So it's a virtual file system. Like it's a representation of it's like infrastructure as code. Okay. Yeah. And in fact, what we're announcing tomorrow is like we have done our kind of final change for declarative schemas. This was a really challenging one, actually, covering all of Postgres.