PlanetScale released Insights Agent, which writes database fixes as PRs
PlanetScale released Insights Agent, which turns slow queries and schema problems into pull requests. It runs on a schedule or on demand and connects to one GitHub or Cursor Origin repository per database.

Image: PlanetScale
Why it mattersA database team gets slow-query fixes as pull requests, instead of a dashboard with no owner. The agent reads the code and the data together.
PlanetScale released Insights Agent on 17 November, on its blog. The post is signed by Elom Gomez and Enrique Gonzalez. The agent sits inside PlanetScale Insights, which already shows slow queries and schema problems. The new piece is that the agent now writes the fix as a pull request against the application code.
The agent runs in two modes at launch. A schema recommendation run reads the database shape and query patterns. A slow query run picks a slow query and works on that. PlanetScale says a run can be started on demand or scheduled. The agent opens pull requests against a GitHub repository or a Cursor Origin repository. A team then reviews and merges or closes each one.
One repository per database at launch
PlanetScale writes that "only one GitHub or Cursor Origin repository can be connected to a database" at launch. The same repository can connect to several databases. Two code bases that share a database are out of scope for now. A monorepo with every service in it is in scope, as a single repository.
The company gives no customer figures. It gives no numbers for how long a run takes. It gives no numbers for how often a PR is accepted. It gives no numbers for how many problems the agent can find. A reader has to take the shape of the product on PlanetScale's word. The output needs to be measured on their own database.
Pricing is by token, per completed run
PlanetScale states the pricing rule in one line: "Runs are only charged if they work to completion." Costs are per-run, added to a monthly bill. The price is based on tokens used in the investigation and the pull request. An organisation can set a spend limit. A run that fails costs nothing. PlanetScale gives no price per token or price per run.
Two things are new in this shape. The agent reads the application code and the database together. A slow-query dashboard sees SQL and index statistics only. It does not see the ORM code that wrote the SQL. The agent writes to code, so the result exists after the agent stops. A dashboard entry about a slow query goes stale when the next deploy changes the query shape.
A database team that uses Insights today gets PRs in a review queue. A team that wants to try this against a different vendor's database has to wait. The agent only works against a PlanetScale database. The repository and the database both live under one PlanetScale organisation.
The pattern is one that other agent products are also trying. Microsoft, Anthropic and GitHub each describe a coding agent that watches a system. The agent opens a pull request when it sees a problem. PlanetScale's version is narrower. It knows exactly one thing, which is database performance. It has read access to both the queries and the code that produces them. The narrower the agent, the less surface it has to get wrong.
Source
Introducing Insights Agent, PlanetScale.
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.

