βοΈSnowflake Intelligence
Introduction to Snowflake Cortex Agents
Snowflake Cortex Agents are AI-powered orchestration systems that work across both structured and unstructured data sources to deliver insights. They operate through a sophisticated workflow of planning tasks, executing them through various tools (such as Cortex Analyst for SQL generation, Cortex Search for unstructured data, and custom functions), reflecting on results, and generating intelligent responses based on your enterprise data.
Agents eliminate the need for client-side context management by persisting conversation threads, and they can be configured with custom tools to extend their capabilities. In this setup, we're creating an agent that integrates with the Euno.ai platform to provide comprehensive data pipeline intelligence directly within your Snowflake environment.
What We're Setting Up
This setup script creates a complete Snowflake Intelligence Agent that integrates with Euno.ai's data pipeline platform. Specifically, it configures:
Network Access & Security
External network rule for secure API communication with Euno.ai
Encrypted secrets storage for API credentials
External access integration for controlled egress traffic
Core API Functions
euno_api_caller: Generic HTTP client for secure Euno.ai API communication
Four Specialized Euno Tools
euno_search_data_pipeline_resources: Search for tables, dashboards, schemas, and other pipeline resourceseuno_ask_data_pipeline: Ask natural language questions about your data infrastructureeuno_sql_planner: Get intelligent SQL query planning assistanceeuno_impact_analysis: Analyze downstream impacts of schema changes
Snowflake Intelligence Agent
Pre-configured agent (
EUNO_AGENT) with all four toolsCustom instructions optimized for data pipeline queries
Budget controls and orchestration settings
Access Control
Role-based permissions (
EUNO_AGENT_USER) for team accessProper grants for databases, schemas, functions, and warehouses
Required Customizations
Before running this setup script, you MUST customize the following values:
1. Euno Account ID (Line 17) - REQUIRED
Replace <YOUR_ACCOUNT_ID> with your actual Euno.ai account identifier. You can find this in your Euno.ai dashboard or contact your Euno.ai administrator.
2. Warehouse Name (Lines 197, 204, 211, 218, 237) - CONDITIONAL
The script uses a warehouse named CORE for executing the Euno functions. If you don't have a warehouse named CORE, or if you want to use a different warehouse for cost or performance reasons, update all occurrences to your preferred warehouse name.
To check available warehouses, run:
3. User Grants (Line 240) - REQUIRED FOR END USERS
Uncomment this line and replace your_user_name_here with the actual Snowflake username(s) who should have access to the Euno agent. You can add multiple grant statements for different users:
Optional Customizations
4. Agent Budget & Limits (Lines 126-128) - OPTIONAL
Adjust these values based on your use case:
seconds: Maximum execution time per agent request (default: 300 seconds / 5 minutes)tokens: Maximum token budget per request (default: 16,000 tokens)
5. Agent Profile Customization (Lines 115-119) - OPTIONAL
Customize the agent's appearance in Snowsight:
display_name: The name shown to usersavatar: Icon style (options includeCirclesAgentIcon,HexagonAgentIcon, etc.)color: Visual color theme (purple,blue,green,red, etc.)
6. Database and Schema Names (Lines 3-4) - OPTIONAL BUT NOT RECOMMENDED
While you can change these, it's recommended to keep the standard SNOWFLAKE_INTELLIGENCE.AGENTS naming convention as it aligns with Snowflake's Intelligence suite conventions.
Step-by-Step Setup Instructions
Step 1: Prerequisites Check
Before running the setup script, ensure you have:
Account Permissions: You must have the
ACCOUNTADMINrole or equivalent privileges to create network rules, secrets, and external access integrations.Cortex Access: Verify that your Snowflake account has access to Cortex features:
Warehouse Availability: Confirm you have an available warehouse (the script uses
COREby default):Euno Account Details: Obtain your Euno.ai account ID and API key.
Step 2: Prepare the Script
Download or copy the SETUP.sql script.
Open the script in your preferred SQL editor (Snowsight, SnowSQL, or any SQL IDE).
Make the required customizations outlined in the previous section:
Line 17: Set your Euno account ID
Lines 197, 204, 211, 218, 237: Update warehouse name if needed
Line 240: Add user grants
Step 3: Execute the Setup Script
Connect to Snowflake with an account that has
ACCOUNTADMINprivileges.Run the entire script in a single execution. The script is designed to run top-to-bottom without interruption.
Via Snowsight (Recommended):
Sign in to your Snowflake account and access Snowsight
In the navigation menu, select Projects Β» Worksheets
Click the + button and select SQL Worksheet to create a new worksheet, or use Create Worksheet from SQL File to import the SETUP.sql file directly
If you created a blank worksheet, paste the entire customized SETUP.sql script into the editor
In the worksheet context selector (top right), ensure you're using a role with ACCOUNTADMIN privileges
Select a warehouse to use for execution (any warehouse will work, as the script switches roles internally)
Click Run All (or press Cmd/Ctrl + Enter to run all statements)
Monitor the results pane at the bottom for successful execution messages
Via SnowSQL CLI:
Verify Execution: You should see successful completion messages for:
Network rule creation
Secret creation
External access integration
Function definitions (5 functions total)
Agent creation
Role and permission grants
Step 4: Verify Installation
Run the following verification queries:
Check the agent exists:
Verify functions are created:
You should see:
euno_api_caller,euno_impact_analysis,euno_sql_planner,euno_ask_data_pipeline, andeuno_search_data_pipeline_resources.Test basic connectivity:
This should return a JSON response from the Euno.ai API.
Step 5: Grant Access to Users
Switch to ACCOUNTADMIN role:
Grant the agent role to specific users (if not already done in the script):
Verify user access: Have a user log in and run:
Step 6: Interact with the Agent
Users can now interact with the Euno agent through multiple interfaces:
Option 1: Snowsight UI
Navigate to AI & ML οΏ½ Agents in Snowsight
Select EUNO_AGENT from the list
Start asking questions like:
"What tables are in my production database?"
"Show me dashboards that use the users table"
"Help me write a SQL query to get monthly revenue"
"What would be impacted if I rename the customer_id column?"
Option 2: SQL Interface
Option 3: Direct Function Calls
Troubleshooting
Error: "Network rule validation failed"
Cause: Your Snowflake account may not have egress access enabled or there's a firewall blocking outbound connections.
Solution: Contact your Snowflake account administrator to enable external network access. Verify that api.app.euno.ai is allowed in your organization's network policies.
Error: "Object does not exist, or operation cannot be performed"
Cause: Missing permissions or incorrect role assignment.
Solution:
Verify you're using the correct role:
USE ROLE EUNO_AGENT_USER;Check grants:
SHOW GRANTS TO ROLE EUNO_AGENT_USER;Ensure ACCOUNTADMIN granted the necessary permissions
Error: "HTTP 401" or "HTTP 403" in function responses
Cause: Invalid or missing Euno.ai API credentials.
Solution:
Verify your account ID is correct in the secret
Contact Euno.ai support to confirm your API key is active
Error: "Warehouse not found"
Cause: The CORE warehouse doesn't exist in your account.
Solution: Update the warehouse name in all tool_resources sections (lines 197, 204, 211, 218) to an existing warehouse in your account.
Agent responses are slow or timing out
Cause: Warehouse size may be too small, or budget limits are too restrictive.
Solution:
Use a larger warehouse for the agent functions
Increase the
secondsbudget in the agent specification (line 127)Increase the
tokensbudget if responses are being truncated (line 128)
Cannot see the agent in Snowsight
Cause: Database role SNOWFLAKE.CORTEX_USER not granted.
Solution: The script includes this grant (lines 225-226), but verify with:
If missing, run:
Additional Resources
For more information about Snowflake Cortex Agents, refer to the official documentation:
For Euno.ai-specific support:
Contact your Euno.ai account representative
Visit the Euno.ai documentation portal
Email [email protected] for technical assistance
Sources
Last updated