zerocore-ai / microsandbox
opensource secure local-first sandboxes for ai agents
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing zerocore-ai/microsandbox in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler view——— easy secure execution of untrusted user/ai code ——— Microsandbox Microsandbox makes it **easy** to run untrusted workloads within a **hardware-isolated** and **fast startup** execution environment. Running untrusted code securely is hard. Traditional solutions—containers, VMs, or cloud sandboxes—each trade off speed, isolation, or control. Microsandbox aims to give the best of all worlds. > [!WARNING] > Microsandbox is still **experimental software**. Expect breaking changes, missing features, and rough edges. Key Features • **Strong Isolation**: Hardware-level VM isolation with microVMs. • **Instant Startup**: Boot times under 200 ms. • **OCI Compatible**: Runs standard container images. • **Self-Hosted**: Deploy within your infrastructure with autonomy. • **AI-Ready**: Integrates seamlessly with agent and AI workflows via MCP. Microsandbox is designed to be the execution backbone of the agentic web—fast, secure, and flexible. Demo Sandbox Environment [ASCIINEMA →] With Claude Getting Started PREREQUISITE 1. Download 2. Start the server 3. Pull the environment image [Optional] BASICS ships with a bunch of flexible commands to make it easy to manage and access sandboxes which are highlighted below Temporary Sandbox For experimentation or one-off tasks, temporary sandboxes provide a clean environment that leaves no trace on exit. For example, create a sandbox based on the image by running: System-wide Sandboxes This provides the option to run long-lived sandboxes which are automatically setup as a system-wide executable. This also makes frequently used sandboxes incredibly convenient to access — no need to navigate to specific directories or remember complex commands. > If no alias is specified, the image name is used as the default. In the example above, this will be . If a sandbox with similar name exists, an error will be returned. > [!TIP] > > Run to see all the options available for a subcommand. > > For example, . SDK BETA 1. Install the SDK > See open issues for future language support. | Language | Instruction | | ---------- | -------------------------- | | Python | | | Rust | | | JavaScript | | 2. Execute the Code > The first run pulls the environment image, so it’ll take a bit longer. You can pre-pull an image it to make runs instant. For more information on how to use the SDK, refer to the SDK Readme. Python JavaScript Rust Project Sandbox BETA Beyond the SDK, microsandbox supports project-based development with the familiar package-manager workflow devs are used to. Think of it like or , but for sandboxes! QUICK DEMO SETUP GUIDE 1. Create a Sandbox Project Each sandbox project needs a file, at the root of the project directory, which serves as the configuration manifest for your sandbox environments. To initialize one, run: 2. Add a Sandbox to the Project Proceed to register a new sandbox named in your . 3. Inspect The newly created sandbox, should be registered in your . If there was a pre-existing , it'd be appended to it. It should be similar to this: 4. Running a Project-Defined Sandbox Next is to run a sandbox defined in your project. This would execute the default _start_ script of your sandbox. For more control, you can directly specify which script to run e.g. . > When running project sandboxes, all file changes and installations made inside the sandbox are automatically persisted to the directory. This means you can stop and restart your sandbox any time without losing your work. Your development environment will be exactly as you left it. Uninstall To uninstall microsandbox, run: . Use the flag. This removes the directory and all its content, effectively cleaning up all cached microsandbox data such as images, layers, and databases. Refer to the maintenance docs for other types of cleanups. Use Cases Wondering how you can use in your next project, see our sample use cases. Contributing Interested in contributing to ? Check out our Development Guide for instructions on setting up your development environment, building the project, running tests, and creating releases. For contribution guidelines, please refer to CONTRIBUTING.md. License This project is licensed under the Apache License 2.0. Ackowledgements Special thanks to all our contributors, testers, and community members who help make microsandbox better every day! We'd like to thank the following projects and communities that made possible: • **libkrun**: The lightweight virtualization library that powers our secure microVM isolation