Code Interpreter Tool

Contents

Code Interpreter Tool#

Technical Preview

Notes for administrators

  • Available as a technical preview.

  • Requires specific OpenAI models.

The OpenAI Code Interpreter is a custom tool that enables Squirro Chat agents to write and execute Python code for data analysis, calculations, visualizations, and file processing. That tool uses a secure code execution environment to perform computational tasks and can generate artifacts such as charts, processed data files, and analysis reports.

To use the Code Interpreter tool, you need:

  1. Project configured with an OpenAI model that supports the Code Interpreter feature.

  2. Access to an agent with the tool already configured or the rigths to create or modify agents in a Squirro project.

For more details on how to work with agents and tools, see the Configuring Agents and Tools page.

Agent Flow#

When a user asks a question that requires computation or data analysis:

  1. The LLM analyzes the user’s request and determines that code execution would be helpful.

  2. The agent writes Python code to solve the problem, perform calculations, or analyze data.

  3. The code executes in a secure, isolated container environment.

  4. Any files generated during execution (like charts or processed data) are automatically made available via a download link.

  5. The agent provides an explanation of the analysis along with links to download any generated files.

You can upload files through the chat interface, and the code execution environment automatically makes them available for analysis. The tool supports a wide variety of file types including spreadsheets, images, documents, and data formats. For a complete list of supported file types, see the OpenAI Platform website.