Quick Overview
Query Templates are a core safety and efficiency feature in Wobby. They act as guardrails for your AI agents by defining pre-approved SQL queries that can be reused across tasks.
Instead of writing raw SQL every time, agents use these templates to answer data questions in a consistent, secure, and governed way.
What Is a Query Template?
A Query Template is a reusable, parameterized SQL query that has been reviewed and approved for use. Each template contains:
A name and description
A SQL query
Optional parameters (e.g. date range, user ID)
References to specific data tables
Tags for categorization
Version history and approvals
Why Use Query Templates?
✅ Safety
Agents can only use approved queries. This prevents unwanted access or unsafe SQL.
✅ Consistency
Query patterns are standardized across use cases and teams.
✅ Speed
Agents can analyze data quickly without writing new SQL for every task.
✅ Control
Data teams keep oversight over how data is queried.
✅ Auditability
All template activity is tracked—who created it, approved it, and when it was used.
How Templates Fit Into the Agent Workflow
Agents generate SQL when completing analysis tasks.
If the query is useful, it can be saved as a query template.
That template is reviewed and approved by your data team.
Once approved, the agent—and other agents with access to the relevant tables—can reuse the template in future tasks.
Templates are always tied to the data tables they query. If an agent is connected to those tables, it will be able to find and use the template.
Last updated
Was this helpful?