The Python Script Actions environment is the standard code execution platform, offering broader capabilities than APIthon, including access to a pre-approved and verified list of external libraries.
All Python built-in libraries are available (e.g., json, datetime, re, collections, math). The following external libraries are also supported:
Custom library requests are not currently supported. This capability is on our roadmap but not yet available.
The Python Script Actions environment has specific restrictions to ensure security and stability.
8-Second Hard Timeout: Script execution is strictly limited to 8 seconds. This is a hard limit enforced at the infrastructure level to protect system stability—there are no exceptions. Design your scripts to process data efficiently and avoid heavy computations or large iterations.
Internet access is disabled at the infrastructure level. While network libraries like requests can be imported, all outbound network calls will fail at runtime.
To use data from external systems:
Do not use the file system. While you technically have access to a /tmp directory, we strongly discourage any file system interaction.
/tmp are automatically deleted at the end of each requestIf you need to process data, keep it in memory and return results directly.
Until a formal code review capability is introduced, any admin has the ability to modify or publish a full Python script in Agent Studio without a secondary approval step. This means that if an admin account were ever compromised, an attacker could immediately author and deploy malicious scripts at will. Implementing a structured review process will be critical to reducing this risk and ensuring the integrity of scripts executed within your AI Assistant.
Python Script Actions can be integrated into Compound Actions and Conversational Processes within the agent studio. This section explains how to define and reference the data collected from the user (slots) within your Python script.
The fundamental concept to remember is that the script’s output is determined by the value of the last line of code executed.
For your Python script to use data collected from the user (a “slot”), you must define an Input Argument and then map the collected slot value to that argument.

Once the Input Mapping is configured, We can now define the Python code in the Script Action. In order to do this you need to select Python in the language selector dropdown.

the slot value collected (e.g., 9) is available directly inside the Python function under the name of the Input Argument (init_number).


Ensure the correct Data Type is being selected for Slots, Input Arguments across steps to keep them aligned.