Skip to main content

Description

CodeExecutionStep enables your agents to execute Python code in a sandboxed environment using Gemini’s native code execution capabilities. This is useful for calculations, data transformations, and dynamic logic that can’t be expressed in the workflow graph.

CodeExecutionStep

Configuration Parameters

Inputs

Outputs

Example: Dynamic Calculations

Example: Data Transformation

Using as an Agentic Tool

Configure code execution as a tool for research agents:

Security

Code execution runs in a sandboxed environment with:
  • No network access
  • No file system access
  • Limited execution time
  • Memory constraints
This ensures safe execution of dynamically generated code.