❄️Snowflake Intelligence

Installation Options

There are two ways to set up the Euno Snowflake Intelligence agent:

Method
Best For
Documentation

Terraform Module

Teams with infrastructure-as-code practices

Manual SQL Setup

Quick one-time setup

This page + Setup SQL

Recommended: If your team uses Terraform, we recommend the Terraform Module for easier version control and updates.


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:

  1. 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

  2. Euno Tools (External Functions) & Tool Wrappers

    • euno_instructions: Get detailed instructions in using Euno MCP Server

    • euno_count_resources: Count resources matching a query with optional grouping

    • euno_fetch_single_resource: Retrieve a single resource by URI

    • euno_find_resource_by_name: Find resources by name using similarity matching

    • euno_find_resources_for_topic: Find resources related to a topic using semantic search

    • euno_get_upstream_lineage: Get upstream lineage/dependencies for a resource

    • euno_resrouce_impact_analysis: Analyze downstream impacts of changes to a resource

    • euno_search_resources: Advanced search with EQL or natural language queries

    • euno_documentation_search: Search Euno Documentation

    • euno_documentation_get_full_document: Retrieve full documentation by URL

    • euno_documentation_get_surrounding_context: Get context around a documentation chunk

  3. Snowflake Intelligence Agent

    • Pre-configured agent (EUNO_AGENT) with all four tools

    • Custom instructions optimized for data pipeline queries

    • Budget controls and orchestration settings

  4. Access Control

    • Role-based permissions (EUNO_AGENT_USER) for team access

    • Proper grants for databases, schemas, functions, and warehouses

Required Customizations

Before running this setup script, you MUST customize the following values:

1. Euno Account ID - 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 - REQUIRED

Replace <WAREHOUSE_NAME> with your actual Euno.ai account identifier. Note that this is case sensitive.

To check available warehouses, run:

3. Euno API Key - REQUIRED

circle-info

To obtain an API token, head to Euno -> Click the user card in the bottom of the sidebar -> "Personal API Keys"

Optional Customizations

1. Agent Budget & Limits - 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)

2. Orchestration Model - OPTIONAL

The type of model selected has a direct impact on the speed and accuracy of the results. We suggest choosing leading models, and updating them over time.

Step-by-Step Setup Instructions

Step 1: Prerequisites Check

Before running the setup script, ensure you have:

  1. Account Permissions: You must have the ACCOUNTADMIN role or equivalent privileges to create network rules, secrets, and external access integrations.

  2. Cortex Access: Verify that your Snowflake account has access to Cortex features:

  3. Warehouse Availability: Confirm you have an available warehouse (the script uses CORE by default):

  4. Euno Account Details: Obtain your Euno.ai account ID and API key.

    circle-info

    To obtain an API token, head to Euno -> Click the user card in the bottom of the sidebar -> "Personal API Keys"

Step 2: Prepare the Script

  1. Download or copy the SETUP.sql script.

  2. Open the script in your preferred SQL editor (Snowsight, SnowSQL, or any SQL IDE).

  3. Make the required customizations outlined in the previous section

Step 3: Execute the Setup Script

  1. Connect to Snowflake with an account that has ACCOUNTADMIN privileges.

  2. 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:

  3. Verify Execution: You should see successful completion messages for:

    • Network rule creation

    • Secret creation

    • External access integration

    • Function definitions

    • Agent creation

    • Role and permission grants

Step 4: Verify Installation

Run the following verification queries:

  1. Check the agent exists:

  2. Verify functions are created:

    You should see: euno_api_caller, euno_impact_analysis, euno_sql_planner, euno_ask_data_pipeline, and euno_search_data_pipeline_resources.

  3. Test basic connectivity:

    This should return a JSON response from the Euno.ai API.

Step 5: Grant Access to Users

  1. Switch to ACCOUNTADMIN role:

  2. Grant the agent role to specific users (if not already done in the script):

  3. Verify user access: Have a user log in and run:

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:

  1. Verify you're using the correct role: USE ROLE EUNO_AGENT_USER;

  2. Check grants: SHOW GRANTS TO ROLE EUNO_AGENT_USER;

  3. Ensure ACCOUNTADMIN granted the necessary permissions

Error: "HTTP 401" or "HTTP 403" in function responses

Cause: Invalid or missing Euno.ai API credentials.

Solution:

  1. Verify your account ID is correct in the secret

  2. Contact Euno.ai support to confirm your API key is active

Error: "Warehouse not found"

Cause: The selected warehouse doesn't exist in your account.

Solution: Update the warehouse name in in the setup script 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:

  1. Use a larger warehouse for the agent functions

  2. Increase the seconds budget in the agent specification

  3. Increase the tokens budget if responses are being truncated

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]envelope for technical assistance

Sources

Last updated