Database access for agents
Your coding agent can read and change app data, with a confirm step for big changes.
Built on PostgreSQL
Plans: Every plan, including the free app
What you get
- Every table and column, listed for planning
- SQL queries with the results as JSON
- Changes to existing data previewed before they run
- A confirm code for updates and deletes
- A restore point before every confirmed change
- Every query recorded in the audit log
- A setting to turn it off for the business
How it works
Your coding agent runs whisk db schema and whisk db query from its terminal. The SQL runs on Whisk's side as the app's own PostgreSQL login, so no database password or open port leaves the platform. Each call is one transaction with a time limit.
Reads and new rows run at once. SQL that would change or remove existing data is run, measured and rolled back. The agent gets back what it would do, table by table, with a short-lived confirm code.
Running it with the code takes a restore point first. The SQL then runs again only if its effect matches the preview, and every query is kept in the audit log. People can use the same checks at a prompt with whisk db shell, part of the open-source (MIT) Whisk CLI.
Example
A food service distributor asks its agent to fix customer records that have no delivery day. The agent previews the update, which shows the rows it would change in the customers table, and runs it once the operations manager agrees.
For your coding agent
whisk db schema --json whisk db query "<select query>" --json whisk db query "<update query>" --json whisk db query --confirm <code>
The first update answers CONFIRM_REQUIRED with its effect and a code. Every flag is in the CLI reference.