Microsandbox: Secure, Self-Hosted Sandboxes for AI Agents and Untrusted Code

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Microsandbox: Secure, Self-Hosted Sandboxes for AI Agents and Untrusted Code

Summary

Microsandbox is an open-source project providing self-hosted, hardware-isolated sandboxes designed for securely executing untrusted user and AI code. It offers a unique balance of strong isolation, instant startup times, and OCI compatibility, addressing the challenges of traditional container and VM solutions. Built in Rust, Microsandbox is ideal for developers building agentic AI applications requiring robust and flexible execution environments.

Repository Information

Analyzed by OSRepos on January 28, 2026

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introdução

Microsandbox é um projeto open-source inovador desenvolvido pela zerocore-ai, que oferece sandboxes auto-hospedadas e isoladas por hardware para a execução segura de código de usuário e IA não confiável. Construído em Rust, ele visa superar as limitações de soluções tradicionais como contêineres e máquinas virtuais, fornecendo uma combinação de forte isolamento, tempos de inicialização instantâneos e compatibilidade OCI. Isso o torna uma espinha dorsal ideal para a web agêntica, permitindo ambientes de execução rápidos, seguros e flexíveis para agentes de IA e outras cargas de trabalho exigentes. Com 4498 estrelas e 208 forks, está ganhando uma tração significativa na comunidade de desenvolvedores.

Instalação

Para começar com o Microsandbox, siga estes passos simples:

  1. Baixe microsandbox:

    curl -sSL https://get.microsandbox.dev | sh
    
  2. Inicie o servidor:

    msb server start --dev
    
  3. Puxe uma imagem de ambiente (Opcional):

    msb pull microsandbox/python
    

Exemplos

Microsandbox oferece maneiras flexíveis de gerenciar e acessar sandboxes, incluindo utilitários de linha de comando e SDKs para várias linguagens.

Exemplos de Linha de Comando:

  • Sandbox Temporário: Para tarefas únicas, crie um ambiente limpo que não deixa rastros na saída.

    msx python # ou `msb exe --image python`
    
  • Sandboxes em todo o Sistema: Execute sandboxes de longa duração configuradas automaticamente como executáveis em todo o sistema.

    msi python py-data # ou `msb install --image alpine py-data`
    py-data # De qualquer diretório, execute a sandbox
    

Exemplos de SDK (BETA):

Microsandbox fornece SDKs para integrar capacidades de sandboxing diretamente em suas aplicações.

  • Python:

    import asyncio
    from microsandbox import PythonSandbox
    
    async def main():
        async with PythonSandbox.create(name="test") as sb:
            exec = await sb.run("name = 'Python'")
            exec = await sb.run("print(f'Hello {name}!')")
    
        print(await exec.output()) # prints Hello Python!
    
    asyncio.run(main())
    
  • JavaScript:

    import { NodeSandbox } from "microsandbox";
    
    async function main() {
      const sb = await NodeSandbox.create({ name: "test" });
    
      try {
        let exec = await sb.run("var name = 'JavaScript'");
        exec = await sb.run("console.log(`Hello ${name}!`)");
    
        console.log(await exec.output()); // prints Hello JavaScript!
      } finally {
        await sb.stop();
      }
    }
    
    main().catch(console.error);
    
  • Rust:

    use microsandbox::{SandboxOptions, PythonSandbox};
    
    #[tokio::main]
    async fn main() -> Result<(), Box> {
        let options = SandboxOptions::builder().name("test").build();
        let mut sb = PythonSandbox::create(options).await?;
    
        let exec = sb.run(r#"name = "Rust""#).await?;
        let exec = sb.run(r#"print(f"Hello {name}!")"#).await?;
    
        println!("{}", exec.output().await?); // prints Hello Rust!
    
        sb.stop().await?;
    
        Ok(())
    }
    

Porquê usar Microsandbox

Microsandbox se destaca por oferecer uma combinação atraente de recursos que abordam necessidades críticas no desenvolvimento de software moderno, especialmente para aplicações de IA e agênticas:

  • Forte Isolamento: Atinge isolamento de VM em nível de hardware usando microVMs, garantindo que o código não confiável seja executado em um ambiente altamente seguro.

  • Inicialização Instantânea: Com tempos de inicialização abaixo de 200 ms, o Microsandbox fornece ambientes de execução quase instantâneos, cruciais para aplicações dinâmicas e responsivas.

  • Compatível com OCI: Pode executar imagens de contêiner padrão, permitindo que os desenvolvedores aproveitem os ecossistemas existentes de Docker e OCI.

  • Auto-Hospedado: Implante o Microsandbox dentro de sua própria infraestrutura, dando-lhe total autonomia e controle sobre seus ambientes de execução.

  • Pronto para IA: Integra-se perfeitamente com fluxos de trabalho de agentes e IA via MCP, tornando-o uma ferramenta poderosa para construir sistemas de IA seguros e escaláveis.

Seu design como a espinha dorsal de execução da web agêntica destaca seu foco em velocidade, segurança e flexibilidade para a próxima geração de aplicações impulsionadas por IA.

Links

Related repositories

Similar repositories that may be relevant next.

OpenLogi: A Native, Local-First Logitech Options+ Alternative in Rust

OpenLogi: A Native, Local-First Logitech Options+ Alternative in Rust

June 1, 2026

OpenLogi is a native, local-first alternative to Logitech Options+, built with Rust. It allows users to remap mouse buttons, control DPI, and manage SmartShift functionality over HID++ without requiring an account or collecting telemetry. This project prioritizes privacy and local control for Logitech mouse users.

RustLogitechMouse Remapping
RustTraining: Comprehensive Learning Paths for Rust Programmers

RustTraining: Comprehensive Learning Paths for Rust Programmers

May 29, 2026

Microsoft's RustTraining repository offers a comprehensive collection of learning materials designed for Rust programmers of all levels. It provides seven structured training courses, covering topics from foundational concepts for various programming backgrounds to deep dives into async Rust, advanced patterns, and engineering practices. This resource aims to consolidate scattered knowledge into a cohesive and pedagogically sound learning experience.

RustProgrammingTraining
OpenHuman: Your Private, Powerful AI Super Intelligence

OpenHuman: Your Private, Powerful AI Super Intelligence

May 27, 2026

OpenHuman is an open-source, agent-based personal AI assistant built with Rust, designed for privacy, simplicity, and power. It integrates seamlessly into your daily workflow, offering local knowledge management, extensive third-party integrations, and advanced memory capabilities. This project aims to provide a personal AI that truly understands and remembers your context from day one.

RustAIPersonal AI
Tokio: An Asynchronous Runtime for Reliable Rust Applications

Tokio: An Asynchronous Runtime for Reliable Rust Applications

April 27, 2026

Tokio is a powerful asynchronous runtime for the Rust programming language, enabling developers to build fast, reliable, and scalable applications. It provides essential components like I/O, networking, scheduling, and timers, making it ideal for high-performance concurrent systems.

Rustasynchronousnetworking

Source repository

Open the original repository on GitHub.

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️