jsonscraper

Snowflake makes Python execution in Cortex Agents generally available

The agent can process query results and create charts in a sandbox. SQL runs separately, while result files are saved in the workspace.

On October 5, 2026, Snowflake announced general availability of the built-in code execution tool in Cortex Agents. It allows an agent to run scripts for data processing, calculations and visualization during a conversation.

Snowflake makes Python execution in Cortex Agents generally available
Context: On October 5, 2026, Snowflake announced general availability of the code execution tool in Cortex Agents. We examine how SQL queries, Python calculations and result storage fit together, as well as the limitations that matter when enabling it.
Visual subject: site:snowflake.com Cortex Agent code execution Snowsight screenshot
© jsonscraper · AI-generated image

What changed on October 5

The status of an existing tool changed: Snowflake moved it from preview to General Availability, or GA. A separate preview launch entry is dated August 20, 2026. The October announcement marks the end of the preview availability phase.

According to the tool configuration guide, code execution is enabled through the agent specification. The agent decides when to create and run code based on the user's request. The tool also runs Python scripts as part of agent skills—attachable instructions and resources for specific tasks.

How the agent retrieves data and performs calculations

The dedicated documentation describes the code_execution tool as running Python in an isolated sandbox. SQL tools query Snowflake data outside the sandbox, after which Python processes the results. The sandbox has access to data passed into the session and the attached workspace.

In the overall Cortex Agents architecture, different tools handle different stages of the work. Cortex Analyst is used for structured data, Cortex Search for searching documents, and code execution adds programmatic processing. According to Snowflake's description, managed orchestration allows the agent to plan its work, call tools and produce a response.

This architecture suggests a practical workflow for an analytics assistant: retrieve a dataset, perform a calculation and prepare a chart within a single conversation. When designing such a workflow, it is useful to define the initial dataset, calculation formula and method of checking the result separately. This gives the team clear stages for reproducible testing.

Access-rights recommendations should be read in chronological context. The Best Practices guide, updated on June 15, 2026, and checked by the editorial team on October 8, discusses inheriting the agent owner's role permissions and suggests saving results to a table. The page explicitly states that the material is not continuously maintained and may be outdated. The later August 20 preview entry already sets out specific rules: SQL runs outside the sandbox, files are saved in the attached workspace, and calls using owner’s rights do not support code execution. The same conditions are set out in the current dedicated documentation.

Binary source code – HTML PHP Java program code – Web design
Markus Spiske · Unsplash License

What persists between computations

Under the workspace rules, files written to the workspace survive sandbox shutdown. Variables and imported modules may be lost between separate executions. Results needed for subsequent steps should be written to files.

During the August preview, Snowflake already listed preinstalled data-processing and charting libraries, including pandas, NumPy, matplotlib and Plotly. Additional packages are added through Artifact Repository. When preparing a working workflow, it is worth defining its dependencies and how intermediate results will be passed along in advance.

What conditions matter when enabling the tool

The current documentation specifies a restriction for calls using owner’s rights. When an agent is called from such a stored procedure, code execution tools are removed from the request, no sandbox is created, and the response contains a warning. Code execution requires a call using caller’s rights.

GA is confirmed by a dated release entry. Before enabling the tool in a specific account, the team needs to clarify regional availability, execution pricing, resource limits and support terms: the October announcement does not list these parameters.

Who will benefit from built-in Python

The tool is primarily suited to teams building analytics assistants within Snowflake. Its practical role is to connect data retrieval with programmatic calculations and visualization in a single agent workflow. The tools described in the Cortex Agents overview allow work with structured data to be combined with document search, while Python adds a computational stage.

Three decisions become central to implementation: which tool retrieves the initial dataset, which rights are used to call the agent, and where results are stored. These should be tested on a small, reproducible task with a known answer—for example, calculating a metric from a fixed dataset and creating the corresponding chart.

People

No people listed for this article yet.

Keep readingOpenAI Adds GPT‑6-Powered Interactive Interfaces to ChatGPT
Read the next article

Turn what you read into a working integration

Explore jsonscraper's social-data APIs, test requests and build your next workflow.

Explore APIs