cortex-agents-with-custom-tools-tutorial

Build Cortex Agents with SQL queries, semantic search, and stored-procedure tools.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This tutorial removes the complexity of building AI agents that must combine structured SQL analysis, semantic document retrieval, and custom business logic by teaching a repeatable, SQL-first workflow for creating multi-tool Cortex Agents that include stored-procedure tools.

Core Features & Use Cases

  • End-to-end agent construction: Create semantic views for Cortex Analyst, index documents with Cortex Search, and register procedure-backed generic tools in a single CREATE AGENT specification.
  • Custom business logic via procedures: Implement InventoryLookup, PriceCalculator, and ProductSummary as stored procedures callable by the agent with exact input_schema mappings.
  • Testing and integration: Validate tools independently, parse DATA_AGENT_RUN JSON responses with Python, and use Snowflake Intelligence for interactive chat.
  • Use Case: Build a 5-tool sales assistant that reports revenue, finds product docs, checks stock, computes bulk pricing, and summarizes product performance.

Quick Start

Tell the agent to build a sales assistant that uses Analyst for SQL, Search for docs, and three procedure-based custom tools.

Frequently Asked Questions about cortex-agents-with-custom-tools-tutorial

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

FAQPage Schema
How do I build Cortex Agents that use stored procedures as custom tools?

Build Cortex Agents with custom tools by defining stored procedures with exact input_schema and execution_environment parameters, then registering them in a CREATE AGENT specification alongside semantic views and Cortex Search services.

How to orchestrate structured data queries and semantic document search in Snowflake?

Orchestrate structured queries and semantic document search by configuring a multi-tool Cortex Agent that combines Cortex Analyst semantic views for SQL analysis with Cortex Search services for documentation retrieval.

Can I use stored procedures for custom business logic in Cortex Agents?

Use stored procedures for custom business logic in Cortex Agents by implementing generic procedure-based tools like InventoryLookup or PriceCalculator callable through exact input_schema mappings within the agent specification.

How do I parse DATA_AGENT_RUN responses from Cortex Agents in Python?

Parse DATA_AGENT_RUN responses in Python by extracting the JSON output returned after executing the Cortex Agent, enabling integration of multi-tool query results into downstream applications.

Does Cortex Agent tool registration require a warehouse execution environment?

Cortex Agent tool registration requires specifying an execution_environment parameter including a warehouse for procedure-backed generic tools, ensuring compute resources are allocated for custom business logic execution.

What is the best way to create a multi-tool sales assistant with Snowflake Cortex?

Create a multi-tool sales assistant by combining Cortex Analyst for revenue reporting, Cortex Search for product docs, and stored procedures for inventory checks, pricing quotes, and product summaries within a single agent.