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.
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.agentsandclient.beta.conversationsSDK 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
| Attribute | Details |
|---|---|
| Isolation | Isolated container ("safely execute code in an isolated container"); the runtime and hypervisor are not named |
| Deployment | Cloud or model provider service |
| Open source | No |
| SDKs and interfaces | Python, JavaScript/TypeScript, REST API |
| Cold start (vendor claim) | Not documented |
| Max session length | Not documented |
| Persistence | Not documented |
| GPU | Not documented |
| Networking | Not documented |
| Pricing | Not published: the Mistral pricing page says tool APIs are priced per call but lists no rate for code execution |
| Free tier | Not documented |
| Compliance | Not documented |
| Regions | Not 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
| Sandbox | Isolation | Open source | Self-host / BYOC | Cold start (vendor) | Max session | Snapshots / pause | GPU | SDKs |
|---|---|---|---|---|---|---|---|---|
| Mistral code interpreter | Isolated container | No | No / No | Not documented | Not documented | Not documented / Not documented | Not documented | Python, JavaScript/TypeScript, REST API |
| OpenAI Code Interpreter & Hosted Shell | VM (unspecified) | No | No / No | Not documented | 20 min idle | No / No | No | OpenAI Responses API, Containers API, OpenAI SDKs |
| Claude code execution tool | Hosted Linux container | No | No / No | Not documented | 30 days (container) | No / Not documented | No | Python, JavaScript/TypeScript, Go, Java, C#, PHP, Ruby, REST API, CLI |
| Gemini API code execution | Hosted Python runtime | No | No / No | Not documented | 30 s per execution | No / No | No | Python, JavaScript/TypeScript, Go, Java, REST API |
| Azure Container Apps dynamic sessions | Hyper-V VM | No | No / No | Sub-second (pooled) | 220 s / exec | No / No | No | REST API, Azure CLI, LangChain, LlamaIndex, Semantic Kernel |
| E2B | Firecracker microVM | Yes | Yes / Yes | Not documented | 1 h / 24 h (Pro) | Yes / Yes | No | Python, JavaScript/TypeScript |
Frequently asked questions
What is Mistral code interpreter?
How does Mistral code interpreter isolate code?
Is Mistral code interpreter open source?
How much does Mistral code interpreter cost?
What are the alternatives to Mistral code interpreter?
Sources
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.