Guide · Doing
Review an agent's proposal
Read this when an agent connected to Seqora has proposed a schema change and a toast says so.
An agent never runs DDL. It sends ordinary SQL to propose_change, and Seqora turns it into a
design on the live schema and checks it. The change reaches the database only when you apply it
here. Proposal review is Pro. Giving an agent Propose access is on
Connect an AI agent.
What a proposal is
A proposal is a schema change, stored in Seqora as a design with numbered revisions. In 0.6.1
that is the only kind. On PostgreSQL the agent may send CREATE TABLE, ALTER TABLE,
CREATE INDEX, DROP INDEX, RENAME and COMMENT. Anything else is refused, by statement,
line and column, to the agent.
Say an agent was asked to make the web orders report faster. It calls propose_change with
schema set to commerce, the title Index for web orders, and:
CREATE INDEX orders_channel_placed_idx ON commerce.orders (channel, placed_at DESC);
Seqora applies that to commerce.orders as it is now, runs the design and read-only data
checks, and tests the index with check_index. The agent gets the change list as c1, c2,
the checks and a seqora://proposal/ link, and can fix its own blockers with
revise_proposal before you look.
Open it
- Click
Reviewon the toast. AfterLater, the proposal waits underProposalsin the sidebar, which appears once a proposal exists.Open proposal…in the command palette and the agent'sseqora://proposal/link open the same tab. - Read the header: the client's maker mark and name, the title, the counts, and a button per
revision,
r1,r2. The trail under it lists each revision with its author, time and blocker count, then what you did.
The toolbar shows the connection with a lock, because the tab never writes. When Seqora found a migrations table, a chip names the tool and its newest migration.
A row a later revision fixed carries fixed in r2. The SQL on the right is the script Seqora
compiled from the design, not the agent's text.
Read the changes, the SQL and the locks
- Read the rows. They are grouped by table, with the table's row estimate, or
newfor a table the agent creates. A blocker or a warning sits at the end of its row with a short label. Hover it for the whole sentence. - Read the script. Click a statement to select its rows, or a row to light its statements.
- Read
Before you apply. Blockers come first, then each warning with a checkbox, thenSnapshot ·and the connection's name.
For the index above, the row for orders carries
Statement 1 blocks writes to commerce.orders while the index builds. The tooltip says how
many rows are read and gives the CREATE INDEX CONCURRENTLY form to run outside the
transaction instead. Had check_index found the index unneeded, the row would also warn
index not needed.
See it on the diagram
- Click
Diagramin the toolbar.
The canvas opens framed on the tables the proposal touches. What the agent proposes is dashed and hatched in the agent color, and each new or changed table carries the client's mark and name. Click a table or a column to select its rows and statements. The ER diagram tab itself does not show proposals.
Apply it, approve it or send it back
- Untick a row to leave that change out. Its statements stay in the script, struck through. Changes that depend on it, such as a new table's indexes, are left out with it. Leaving out a blocked change unblocks the rest.
- Pick one way out:
Review and applyopens the review dialog design mode uses: the data checks, a snapshot, a dry run, the typed database name on production, then the apply. The proposal becomesApplied. See the review dialogs.Approve for migrationstores the SQL for the agent to write as a migration file. It waits until every warning inBefore you applyis ticked. The proposal becomesApproved.Send backneeds aNote for the agentor a left-out change. The proposal becomesSent back.
Approve for migration is the primary button when Seqora found a migrations table, and
Review and apply when it didn't. Both wait while there are blockers, and their tooltip says
Fix 1 blocker. Proposal actions holds Discard, and Edit in designer, which opens the
design workbench. Saving there makes a revision authored by you.
What the agent sees afterwards
Seqora sends nothing to the agent. It learns what you did the next time it calls
get_proposal: the status, your note, the changes you left out as c1, c2, the checks, the
DDL it sent last, and the approved SQL once you approve. A revision replaces the whole DDL.
Seqora applies it to the schema as it is then, and says so when the live schema changed in
between. A revision that arrives while the tab is open adds its button with a dot, and the view
stays on the revision you are reading. Applied and discarded proposals can't be revised.
Caveats
- The agent receives the change list, the checks with their messages, including what the read-only data checks found, and the SQL. It sends them on to the model it runs on. Seqora's server is a local pipe and sends nothing elsewhere.
- On Free a proposal is saved locked, and the agent is told "Seqora Pro is needed to create proposals." Opening it shows the upgrade panel.
- The proposal tools build each revision in Seqora's window. When Seqora isn't running,
seqora mcpstarts it with the window hidden. - Proposals take PostgreSQL and SQL Server.
check_indexverdicts are PostgreSQL only. Data checks skip tables of more than 5,000,000 estimated rows and saynot scanned. The review dialog can still run them. - An approved proposal stays
Approvedafter its migration runs. Seqora 0.6.1 does not match the migration back to it. - Older revisions are read-only. Proposal tabs are not reopened after a restart.