Agent Sandboxesagentsandboxes.org
Sandbox profile · Cloud or model provider service

Mistral code interpreter

Answer in brief

Built-in tool of the Mistral Agents API that runs Python the agent writes in an isolated container. Convenient inside the Mistral Agents API, but thinly documented; look elsewhere if you need to know what the container can do.

By the Agent Sandboxes editors · Updated

Overview

Code interpreter is one of the built-in tools (connectors) of Mistral's Agents API, alongside web search, image generation and document library. You add {"type": "code_interpreter"} to the tools list when creating an agent, then drive it through the Conversations API; the model decides when to run code and the response carries a tool.execution entry with the code and its output. Mistral describes the environment as an isolated container for safely executing code, and the launch announcement (27 May 2025) calls it a secure sandboxed environment for Python; no further detail on the runtime, libraries, resource limits, networking or state persistence is published.

The tool is not available on the Chat Completions endpoint, only on the Agents and Conversations APIs, which the SDKs expose under a beta namespace. Mistral's pricing page states that tool APIs are priced per call but does not list a figure for code execution, so budget by checking the console. Treat it as a model-adjacent code interpreter rather than a general-purpose sandbox: there is no SDK for creating or addressing the container directly.

Notable

  • Launched with the Agents API on 27 May 2025 together with web search, image generation, document library and MCP tools
  • Exposed under the client.beta.agents and client.beta.conversations SDK namespaces; not supported in Chat Completions
  • Tool pricing is stated as per call on the pricing page, with no published rate for code execution

Mistral code interpreter specifications

AttributeDetails
IsolationIsolated container ("safely execute code in an isolated container"); the runtime and hypervisor are not named
DeploymentCloud or model provider service
Open sourceNo
SDKs and interfacesPython, JavaScript/TypeScript, REST API
Cold start (vendor claim)Not documented
Max session lengthNot documented
PersistenceNot documented
GPUNot documented
NetworkingNot documented
PricingNot published: the Mistral pricing page says tool APIs are priced per call but lists no rate for code execution
Free tierNot documented
ComplianceNot documented
RegionsNot documented

Facts from Mistral code interpreter’s public documentation, verified November 9, 2026. Performance numbers are vendor claims.

Strengths and trade-offs

Strengths

  • You are building on the Mistral Agents API and want code execution with one line of configuration
  • You need an EU-headquartered model provider's native code tool rather than a third-party sandbox
  • You want the model to decide when to run code and to see the code and its output in the conversation record

Trade-offs

  • Runtime details (libraries, time and memory limits, networking, persistence) are not documented
  • No published price for the tool
  • Only reachable through an agent conversation; you cannot create or control the container yourself

Good fit for: Letting a Mistral agent run short Python for maths, data analysis and plots without an external sandbox.

How Mistral code interpreter compares

SandboxIsolationOpen sourceSelf-host / BYOCCold start (vendor)Max sessionSnapshots / pauseGPUSDKs
Mistral code interpreterIsolated containerNoNo / NoNot documentedNot documentedNot documented / Not documentedNot documentedPython, JavaScript/TypeScript, REST API
OpenAI Code Interpreter & Hosted ShellVM (unspecified)NoNo / NoNot documented20 min idleNo / NoNoOpenAI Responses API, Containers API, OpenAI SDKs
Claude code execution toolHosted Linux containerNoNo / NoNot documented30 days (container)No / Not documentedNoPython, JavaScript/TypeScript, Go, Java, C#, PHP, Ruby, REST API, CLI
Gemini API code executionHosted Python runtimeNoNo / NoNot documented30 s per executionNo / NoNoPython, JavaScript/TypeScript, Go, Java, REST API
Azure Container Apps dynamic sessionsHyper-V VMNoNo / NoSub-second (pooled)220 s / execNo / NoNoREST API, Azure CLI, LangChain, LlamaIndex, Semantic Kernel
E2BFirecracker microVMYesYes / YesNot documented1 h / 24 h (Pro)Yes / YesNoPython, JavaScript/TypeScript

See all Mistral code interpreter alternatives →

Frequently asked questions

What is Mistral code interpreter?
Built-in tool of the Mistral Agents API that runs Python the agent writes in an isolated container. Convenient inside the Mistral Agents API, but thinly documented; look elsewhere if you need to know what the container can do.
How does Mistral code interpreter isolate code?
Mistral code interpreter documents its isolation as: Isolated container ("safely execute code in an isolated container"); the runtime and hypervisor are not named.
Is Mistral code interpreter open source?
No, Mistral code interpreter is not open source.
How much does Mistral code interpreter cost?
Not published: the Mistral pricing page says tool APIs are priced per call but lists no rate for code execution Check the official pricing page for current rates.
What are the alternatives to Mistral code interpreter?

Sources

  1. docs.mistral.ai/agents/tools/built-in/code_interpreter/
  2. mistral.ai/pricing
  3. mistral.ai/news/agents-api

Cite this page

Agent Sandboxes. (2026). Mistral code interpreter. agentsandboxes.org. Last reviewed November 9, 2026. https://agentsandboxes.org/sandboxes/mistral-code-interpreter/

Found an error or a missing sandbox? Submit a correction — every entry links to the sources it relies on.