Code execution tools for Cortex Agents in Snowflake Native Apps
Snowflake Native App providers can now add Python and SQL sandbox execution tools to Cortex Agents.
O que mudou
This feature allows providers to add Python and SQL sandbox execution tools to Cortex Agents created inside a Snowflake Native App.
Use cases
Imagine you developed an app that needs to analyze data using custom Python scripts or run read-only queries on consumer data securely.
- Execute Python code for calculations, transformations, and plotting.
- Use the complete coding toolset (
code_toolset_all), including bash, file manipulation, and read-only SQL queries. - Perform advanced analysis while keeping strict caller's rights restrictions.
How to use
Configure sandbox tools in the agent specification within your application setup script.
CREATE OR REPLACE AGENT core.my_agent
FROM SPECIFICATION $$
models:
orchestration: auto
tools:
- tool_spec:
type: "code_execution"
$$;
What happens in this code:
- The command creates or replaces an agent named
core.my_agentwithin the application. - The specification sets the orchestration model to automatic.
- The Python sandbox tool (
code_execution) is integrated into the agent without direct SQL execution privileges.
Limitations and requirements
- The sandbox does not run with the app owner's rights; restricted caller's rights (RCR) apply.
- The
snowflake_sql_executetool supports onlySELECTandSHOWstatements. - Invoking the agent from an owner's-rights procedure removes the sandbox tools.
- Consumers must explicitly grant caller access to workspace objects and data using
GRANT CALLERcommands.
- native apps
- cortex agents
- python
- sql
- security
Snowflake Native Apps: Code execution tools for Cortex Agents
Resumo e explicação gerados por IA a partir da release note oficial. Em caso de dúvida, a documentação oficial da plataforma prevalece.
Relacionadas
- SnowflakeGA
Geração de documentos em PDF, Word e PowerPoint no Snowflake CoWork
O Snowflake CoWork agora gera arquivos PDF, Word, PowerPoint e HTML diretamente de suas análises usando a ferramenta de execução de código do Cortex Agent.
snowflake cowork · cortex agent - SnowflakePublic Preview
Cortex Agent SDK para Python e TypeScript no Snowflake
O Cortex Agent SDK permite criar aplicações que utilizam Cortex Agents e Cortex Code em Python e TypeScript.
cortex agents · python - SnowflakeAtualização
Mensagens de erro mais detalhadas na classificação de dados sensíveis
A view DATA_CLASSIFICATION_LATEST agora traz mensagens de erro específicas e códigos do Snowflake para falhas na classificação.
data governance · trust center