LLM Safe SQL

•

Validates LLM-proposed database `UPDATE` and `DELETE` statements by executing them in a transaction, measuring actual changes, rolling back, and requiring human approval based on measured facts.

This tool addresses the critical safety gap in AI agents with database access, where a human often approves an LLM's *description* of its proposed SQL changes rather than the *actual* impact. LLM Safe SQL works by taking an LLM-generated `UPDATE` or `DELETE` statement, running it within a database transaction, meticulously measuring the real 'before' and 'after' states, and then always rolling back. It presents these measured changes as a "confirmation card" to a human for approval. Only after explicit human confirmation is the statement committed for real, ensuring that database modifications are based on verifiable facts rather than predictive guesses or potentially misleading summaries from the AI model. This robust human-in-the-loop mechanism provides strong guardrails against unintended or malicious database alterations for MySQL, PostgreSQL, and SQLite.

주요 기능

01Always rolls back dry-run transactions to prevent unintended changes.
02Enforces human-in-the-loop approval based on measured facts, not model claims.
03Measures and displays actual 'before' and 'after' database states for human review.
04Implements robust guardrails against unsafe operations (e.g., INSERT, JOIN, missing WHERE, non-transactional tables).
05Performs transactional dry-runs of LLM-proposed UPDATE/DELETE statements.
060 GitHub stars

사용 사례

01Safely integrate large language models (LLMs) with sensitive database write operations.
02Provide secure human oversight for AI-driven database modifications and data governance.
03Automate robust SQL statement validation for UPDATE/DELETE operations in development, staging, and production environments.