LibreAI / AI Agents / SandboxFusion
// agents · bytedance/SandboxFusion

SandboxFusion

ByteDance's SandboxFusion: a secure sandbox for running and judging LLM-generated code in 20+ languages.

★ 1.1k stars⑂ 103 forksApache-2.0updated 2026-07
▦ visual — this project's README ships no embeddable screenshot,
so here's a placeholder. The guide below is complete regardless.
// project facts

Project facts

SandboxFusion is an open-source ai agents project by bytedance (bytedance/SandboxFusion on GitHub). It has 1,072 GitHub stars and 103 forks, is released under the Apache-2.0 license, and was last updated on GitHub on 14 July 2026.

GitHub stars
1,072
Forks
103
License
Apache-2.0
Last updated on GitHub
14 July 2026
Category
AI Agents
Listing
Full install guide
Official site
Official site
// how it works

How it works

  1. Clarify your goal

    Decide whether you need just code execution or the full online-judge evaluation datasets, and which languages your workloads use.

  2. Get the project

    Clone the repository and build the base and server Docker images, or set up the manual Conda and Poetry environment.

  3. Install and configure

    Adjust the server image's base reference as documented and start the sandbox container.

  4. Run your first task

    Send code-execution or judging requests to the local service and integrate it into your evaluation or RL pipeline.

// features

Why people love it

Multi-language code runner

Runs and returns results for snippets across Python, C++, C#, Go, Java, Node.js, TypeScript, Rust, and many more languages, with pytest, go test, JUnit, and Jest support and Jupyter-mode execution.

GPU execution modes

Supports CUDA and Python GPU workloads in addition to CPU execution.

Online judge for known datasets

Implements evaluation for datasets such as HumanEval, MultiPL-E, CodeContests, MBPP, MBXP, MHPP, CRUXEval, NaturalCodeBench, PAL-Math, and verilog-eval.

Docker-first deployment

Documented two-image Docker build (base plus server) with host-network mode keeping the service local-only by default.

Per-language runtime installers

Runtime folders contain install scripts so you can add or trim language support, for example the Python runtime.

Development tooling

Make targets cover running with hot reload, the full test suite, individual test cases with debugging, and code formatting.

Advertisement
// run it

Run it yourself

  1. Clone the repository

    Get the sandbox source and its Docker scripts.

    git clone https://github.com/bytedance/SandboxFusion.git
    cd SandboxFusion
  2. Build the Docker images

    Build the base image, point the server Dockerfile at it, then build the server image, exactly as the README documents.

    docker build -f ./scripts/Dockerfile.base -t code_sandbox:base .
    sed -i '1s/.*/FROM code_sandbox:base/' ./scripts/Dockerfile.server
    docker build -f ./scripts/Dockerfile.server -t code_sandbox:server .
  3. Run the sandbox service

    Host-network mode keeps it reachable only at 127.0.0.1:8080 on Linux.

    docker run -d --rm --network host code_sandbox:server
// use cases

What you can build

Advertisement
// faq

Questions, answered

Who maintains it?

It is maintained by ByteDance's Seed foundation code team on GitHub.

Is it free to use?

Yes, it is Apache-2.0 licensed and free to self-host; you provide the compute it runs on.

Does it need a paid API key?

No API key is needed; SandboxFusion is infrastructure that runs code for your own evaluation or training pipelines.

How does it compare to a well-known alternative?

Simple subprocess execution is unsafe and single-language; SandboxFusion is a purpose-built, multi-language sandbox service with judging for standard code datasets built in.

How do I get started?

Clone the repo, build the two Docker images as documented, and run the server container; the service binds to 127.0.0.1:8080.

// keep exploring

Similar tools

AI Agents

E2B

Secure sandboxes where AI agents run real code.

★ 14.2k starsApache-2.0
View guide →
AI Agents

OpenSandbox

A secure, fast sandbox runtime where AI agents can execute safely.

★ 15.7k starsApache-2.0
View guide →
AI Agents

goose

an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM

★ 54.9k starsApache-2.0
View guide →
AI Agents

LazyLLM

A low-code tool for building multi-agent LLM apps — chatbots, RAG and fine-tuning in one flow.

★ 3.9k starsApache-2.0
View guide →
AI Agents

ruoyi-ai

Enterprise-grade AI agent framework with multi-provider LLM management, secure knowledge bases and high-precision RAG, visual workflow orchestration, and mul…

★ 5.7k starsMIT
View guide →
AI Agents

fast-agent

Code, build and evaluate LLM agents with full MCP, Skills, ACP and A2A support.

★ 3.9k starsApache-2.0
View guide →
// alternatives

Alternatives in AI Agents

The most-starred other AI Agents projects in the LibreAI catalogue — the realistic shortlist if SandboxFusion is not the right fit.

Get SandboxFusion

Free and open — grab the source, star the repo, and start creating.