AI Agents
Specialized AI assistants configured with business context, security rules, and domain expertise.
🤖 What Are AI Agents?
AI Agents are specialized versions of the query engine that:
- Understand context: Know your business metrics, terminology, and data relationships
- Enforce security: Only access authorized tables and columns
- Optimize queries: Generate efficient SQL based on your schema
- Provide insights: Analyze trends and suggest actionable recommendations
🎯 Agent Types
📊 General Data Analyst
Best for: Ad-hoc analysis, exploration, general queries
Capabilities:
- Cross-functional analysis
- General statistical queries
- Data exploration
- Multi-table joins
Example Questions:
- "Show me top customers by revenue"
- "What's the trend in user signups?"
- "Compare metrics across regions"
📈 Sales Performance Analyst
Best for: Revenue tracking, sales pipeline, deal analysis
Business Context:
- Fiscal year, quota periods
- Product lines and pricing
- Sales territories
- Commission structure
Example Questions:
- "Show me Q4 pipeline by stage"
- "Which reps are below quota?"
- "Average deal size by product"
🎯 Marketing Campaign Analyst
Best for: Campaign performance, attribution, ROI
Business Context:
- Marketing channels
- Campaign lifecycle
- Attribution models
- Customer journey stages
Example Questions:
- "ROI by campaign channel"
- "Cost per acquisition trends"
- "Email conversion rates"
💰 Financial Data Analyst
Best for: Financial reporting, budget analysis, forecasting
Business Context:
- Fiscal periods
- Cost centers
- Budget categories
- Revenue recognition rules
Example Questions:
- "Budget vs actual by department"
- "Cash flow projections"
- "Cost breakdown analysis"
⚙️ Operations Analyst
Best for: Process efficiency, resource utilization, KPIs
Business Context:
- Process workflows
- SLAs and targets
- Resource allocation
- Efficiency metrics
Example Questions:
- "Average fulfillment time"
- "Resource utilization rates"
- "Process bottlenecks"
📱 Product Analytics Specialist
Best for: User behavior, feature adoption, engagement
Business Context:
- User actions and events
- Feature flags
- Product roadmap
- Engagement metrics
Example Questions:
- "Feature adoption by cohort"
- "User retention rates"
- "Most used features"
🔧 Agent Configuration
System Prompt
The system prompt gives agents business intelligence:
Example - Sales Agent:
You are a sales performance analyst for Acme Corp.
Key Metrics:
- Revenue, ARR, MRR
- Deal size, win rate, sales cycle
- Pipeline coverage, velocity
Business Rules:
- Fiscal year: January 1
- Quota period: Quarterly
- Product lines: Enterprise ($50K+), Pro ($10K+), Starter ($1K+)
- Regions: Americas, EMEA, APAC
When analyzing:
1. Include time comparisons (MoM, YoY, QoQ)
2. Segment by region and product
3. Highlight trends and anomalies
4. Provide actionable insights
Data Source Assignment
Each agent connects to ONE data source:
- Production database
- Analytics warehouse
- Specific application DB
Table Access Control
Select which tables the agent can query:
- ✅ customers
- ✅ orders
- ✅ products
- ✅ sales_reps
- ❌ internal_admin
- ❌ employee_salaries
Column Permissions
Hide sensitive columns even in allowed tables:
Hidden: ssn, credit_card, internal_notes
👥 User Assignment
Control which users can use which agents:
Assignment Strategies
By Department
Sales team → Sales Agent
Marketing team → Marketing Agent
By Role
Analysts → All agents
Managers → Department-specific
By Data Access
Match agent permissions to user data access rights
Multi-Agent
Power users get access to multiple specialized agents
🎓 Best Practices
✅ Do's
- Specific context: Include business metrics, terminology, and rules
- Clear scope: Define what the agent should focus on
- Least privilege: Only grant necessary table/column access
- Actionable insights: Prompt agents to provide recommendations
- Regular updates: Keep prompts current with business changes
❌ Don'ts
- Generic prompts: "You are a helpful assistant" is too vague
- Over-permissive: Don't grant access to all tables
- Ignore security: Always hide PII and sensitive data
- One-size-fits-all: Create specialized agents for different use cases
📊 Agent Performance
Specialized agents generate better queries because they:
🎯 Understand Context
Know your metrics and terminology
🔍 Optimize SQL
Use appropriate indexes and joins
📈 Suggest Insights
Proactively identify trends
🔒 Enforce Security
Automatic data access control
🔄 Agent Management
Creating Agents
- Navigate to Agents
- Click "+ New Agent"
- Select agent type template
- Configure system prompt
- Assign data source
- Set table/column permissions
- Activate agent
Editing Agents
- System prompt: Update business context
- Permissions: Add/remove table access
- Status: Activate/deactivate
Cloning Agents
Create variations for different teams:
- Click agent to clone
- Select "Clone"
- Modify name and settings
- Assign to different users
🚀 Advanced Use Cases
Multi-Agent Workflows
Use different agents for different stages of analysis:
- Exploration Agent: Broad access for initial investigation
- Specialized Agent: Deep dive into specific area
- Reporting Agent: Standard metrics and dashboards
Agent Hierarchies
Executive Agent
├── Limited high-level metrics
└── Cross-functional view
Department Agents
├── Sales Agent (sales data)
├── Marketing Agent (campaign data)
└── Finance Agent (financial data)
Analyst Agents
└── Full access for data team