Python Code Execution Toolkit
The Python Code Execution Toolkit is a workflow node. Its tools include Execute Python, Search Knowledge Base Files, Upload File To Sandbox, and List Sandbox Files, plus 2 more listed below. These tools run in the workflow and do not use a third-party account. Type @ in a field when the value should come from an earlier step.
Authentication
Python Code Execution tools do not use a connected third-party account. Add the node to the workflow and set the fields on the tool.
Tools
Execute Python
Runs the execute python tool.
| Field | Required | Description |
|---|---|---|
| Code | Yes | Python code to execute in the sandbox. Type @ to select a variable. |
| Entry Point | No | Deprecated and ignored; invoke functions explicitly in the provided code. Default is main. Type @ to select a variable. |
| Args | No | Positional arguments. Default is []. |
| Kwargs | No | Keyword arguments. Default is \{\}. |
| Dependencies | No | Optional PyPI package specifications to install before this code runs, for example ['pandas==2.2.3', 'python-pptx', 'pypdf']. Every third-party import must be declared here; do not run pip from the code itself. At most 10 simple package/version specifications are allowed. Default is []. |
| Timeout | No | Sandbox timeout in seconds (defaults to 300). Default is null. |
Search Knowledge Base Files
Searches knowledge base files.
| Field | Required | Description |
|---|---|---|
| Query | Yes | Search query to find files in knowledge base. Type @ to select a variable. |
Upload File To Sandbox
Uploads file to sandbox.
| Field | Required | Description |
|---|---|---|
| File Path | Yes | Use trigger.file, trigger.files, or comma-separated KB document IDs for multi-file uploads (e.g. uuid1/a.csv, uuid2/b.csv). |
| Target Path | No | Target path in sandbox (optional, only used for single file). Default is null. Type @ to select a variable. |
| Timeout | No | Sandbox timeout in seconds (defaults to 300). Default is null. |
List Sandbox Files
Lists sandbox files.
| Field | Required | Description |
|---|---|---|
| Timeout | No | Sandbox timeout in seconds (defaults to 300). Default is null. |
Create Download URL
Creates download url.
| Field | Required | Description |
|---|---|---|
| File Path | Yes | Path to file in sandbox to create download URL for. Type @ to select a variable. |
| Timeout | No | Sandbox timeout in seconds (defaults to 300). Default is null. |
Render Chart
Runs the render chart tool.
| Field | Required | Description |
|---|---|---|
| Chart Type | Yes | Chart type. One of: bar, stacked_bar, horizontal_bar, line, area, pie, donut, scatter, radar, composed, funnel, treemap, radial_bar, waterfall. Type @ to select a variable. |
| Title | Yes | Chart title displayed above the chart. Type @ to select a variable. |
| Data | Yes | Array of data objects. Each object is a row with key-value pairs. Example: [{'quarter': 'Q1', 'revenue': 120000, 'cost': 80000}]. |
| Category Key | Yes | The key in each data object to use as the x-axis / category grouping (e.g. 'quarter', 'department'). Type @ to select a variable. |
| Value Keys | Yes | List of keys in data objects to plot as series/values (e.g. ['revenue', 'cost']). For pie charts, use a single key. |
| X Axis Label | No | Optional label for x-axis. Default is ``. Type @ to select a variable. |
| Y Axis Label | No | Optional label for y-axis. Default is ``. Type @ to select a variable. |
| Include Table | No | When true, also render a data table alongside the chart, showing the same category_key/value_keys rows the chart was built from. Use this when the user asked to see the underlying numbers (e.g. 'chart it and show me the table') instead of calling a separate table tool. Default is false. |
Related
Agents can use this integration from chat. See Python Code Execution.
See all integrations on the toolkits overview.