Modern AI agents and Slack bots need timely warehouse data to answer questions, run operations, and complete automated tasks. Direct warehouse access creates unnecessary security and cost exposure, while custom backend routes make every new lookup an engineering project.
Qry gives agents a deterministic API layer for structured data without exposing warehouse credentials or allowing arbitrary SQL execution.
The Scenario
A customer success team uses an AI assistant to monitor client health. The bot needs to answer questions like: “Which accounts in Europe are approaching their usage limits?” or “Who had a spike in bounced emails today?”
The Problem
- Hallucinated Business Logic: Asking an AI to write raw SQL requires it to infer your schema, interpret metric definitions, and choose the correct joins. A mistake can produce plausible but incorrect numbers, while a Qry endpoint uses the model your data team already tested.
- Unpredictable Compute: Letting an agent issue arbitrary warehouse queries makes cost and workload difficult to control, especially when loops repeat the same request.
- Broad Security Exposure: Direct access gives the agent a database connection and more execution freedom than a recurring lookup requires.
The Qry Solution
The data team publishes reviewed SQL or a dbt model with typed parameters, response limits, and an explicit freshness policy. Qry creates a secure endpoint and generates its OpenAPI schema.
The agent reads the schema and requests structured JSON from the latest successful snapshot. Endpoint-scoped keys and request logs make each lookup traceable, while the warehouse remains isolated from agent traffic.