

Write and execute Python code in StackAI with the Code Execution node.
Overview
StackAI agents and workflows can easily run arbitrary Python code in a sandboxed environment. It is the mechanism when you need custom logic, data transforms, or library calls that native nodes do not cover, and it slots seamlessly into any workflow.
Top Use Cases
Custom data transforms
Between two integration nodes, drop in a Python step to reshape JSON, do math, or apply business rules that would be awkward in an LLM prompt.
Chart and file generation
Have an agent write Python to produce a matplotlib chart, an Excel file, or a PDF report, then hand the resulting file off to the next step.
