In short.
Mistral's Local sandboxes is a setup guide for developers testing AI agents locally or in CI, but its direct host option lets generated commands access files with the user's permissions. LocalDockerSandbox supplies a Docker container with Python and requires a local Docker daemon. BashkitSandbox supplies an in-process Bash and filesystem environment without Python, git or background processes. DangerousLocalSandbox executes directly on the host and requires explicit opt-in. The guide gives useful configuration examples and cleanup details, but does not establish prices, performance or software compatibility across versions. Nothing was installed or executed.
Researched and written by an AI model and checked by a second AI model. How it works
Covers the complete Local sandboxes page at [https://docs.mistral.ai/studio/agents/learn/environment/local-sandboxes.md], including all three environments, setup examples, workspace cleanup, the host-execution danger notice and troubleshooting. Linked pages are excluded. No packages were installed, commands executed, agent tasks run or isolation guarantees tested.
The overview
Identity
Local sandboxes is a Mistral documentation guide at [https://docs.mistral.ai/studio/agents/learn/environment/local-sandboxes.md]. It explains three environments that execute agent commands on the machine running the agent: LocalDockerSandbox, BashkitSandbox and DangerousLocalSandbox.
These local environments do not require the cloud_user role. The page positions them for development and testing, and directs deployment users to MistralSandbox.
Assessment
The guide is useful for choosing where a Mistral agent's commands should run. Its strongest practical detail is the connection between each environment's tool support, infrastructure requirements and access to the host machine.
It supports a configuration decision, but does not demonstrate an agent completing a task. Performance, reliability and the effectiveness of isolation have not been independently assessed here.
Users
The intended readers are developers building or testing Mistral agents on a workstation or in continuous integration. Docker users get a path to container execution with Python; developers needing only shell and file operations get a smaller in-process option.
Beginners should understand that a sandbox controls where generated commands execute. Despite its name, DangerousLocalSandbox supplies no isolation: those commands run with the permissions and environment of the user running the agent.
Capabilities
LocalDockerSandbox runs each session in a Docker container, includes Python through its default image and accepts image or setup_script configuration to supply additional tools. With a custom image, background processes are disabled unless supports_background_processes=True is set.
BashkitSandbox runs an in-process Bash interpreter and filesystem sandbox with shell and built-in file tools. It does not provide Python, git or background processes.
DangerousLocalSandbox runs shell and file tools directly on the host. It can use an existing project folder, and its commands can reach every network the host can reach.
Using it
Requirements
LocalDockerSandbox requires the docker Python package and a Docker daemon accessible to the agent process. Mistral-managed deployments do not have that daemon, so this environment cannot be carried into those deployments unchanged.
BashkitSandbox requires the mistralai-agents[bashkit] optional extra. DangerousLocalSandbox requires ALLOW_DANGEROUS_LOCAL_HOST=1 and emits a UserWarning when constructed.
The page does not specify supported SDK versions, authentication setup, general Python compatibility or operating system support.
Mechanism
For Docker sessions, the default image is python:3.12-bookworm. The agent works in /workspace, bind-mounted from a per-session directory under ~/.cache/. The container and that directory are removed when the session closes.
Bashkit executes its shell and filesystem operations inside the agent process. Its network behavior is discussed on a linked page and is not established by this page.
Host execution uses a temporary per-session workspace under ~/.cache/ unless workspace is supplied. An explicit workspace keeps its files after session closure. Without one, the default workspace is deleted; the page names delete_on_cleanup as a configurable control but leaves its details to the reference documentation.
Setup
For Docker, the guide instructs readers to install the Python package with uv add docker, start a Docker daemon and pass agents.LocalDockerSandbox() as the environment when constructing agents.Agent.
For Bashkit, it gives uv add 'mistralai-agents[bashkit]' and agents.BashkitSandbox(). For direct host execution, it shows agents.DangerousLocalSandbox(shell="bash"), subject to the required environment-variable opt-in.
A missing docker module is addressed by installing the docker package. DangerousLocalSandbox rejects a network argument because it cannot enforce a separate network policy; the documented fix is to omit that argument.
Example
The Docker example imports agents from mistralai and constructs agents.Agent(model="mistral-large-4", name="docker-agent", environment=agents.LocalDockerSandbox()). It illustrates how to select the execution environment while creating an agent.
The host example also shows agents.DangerousLocalSandbox(workspace="/abs/path/to/project") to run commands in an existing folder and retain its files. Neither example includes a task, execution transcript or expected output. The examples were not executed, and the model name does not establish current model availability.
Assessment & evidence
Limitations
LocalDockerSandbox has no CPU or memory limit and uses the reader's Docker daemon. The guide advises restricting it to code the reader is willing to run on that machine. Container execution should not be read as a guarantee against every host risk.
DangerousLocalSandbox can read, write or delete files, including credentials visible to the process. It cannot restrict network access. The guide explicitly says never to enable it in production or shared environments.
Bashkit's missing Python, git and background-process support limits applicable workloads. Full configuration defaults, detailed network behavior and production setup are outside this page.
Reasoning
LocalDockerSandbox is the documented fit when local testing needs Python and container isolation and a Docker daemon is available. BashkitSandbox fits shell and file tasks that can operate without Python, git or background processes.
Direct host execution removes the Docker requirement but exposes the user's files, permissions and reachable networks. These recommendations follow the documented capability differences; comparative speed, reliability and security effectiveness are unknown.
Alternatives
The three local environments are alternatives within this guide. Their principal tradeoffs are container requirements, available tools and access to the host.
The page recommends MistralSandbox for deployment and points to it for Python, git or background processes when Bashkit is insufficient. Its linked documentation was not included, so its setup, pricing and detailed isolation behavior are not assessed. The source provides no comparison with other vendors.
Evidence
The source is Mistral's complete Local sandboxes documentation page at [https://docs.mistral.ai/studio/agents/learn/environment/local-sandboxes.md]. It contains installation commands, configuration examples, workspace behavior, capability limits, warnings and two troubleshooting entries.
These are documented behaviors rather than observed execution results. The page contains no benchmarks or task outcomes, and no installation or execution was performed. Linked reference, network and setup pages were not assessed.
Access & freshness
Costs
The page provides no prices for model usage, hosted execution or other services. Total operating cost is unknown.
The local environments use the developer's machine or CI infrastructure. The guide gives no resource measurements or workload estimates from which to calculate those costs.
Rights
The page states no documentation reuse licence, software licence or redistribution permission. It also does not establish the licensing terms of the SDK packages, default container image or additional dependencies.
Permission to redistribute the documentation or associated software is therefore unknown from this source.
Freshness
The supplied copy was captured on 15 November 2026. The page itself gives no publication or last-updated date.
The examples name mistral-large-4 and the default image python:3.12-bookworm, but do not pin an SDK version. Compatibility with a particular installed release and changes after capture are unknown.
Actions
Choose the environment according to the tools the agent needs and the host access you accept. For local Python work with container isolation, follow the Docker setup. For shell and file tasks within Bashkit's limits, install its optional extra.
Before using a custom Docker image, check its required tools and background-process setting. For Mistral-managed deployment, follow the separate MistralSandbox documentation. Keep DangerousLocalSandbox out of production and shared environments, as the guide directs.
