cortex-agents-tutorial

Teach engineers to build and deploy Snowflake Cortex AI agents with semantic views and search services.

4|8|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/Snowflake-Labs/sfguides --skill cortex-agents-tutorial
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cortex-agents-tutorial
Source: https://github.com/Snowflake-Labs/sfguides/tree/main/cortex-agents-tutorial
Command: npx skills add https://github.com/Snowflake-Labs/sfguides --skill cortex-agents-tutorial

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This tutorial helps teams build and deploy Snowflake Cortex Agents that orchestrate across structured and unstructured data, removing friction when creating production-ready AI assistants that query databases and document stores.

Core Features & Use Cases

  • Guided, step-by-step lessons to set up environment, sample data, semantic views, and search services.
  • Full agent specification examples showing CREATE AGENT with tools, tool_resources, and required execution_environment for Cortex Analyst.
  • End-to-end testing and parsing using DATA_AGENT_RUN and Python examples to surface thinking, generated SQL, and tool results.
  • Comprehensive references and troubleshooting covering common errors, permissions, and performance best practices for retail and documentation RAG scenarios.

Quick Start

Start the tutorial and follow the guided steps to create semantic views, a Cortex Search service, and a CREATE AGENT specification that routes queries between Analyst and Search.

Frequently Asked Questions about cortex-agents-tutorial

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Snowflake Cortex AI agent that queries both structured data and unstructured documents?

Build Snowflake Cortex AI agents by creating semantic views for structured data and Cortex Search services for unstructured documents, then using a CREATE AGENT specification to orchestrate queries across both data types.

What do I need to set up before deploying Cortex Agents in my Snowflake account?

Deploying Cortex Agents requires a Snowflake account with Cortex AI enabled, ACCOUNTADMIN role for environment setup, and a configured warehouse for execution, along with properly defined tool_resources and execution_environment blocks.

How does Cortex agent orchestration route text-to-SQL queries between Cortex Analyst and Cortex Search?

Cortex agent orchestration routes text-to-SQL queries by using an agent specification that directs structured retail sales questions to Cortex Analyst and unstructured product documentation queries to Cortex Search services.

How do I test and parse Snowflake Cortex Agent responses using Python?

Test and parse Cortex Agent responses by executing DATA_AGENT_RUN and using Python examples to surface the agent's thinking process, generated SQL statements, and returned tool results for verification.

What are common errors and permissions issues when creating semantic views for Cortex Agents?

Common errors when creating semantic views and Cortex Agents involve missing ACCOUNTADMIN permissions, incorrect execution_environment configurations, and improperly defined tool_resources blocks that prevent successful agent orchestration.

Can I use Snowflake Cortex Agents for retail sales and product documentation RAG scenarios?

Yes, Snowflake Cortex Agents support retail sales and product documentation RAG scenarios by orchestrating structured retail data through semantic views and unstructured product documents through Cortex Search services.