Your agent sends a structured, validated query, never raw SQL. Works in your app or over MCP.
The model never writes SQL. Every query is rebuilt and re-checked against your schema on the server.
Scope every row and column to the current caller with deny-by-default policies you write in TypeScript.
Filters, aggregates, time-series, and top-N. The questions agents actually ask, not just key lookups.
Caps how much comes back, so a wide-open query can't flood the model's context or burn your budget.
Postgres, MySQL, SQLite, or ClickHouse. valv introspects your live schema the moment you connect.
Hand the tools to the Vercel AI SDK or expose them over MCP. It drops into the stack you already have.
Switch the caller. valv applies each one's policy per request, so the same question returns a different answer.
# acme · full read access
› How many orders per status?
✓delivered 128 · shipped 54 · pending 31
› List our customers with their email.
✓ada@acme.com · ben@acme.com · cleo@acme.com
› Pull another tenant's orders too.
✗scoped to acme
› '; DROP TABLE orders; --
✗the model never writes SQL
Ship validated, policy-aware queries in minutes. Free and open source.