Skip to content

Code Interpreter

Language models predict text and do not calculate — they reach their limits with exact mathematics, data analysis, or creating charts. With the Run Code integration (Code Interpreter), CompanyGPT can instead write code, execute it in an isolated sandbox, and include the actual result in its answer. Execution takes place entirely within your own infrastructure; no data is transferred to external services.

Turn on the integration directly in the chat input via the plus icon (Attach and tools) with Run Code under Tools. It then appears as a chip in the input bar, applies to the respective chat, and stays on until you turn it off again with the × on the chip. It can also be assigned to agents as a capability via the Tool Library, allowing an agent to execute code on its own.

Files you attach to a message do not have to be uploaded separately for the Code Interpreter. If Run Code is active, CompanyGPT automatically makes the attached files available to the Code Interpreter as soon as it needs them. For an agent, you can additionally add fixed files for code execution. For more information, see File processing.

Files created by the Code Interpreter, for example an analyzed Excel file or a chart, appear in the answer as a card from which you can download the file. For many formats, a preview is available there as well.

  • Data analysis: Uploaded data sources (e.g. CSV, Excel, or JSON files) can be filtered, aggregated, and transformed. The result is available as output in the chat or as a file to download.
  • Charts and visualizations: Charts can be generated from data (e.g. with Matplotlib) and are displayed directly in the chat.
  • Exact calculations: Instead of estimating a result, the model writes the calculation as code and returns the actually computed result.
  • Format conversion and code testing: Unstructured data can be converted into structured formats (e.g. JSON), and code snippets can be executed and verified directly.
  • Attached files: When Run Code is active, files attached to a message (e.g. CSV, Excel) are available to the code in the working directory /mnt/data.
  • Result files: Files the code creates (e.g. a chart as PNG or a cleaned Excel file) appear as attachments to the response and can be downloaded.
  • Templates from companyFILES: With the tool attach_template_to_chat, companyFILES places a template in the chat as a file. From the next message on, the code can edit it, for example to change many parts of a Word or PowerPoint layout at once. This requires companyFILES to be allowed to store files directly in the chat; your administrators set this up.
  • Skills with bundled files: If a skill ships its own files (e.g. guides under references/ or scripts), they are provided read-only under /mnt/data/skills/<skill-name>/. Ready-made skills are listed under Skills tutorials.

The Code Interpreter executes Python, JavaScript/TypeScript (Node.js and Bun), and Bash.

  • Your own infrastructure: Code execution runs as a dedicated service in the company’s cluster — no external execution service is used.
  • Isolated sandbox: Each execution takes place in its own sealed-off sandbox. The code has no access to the company network or the internet.
  • Temporary sandbox: The sandbox is only available for the duration of the execution. Files created by the Code Interpreter are stored by CompanyGPT like other files in the chat, so you can still download them later via the card in the answer.