Files
crewAI/lib
Devin AI da2c9a1eff feat(tools): add SnowflakeCortexAgentTool for Cortex Agents API
Closes #5732

Adds a new tool that wraps the Snowflake Cortex Agents REST API so a
CrewAI agent can delegate natural language data questions to a governed
Cortex Agent running inside Snowflake. The Cortex Agent plans, routes
between Cortex Analyst (text-to-SQL on structured data) and Cortex
Search (retrieval over unstructured data), executes, and returns a
final answer.

The tool supports both endpoints:
- agent object: POST /api/v2/databases/{db}/schemas/{schema}/agents/{name}:run
- inline:       POST /api/v2/cortex/agent:run

Auth uses a bearer token (PAT, OAuth, or JWT) provided via auth_token
or the SNOWFLAKE_CORTEX_AGENT_TOKEN env var; the account identifier
can be passed via account or SNOWFLAKE_ACCOUNT, with an optional host
override for private link.

Tests cover credential validation, URL building (agent object vs inline,
host override, env-var fallback), payload shape, success/error paths,
and top-level export.

Co-Authored-By: João <joao@crewai.com>
2026-05-06 20:47:11 +00:00
..
2026-05-07 01:44:05 +08:00
2026-05-07 01:44:05 +08:00
2026-05-07 01:44:05 +08:00