Code execution
Intra AI can write and run small Python programs to analyze spreadsheets, calculate figures, draw charts and create files. You don't write any code yourself. You describe what you want to know, and the model writes the program and runs it in a sandbox, a closed-off environment separate from your files and other systems. Every run shows the code and its result, so you can check how a number came about.
Note: Code execution is available only if your instance has a sandbox set up. Without one, the Code execution switch is missing from Plugins and the model can't run code. Ask your administrator if you're not sure.
Turn code execution on or off
In a conversation without an agent, code execution is a switch in the message box:
- Select Plugins next to + in the message box.
- On the Tools tab, find Code execution.
- Leave it on to let the model run code, or switch it off for this conversation.
The switch starts on. Intra AI keeps your setting in this browser tab, including for new conversations. With the switch on, the model decides for itself whether a question needs a program. To add up a long spreadsheet it usually writes one; for a plain text question it doesn't. If you want to be sure, say so in your message, for example "Please calculate this with code." The other switches in Plugins are described in Write messages.
When you work with an agent, the agent decides. If the agent has the Code interpreter capability, the switch is on and locked, with a note such as "Code execution is set by agent “Supplier news scout”". If it doesn't, the switch is hidden and the agent can't run code. The person who builds the agent turns Code interpreter on under Capabilities (see Give an agent tools and integrations).
Your administrator can also stop individual models from running code in conversations without an agent, with the Tool rounds setting of that model. Such a model never runs code in a conversation without an agent, even with the switch on. Agents with Code interpreter are not affected.
Analyze a spreadsheet
- In the message box, select + (Attach file).
- Choose Upload from computer and pick your CSV or Excel file (XLSX). If the file is already in Intra AI, choose Browse files and folders instead, or pick it under Recent. The file then appears above your message, for example "sales-2026.xlsx · Excel".
- Wait until the file is ready. Send stays locked while it is still uploading or processing.
- Ask a specific question that names the columns, the period and the figure you want.
- Send the message.
The attached file has our 2025 and 2026 revenue by branch and month.
Calculate 2026 revenue per branch and the percent change from 2025.
Show the five branches with the largest decline as a table.
For data and chart requests, the model often loads the Data analysis and charts skill on its own. Its name then appears in the message box, and the answer's steps include "Used the Data analysis and charts skill". Skills are explained in Skills.
Above the answer, a summary line counts what the model did and how long it took, for example "1 file, 2 code runs · 37s". Under the answer, Sources (1) (with the number of sources) lists the file the figures came from, and a small number in the answer text links to it.
The figures in the answer come from the program, and you can open it and read it (see What a code run shows). For numbers that matter, check one yourself, for example by comparing a total with Excel.
Later in the same conversation, the model can still use the files you attached earlier. How uploads work and which file types Intra AI reads is explained in Files.
Create a chart
- Attach your data and describe the chart: type, axes, sort order, units. For example: "Plot monthly revenue by region as a line chart, with the axis in thousands of euros."
- Send the message. The chart arrives as an image file in a tile under the answer, not inside the answer text.
- Select Open to view it in the panel beside the conversation. There you can Download it, or Expand it to the full width of the window.
- To change it, keep writing in the same conversation, for example "Make it a bar chart and label each bar with its value." The model then starts a new run and delivers a new file.
Enlarge figureDownload files the program creates
When the program writes files, such as a chart, a cleaned-up Excel sheet or a CSV with results, they appear as tiles under the answer. Each tile shows the file name, type and size. "Only in this chat" means you haven't saved the file to a folder of your choice in Files yet. A copy may still be in the conversation's working folder (see Work in a folder).
- Open shows the file in the panel beside the conversation.
- The download icon saves the file to your computer.
- Use in chat attaches the file to your next message, so you can keep working with it.
Depending on your instance, a tile can also offer Save to folder, which saves the file to one of your folders in Files, and in a project conversation Save to project.
The program creates a file only when you or the task call for one. If you need a file, ask for it: "Save the result as an Excel file." How Word, Excel, PowerPoint and PDF files are made is covered in Create Word, Excel, PowerPoint and PDF files.
What a code run shows
Select the summary line above the answer to open the list of steps. Each run is one row, for example "Ran Python". A run that delivered a file reads "Created" followed by the file name, or "Created 2 files" when it delivered several. Select a row to open it:
- Used names the files the run read.
- The code shows the program itself. Copy code copies it.
- Output shows the program's result. Copy output copies it. If the output is long, only part of it shows; select Show all … lines to see the rest.
Enlarge figureAn opened run can also show these lists and messages:
| What you see | What it means |
|---|---|
| Input files | Your files that reached the sandbox. |
| Not available to this run | Files this run could not open, for example because the files were too large in total. |
| Delivered files | Files the program created for you. |
| Working files kept for later steps | Files the program keeps in the sandbox for the next run, without delivering them to you. |
| Not delivered | A file the program created that you don't receive. The reason follows: "refused by the safety checks", "too large to deliver" or "could not be saved". |
| "Completed successfully — 2 warning lines" | Not an error. The program reported warnings, but the result is still there. |
| "2048 bytes omitted" | The output was so long that only its beginning and end were kept. The model also sees only those parts. |
| "Waiting for a free slot" or "Waiting for a free slot, position 2" | Your earlier runs are still going. This run starts on its own once one of them finishes. |
Work in a folder
When the program delivers its first file in a conversation, Intra AI usually sets up a working folder for the conversation. If you uploaded a file from your computer in this conversation, the folder is named after that file and holds a copy of it next to the files the program creates. A bar above the message box then reads, for example, "Working in folder “sales-2026”". A file you picked from My files stays where it is and isn't copied into the folder; the folder is then named after the first file the program creates.
This doesn't happen in a Temporary chat, in a conversation other people can open (such as a project conversation or a shared conversation), or after you detached a folder in that conversation.
Note: Your provider can switch working folders off for your instance. The model then works without a folder, and the bar doesn't appear.
- Select Open folder in the bar. The folder's files open in the panel beside the conversation, each with its size and a download button.
- Select a file to preview it. Text files have a Preview and a Raw tab, and a Download button.
- Use the Read & write switch at the bottom of the panel to decide whether the model may change files in the folder. With the switch off, the model can still read them.
- To disconnect the conversation from the folder, select Detach folder and confirm "Detach this chat from the folder? The folder, its files and their history stay."
Enlarge figureIf you ask the model to work in one of your existing folders, it may ask first ("Give access to a folder?"). Choose Allow read & write, Read only or Not now. The model may also ask "Create a folder for this task?". Once you answer, the step shows which folder the model uses and with what access, for example "Folder Reports · read only".
When the model reads or changes a file in the working folder, the answer shows it as a step, such as "Read summary.md", "Saved summary.md" or "Changed summary.md". Open the step to see the file's path, the purpose of the change and the edits. It also shows the new version with the lines added and removed, for example "v2 (+6 −6)". If a change could not be saved, the step says why, for example "Not saved — read only" or "Not saved — too large".
Enlarge figureThe step's text may say that the change is shown with a Revert button. No such button currently appears in the conversation. Earlier versions of a file stay in the folder's history. How to find and restore them is explained in Files.
Limits
The values below are the defaults. Your instance may use different ones.
| Limit | Default |
|---|---|
| Time per run | 3 minutes |
| Memory per run | 1.5 GB |
| Code runs at the same time per person | 2 |
| Code runs waiting per person | 4. When four runs are already waiting, the next one is refused and the model is told the code interpreter is busy. |
| Files one run reads, in total | 16 MB |
When a run reaches the time or memory limit, the run stops, and the message tells you which one it hit (see Troubleshooting).
A refused run doesn't count as a failed attempt. The model answers with what it has, and you can ask again once your earlier runs are done.
Troubleshooting
If a step fails, the summary line above the answer counts it, for example "1 file, 3 code runs · 52s · 1 failed". In the list of steps, the failed one reads "This step could not be completed". Open it to see the reason, such as "The request was incomplete". "tried again" means the model sent the step once more. Often a later run succeeds and the file still arrives.
Enlarge figure| Message or situation | What to do |
|---|---|
| "The program reached the time limit" | Make the task smaller: fewer rows, one year instead of five, or the analysis in several steps. |
| "The program ran out of memory" ("The program needed more memory than one run may use and was stopped.") | Work with a smaller part of the data, or ask the model to read only the columns it needs. |
| "Run failed" or "The program stopped with an error" | The error is under Technical details. The model often fixes the program and starts a new run. If it doesn't, ask it to, and give the exact column names. |
| "The code was not run" | The sandbox could not run the program, or your files did not reach it as sent ("The attached files did not reach the sandbox as sent, so the program did not run."). Send the message again in a few minutes. If it keeps happening, contact your administrator. |
| "Waiting for a free slot" | Your earlier runs are still going. Wait; the run starts on its own. If too many runs are waiting, the model answers with what it has, and you can ask again later. |
| A file is listed under Not available to this run | The files are too large in total, or a file was still being processed. Attach fewer or smaller files, or wait until the file is ready. |
| A file is listed under Not delivered | Read the reason next to it. For "too large to deliver", ask for a smaller result, such as a summary instead of every row. |
| The model says it can't open an Excel file | Usually the file is password-protected or in the old XLS format. Save it as XLSX without a password and attach it again. |
| No code run at all | Check that Code execution is on under Plugins, and ask the model to calculate with code. If you work with an agent and the switch is hidden, the agent doesn't have Code interpreter; try a conversation without an agent. If Code execution is missing from Plugins altogether, your instance has no sandbox; ask your administrator. |