For AI-generated SQL, I'd start with a read-only transaction and statement_timeout. A harmless-looking SELECT can still tie up your database with a spectacularly expensive join.
An AI agent times out while sending an invoice.
It retries. Now the customer has two invoices.
The timeout never told you whether the first request succeeded.
Please use idempotency keys before giving agents access to anything involving money.