Skip to main content
The Omni Agent can write and run Python code for analysis that is limited in SQL, such as statistics, forecasting, machine learning, and data reshaping. The code works on your query results and any CSV or Excel files you upload.
Python is available for Omni instances hosted on AWS in the United States, the EU, Canada, and Australia.

Requirements

To use Python in the Omni Agent, you need:
  • The Use Python permission. It is on by default for Queriers and above.
  • The Use Omni Agent AI setting enabled
  • To upload files, the Omni Agent > File uploads AI setting enabled
Organization Admins can restrict individual users or groups from using Python through a granular permission on a custom role.

How it works

The agent decides when to use Python, and you can also ask for it directly. When a question needs Python:
1
The Omni Agent gets the data. It runs new queries or uses the results already in the chat, together with any CSV or Excel files you uploaded.
2
It writes Python code for the analysis.
3
It runs the code in an isolated sandbox with no internet access. See AI data security for how Omni isolates the code and what it shares with the LLM.
4
It reads the output and answers your question in the chat. Any chart or table from the run appears with the answer, and you can open the code and logs of each Python step to check the work.
Charts appear as tiles in the browser chat. Slack and the API return Python results as text only. A chart stays available for 30 days. After that, ask the agent to run the analysis again.

Use cases

If you have the Use Python permission, the agent forecasts with Python’s statsmodels library instead of the built-in forecasting tool.

Using uploaded files

If you have the Use Python permission, the agent uses Python to read every CSV and Excel file you upload to the chat. The agent can combine a file with your query results, for example to compare a spreadsheet with warehouse data. The agent runs Python each time it needs a file’s contents. Each file can be up to 250 MB. Omni stores each file and keeps it available to the chat for 30 days.

Available packages

Python code runs on Python 3.13 with these packages installed:
Need a package that isn’t on this list? Let Omni support know, and we’ll look into adding it.

Next steps