Code Interpreter

Spins up a secure Python environment to run complex calculations, analyze datasets, and generate charts on your behalf.

Try Code Interpreter in Ceven

Ask Ceven anything
Standard

Why use Ceven?

  1. AI native Code Interpreter integration

    • Describe the outcome and Ceven picks the right Code Interpreter calls, fills the parameters, and checks the result.
    • Structured, agent friendly tool schemas so each call runs reliably instead of by guesswork.
    • Rich coverage for reading, writing, and querying your Code Interpreter data, across all 5 of its actions.
  2. Managed auth

    • Built in OAuth with automatic token refresh and rotation.
    • One place to manage, scope, and revoke Code Interpreter access.
    • Per user and per environment credentials instead of shared keys.
  3. Agent optimized design

    • Actions are tuned from real success and error rates so reliability climbs over time.
    • Full execution logs so you always know what ran in Code Interpreter, when, and on whose behalf.
    • The agent pauses and asks when Code Interpreter is unclear instead of plowing ahead.
  4. Enterprise grade security

    • Fine grained access so you control which agents and people can reach Code Interpreter.
    • Least privilege by default, read scopes first and only the writes a workflow needs.
    • A full audit trail of every Code Interpreter action to support review and sign off.

Supported tools

Every action Ceven's agents can run on Code Interpreter, and when to use it.

Create Sandbox
Use this when you need a fresh Jupyter notebook environment to execute Python code, store temporary files, or run a sequence of analysis steps.
Execute Code
Run Python code in the active sandbox. Use this to perform calculations, manipulate data, or print results to stdout.
Get File
Pull a specific file from the /home/user folder of the sandbox to retrieve analysis results or generated reports.
Run Terminal Command
Execute a shell command in the terminal. Use this for file system management or installing specific lightweight utilities in the sandbox.
Upload File
Push a local file into the /home/user folder of the sandbox so the Python interpreter can read and process it.
Analyze Dataset
Use this to load a CSV file and run descriptive statistics using the pandas library in the sandbox.
Create Plot
Generate a chart or graph using matplotlib and save the output to the sandbox file system.
Clean Data
Run a script to remove duplicates and handle missing values in a sandbox file before analysis.
Export Result
Save the output of a Python operation into a new CSV or JSON file within the /home/user directory.
Check Sandbox Status
Verify if the current compute environment is active and available for code execution.
List Sandbox Files
Pull a list of all files currently stored in the /home/user directory to verify output generation.
Delete Sandbox
Tear down the compute environment and wipe all stored files after a workflow completes.

12 actions · scroll to see them all

Frequently asked questions

No. Every time the agent triggers a Create Sandbox action, a completely isolated environment is provisioned specifically for that session. Your code, uploaded files, and environment variables are kept in a private container that other users cannot access. Once the sandbox is deleted or the session expires, the entire container is wiped. This ensures that sensitive data processed during a Python script remains confidential and does not leak into other workflows or user accounts. The isolation extends to the file system, meaning the agent can only interact with the /home/user folder allocated to that specific sandbox instance.
The sandbox has built in execution timeouts to prevent resource exhaustion. If a script runs for too long without returning a result, the system will automatically kill the process and return a timeout error to the agent. This prevents a single runaway script from consuming all available compute credits or hanging the workflow. When this happens, the agent will typically attempt to optimize the code or break the task into smaller chunks to fit within the time limits. You will see the stderr output in the workflow logs explaining that the process was terminated due to a timeout.
The environment comes pre loaded with a vast array of data science libraries like pandas, numpy, and matplotlib. However, you cannot install libraries that require system level dependencies or root access. While you can use the Run Terminal Command action to attempt pip installs for pure Python packages, some complex libraries may fail if they require a C compiler or specific OS headers that are not present in the lightweight image. If a library is missing, the agent will report the import error, and you may need to find an alternative library that is already available in the standard image.
Since the code runs on a remote server, you cannot use plt.show() to pop up a window. Instead, the agent is instructed to save all visualizations as files, such as PNG or JPG, directly into the /home/user folder. Once the file is saved, the agent uses the Get File action to retrieve the image and then passes it back to you through the Ceven interface. This two step process of save then retrieve is the only way to view visual output from the sandbox, as there is no direct X11 or graphical display attached to the remote compute instance.
Yes. There is a strict file size limit for uploads to the sandbox to ensure system stability. Large datasets exceeding several hundred megabytes may trigger an upload error or cause the sandbox to run out of memory during processing. If you are working with massive datasets, it is recommended to filter the data at the source or use a tool that supports streaming data rather than a full upload. If the agent encounters a memory error during a pandas operation, it will attempt to process the file in chunks to stay within the available RAM limits of the sandbox.
The sandbox has restricted outbound network access for security reasons. While it can reach certain approved endpoints, it cannot be used as a general purpose web scraper or to connect to private databases via a direct socket. If you need to analyze data from an external API, the best practice is to use a separate Ceven workflow to fetch the data first, and then use the Upload File action to move that data into the sandbox. This air gap approach prevents the execution of malicious code that could attempt to exfiltrate data or launch attacks from the compute environment.
Sandboxes are ephemeral by design. They typically persist for a short window of inactivity before the system automatically reclaims the resources. If your workflow involves a long gap between code execution steps, the agent may need to recreate the sandbox and re upload the necessary files. You can avoid this by grouping your analysis steps into a single execution block or by ensuring the agent performs all file operations in one continuous sequence. Once the sandbox is reclaimed, any files not explicitly downloaded via Get File are permanently lost.
Yes, the agent can use the Run Terminal Command action to execute bash scripts. This is particularly useful for moving files, changing permissions, or checking disk usage within the /home/user directory. However, the agent is restricted from accessing system directories outside of the user home. Any attempt to use sudo or access /etc or /root will be blocked by the container security policy and will return a permission denied error. This ensures that the agent can manage its own files without risking the integrity of the underlying host system.

Alternatives to Code Interpreter

Other tools that solve a similar problem. Ceven supports these too, so you can switch or run more than one at once.

Jupyter logoJupyterGoogle Colab logoGoogle ColabReplit logoReplit

Try Ceven on your stack

Plug Ceven on top of the tools you already run. Connect Code Interpreter and the rest of your stack, describe the outcome, and its agents handle the work end to end, days of it in minutes.

Get started for free