What you get
NIMBLE_SEARCHandNIMBLE_EXTRACTcallable inline from any Snowflake SQL. Pipelines, notebooks, Streamlit, dbt — usable directly inSELECT, views, and joins because the UDFs returnVARIANT.- A pre-built Cortex Agent wired to those tools, invocable from Snowflake Intelligence or the agent run REST API
- Stays inside your Snowflake account. Only authorized outbound calls hit Nimble.
- One-time setup, run by ACCOUNTADMIN. Under 5 minutes.
Prerequisites
ACCOUNTADMINrole- Snowflake Enterprise edition or higher
- A Nimble API key (sign up free)
Install Nimble in Snowflake
Create the role, database, and dedicated warehouse
Set up an isolated namespace for the integration. A dedicated warehouse keeps agent traffic separate from analytics workloads and makes cost attribution trivial.
cookbook/snowflake/setup/setup.sql
Full setup script: role, grants, database, schema, warehouse
Authorize outbound traffic to Nimble
Create a network rule, store your Nimble API key as a Snowflake secret, and bind both into an External Access Integration. The UDFs reference the EAI to make outbound HTTPS calls.
cookbook/snowflake/setup/setup.sql
Network rule, secret, and External Access Integration block
Deploy NIMBLE_SEARCH
A Python UDF that calls Nimble’s Search API and returns the response as a
VARIANT. Callers navigate the JSON inline with :field syntax — no PARSE_JSON() needed.cookbook/snowflake/cortex-agent-tools/01_nimble_search.sql
Full UDF with focus, depth, country, locale, and domain filters
Deploy NIMBLE_EXTRACT
Same shape as
NIMBLE_SEARCH. Takes a single URL and returns the parsed page content as a VARIANT.cookbook/snowflake/cortex-agent-tools/02_nimble_extract.sql
Full UDF with driver, country, locale, and format selection
Register the Cortex Agent
Wire both UDFs into a Cortex Agent.
tool_spec.type: generic declares each tool’s JSON schema; tool_resources maps the schema to the underlying function (type: function) and the warehouse that runs it.cookbook/snowflake/cortex-agent-tools/03_cortex_agent.sql
Full agent spec, including grants and verification queries
Try these recipes
Recipe 1: Quick search and extract from SQL
Both UDFs returnVARIANT. Navigate the response inline with :field syntax — no CALL, no PARSE_JSON, no RESULT_SCAN.
VARIANT, they slot directly into views, dbt models, FLATTEN calls, and joins against warehouse data — no two-step CALL + RESULT_SCAN + PARSE_JSON workaround.
Recipe 2: CPG retailer price and availability monitoring
A CPG brand keeps its product master in Snowflake and wants daily competitive intelligence on how its SKUs appear across Amazon, Walmart, and Target. Nimble Search finds the listing URL per SKU per retailer; Nimble Extract pulls price, stock, and reviews from each listing; the enriched rows land in aPRODUCT_LISTINGS table that BI can read.
Input: PRODUCTS
| sku | brand | product_name | upc | category |
|---|---|---|---|---|
| LB-001 | Liquid Death | Mountain Water 16.9oz 12pk | 810014710013 | Beverages |
| OB-014 | Olipop | Vintage Cola 12oz 12pk | 850000334038 | Beverages |
| ATH-002 | Athletic Brewing | Free Wave Hazy IPA 12pk | 850001234567 | Beverages |
PRODUCT_LISTINGS
| sku | retailer | listing_url | price | currency | in_stock | rating | review_count | last_seen_at |
|---|---|---|---|---|---|---|---|---|
| LB-001 | amazon | https://amazon.com/dp/… | 18.99 | USD | TRUE | 4.7 | 12483 | 2026-05-25 |
| LB-001 | walmart | https://walmart.com/ip/… | 17.48 | USD | TRUE | 4.6 | 3201 | 2026-05-25 |
| LB-001 | target | https://target.com/p/A-… | 17.99 | USD | FALSE | 4.8 | 942 | 2026-05-25 |
v_price_alerts view layers on top, surfacing SKUs with a 10%+ price drop versus the trailing seven-day median (or any retailer flipping to out-of-stock), and feeds the daily competitive briefing.
cookbook/snowflake/recipes/cpg_price_monitoring/
Full recipe: sample data, enrichment SQL, the alerts view, and the daily task
Recipe 3: Chat with the agent in Snowflake Intelligence
The fastest way to try the agent is the Snowflake Intelligence UI:Pick the agent
Select NIMBLE_WEB_RESEARCH_AGENT from the agent picker. The two tools (
nimble_search, nimble_extract) appear in the tool tray.Ask a research question
Try a prompt that forces both tools. For example: “Find the three most recent posts on Snowflake’s engineering blog about Cortex, then pull the full text of each.” The agent calls
nimble_search, picks URLs from the results, then calls nimble_extract to retrieve page content, and answers with citations.Recipe 4: Schedule recurring enrichment
Wrap the CPG enrichment in a Snowflake task so it runs every morning before the business day. The task uses the sameNIMBLE_AGENT_WH warehouse and writes incrementally to PRODUCT_LISTINGS.
cookbook/snowflake/recipes/cpg_price_monitoring/schedule.sql
Full scheduled task: incremental load, retry policy, and dead-letter handling
Roll out across your organization
- Grant scoped access. Grant
nimble_roleto the specific user roles or service accounts that should call the UDFs, not toPUBLIC. The role already carriesSNOWFLAKE.CORTEX_USER, so grantees can invoke the agent without any extra Cortex grant. - Tune for your Nimble rate-limit tier. The cookbook enrichment proc accepts a
max_workersparameter for concurrent extraction. Start at 4 and raise it as your tier allows; Nimble’s rate-limits page lists per-tier ceilings. - Right-size the warehouse.
XSMALLwith 60-second auto-suspend is fine for interactive agent chat. For large batch enrichment (thousands of SKUs), step up toSMALLorMEDIUMonly for the duration of the scheduled task; suspend cost is negligible at this size. - Contain cost during dev. Use
TABLESAMPLEon the source table when iterating on enrichment logic, and monitor spend via theTASK_HISTORYandWAREHOUSE_METERING_HISTORYviews. - Pre-approve the agent in shared workspaces. When sharing Snowflake Intelligence workspaces, add
NIMBLE_WEB_RESEARCH_AGENTto the workspace’s allowed agent list so collaborators can invoke it without re-granting access.
Resources
Nimbleway/cookbook (snowflake/)
Every SQL file referenced on this page, plus the CPG recipe
Nimble Search API
Request shape, parameters, and response schema for
NIMBLE_SEARCHNimble Extract API
Request shape, parameters, and response schema for
NIMBLE_EXTRACTSnowflake External Access Integration
How Snowflake gates outbound HTTPS from UDFs and stored procedures
Snowflake Cortex Agents
Overview of the Cortex Agents runtime and orchestration model
CREATE AGENT reference
Full SQL reference for the agent spec used in Step 5