Agent-Sandbox: Enterprise-Grade Sandbox for AI Agents on Kubernetes

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

Agent-Sandbox: Enterprise-Grade Sandbox for AI Agents on Kubernetes

Summary

Agent-Sandbox provides an easy-to-use, enterprise-grade sandbox platform for AI Agents. It allows agents to securely run untrusted LLM-generated code, perform browser and computer use, and deploy websites with multi-session and multi-tenant isolation. This self-hosted solution wraps a robust Kubernetes foundation behind a simple RESTful API, making it accessible for developers.

Repository Information

Analyzed by OSRepos on August 28, 2026

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.

Introduction

Agent-Sandbox is an easy-to-use, enterprise-grade sandbox platform specifically designed for AI Agents. It addresses the critical challenge of securely running untrusted, LLM-generated code and actions. With Agent-Sandbox, AI agents can safely perform tasks like code execution, browser use, computer use, and even deploy websites, all within isolated environments.

The platform ensures multi-session and multi-tenant isolation, preventing one agent's runaway task from affecting another. While built upon the robust Kubernetes foundation, similar to kubernetes-sigs/agent-sandbox, Agent-Sandbox simplifies interaction by wrapping this complexity behind a user-friendly RESTful API and an MCP server. This design allows agents and developers to create, use, and delete sandboxes without direct Kubernetes interaction, drawing inspiration from platforms like Blaxel Sandbox and E2B, but offering an open-source, self-hosted solution.

Installation

To get started with Agent-Sandbox, you will need a Kubernetes cluster running version 1.28 or higher. The installation process is straightforward, involving a single command to apply the provided install.yaml file.

First, create a dedicated namespace for Agent-Sandbox:

kubectl create namespace agent-sandbox

Then, apply the installation manifest:

kubectl apply -nagent-sandbox -f https://github.com/agent-sandbox/agent-sandbox/blob/main/install.yaml

After installation, you can expose the Agent-Sandbox API server using an Ingress. Here is an example configuration:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: agent-sandbox
  namespace: agent-sandbox
spec:
  ingressClassName: ingress-nginx
  rules:
  - host: agent-sandbox.your-host.com
    http:
      paths:
      - backend:
          service:
            name: agent-sandbox
            port:
              number: 80
        path: /

Once the Ingress is configured, the Agent-Sandbox API server will be accessible at http://agent-sandbox.your-host.com.

Examples

Agent-Sandbox offers full E2B protocol and SDK compatibility, making it a drop-in replacement for existing E2B-based agents and tools. Here is an example of how to use it with the E2B Python SDK.

Requirements:
Ensure you have the following Python packages installed:

e2b == 2.21.1
e2b-code-interpreter == 2.4.1

Configure the E2B backend address:
Set the necessary environment variables to point to your Agent-Sandbox instance:

export E2B_API_KEY=testuser-aef134ef-7aa1-945e-9399-7df9a4ad0c3f
export E2B_DOMAIN=agent-sandbox.your-host.com
export E2B_API_URL=http://agent-sandbox.your-host/e2b/v1

Python example:
This Python script demonstrates creating a sandbox, running a background command, creating a snapshot, and uploading a file.

from e2b_code_interpreter import Sandbox

idleTimeout = 60*10

# Create a sandbox instance from the "sandbox-base-node" template,
# with an idle timeout of 10 minutes,
# a lifecycle that pauses the sandbox and automatically resumes it when accessed again.
sbx = Sandbox.create(
    template="sandbox-base-node",
    timeout=-1,  # no hard lifetime; idle timeout owns reclamation
    metadata={"idleTimeout": str(idleTimeout)}, 
    lifecycle={"on_timeout": "pause", "auto_resume": True}, 
)
    
print(sbx.get_info())

# Run a background command in the sandbox
sbx.commands.run("npx serve -l 8008", background=True, timeout=0)

# Create processes snapshot for the sandbox, when the sandbox is resumed,
# the background command can be restored automatically
sbx.create_snapshot()

# Upload file to sandbox
with open("README.md", "rb") as file:
    sbx.files.write("README.md", file)

f = sbx.files.list("/home")
print(f)

You can also manage sandboxes via the built-in Web UI, accessible at http://agent-sandbox.your-host.com/ui, or continue to use the E2B SDK for programmatic control.

Why Use Agent-Sandbox?

Agent-Sandbox stands out for its simplicity, comprehensive features, and extensibility, making it an ideal choice for AI agent development:

  • Lightweight, Easy to Run: Deploy with a single command, kubectl apply -f install.yaml, in under a minute. It requires no external databases or message queues, leveraging native Kubernetes objects for state management. A built-in Web UI is included in the same image for easy management.
  • Feature-Complete for AI Sandbox Workloads: It offers full E2B protocol and SDK compatibility, covering essential AI agent needs like code execution, browser use, computer/desktop use, and shell access. Production-grade features include multi-tenant isolation, a Sandbox Pool for low-latency allocation, Pause/Resume, Snapshot capabilities, scale-to-zero on idle, leader election for high availability, and comprehensive events and metrics.
  • Flexible, Built to Be Extended: Agent-Sandbox provides two independent, live-editable layers, Blueprint and Template, allowing dynamic configuration of sandbox deployment and types without redeployment. It supports dynamic templates matched by regex and offers per-template resource limits, warmup commands, and pool sizing for diverse sandbox requirements.

Links

Related repositories

Similar repositories that may be relevant next.

awesome-a2a: A Curated List of Agent2Agent (A2A) Resources

awesome-a2a: A Curated List of Agent2Agent (A2A) Resources

August 21, 2026

The awesome-a2a repository is a comprehensive, curated list of Agent2Agent (A2A) protocol servers, clients, tools, and frameworks. It serves as a central hub for developers looking to explore and build interoperable AI agent systems. This resource helps in discovering various A2A-compliant implementations and related utilities.

a2aagentagent2agent
AgentSkills: A Curated Collection for LLM Agent Skills and Resources

AgentSkills: A Curated Collection for LLM Agent Skills and Resources

August 20, 2026

AgentSkills is an extensive curated collection of resources, papers, tools, projects, and frameworks focused on building and deploying skills for large language models. This repository serves as a central hub for understanding the LLM skills ecosystem, from Anthropic's official systems to academic research and open-source agent frameworks. It is an invaluable resource for anyone exploring the rapidly evolving field of AI agents.

agentagent-skillsllm
ClawHub: The Public Skill and Plugin Registry for OpenClaw

ClawHub: The Public Skill and Plugin Registry for OpenClaw

August 19, 2026

ClawHub is the public skill and plugin registry for OpenClaw, designed for publishing, versioning, and searching text-based agent skills and code plugins. It offers fast browsing, a CLI-friendly API, moderation hooks, and vector search capabilities. This platform streamlines the discovery and management of resources for the OpenClaw ecosystem.

directoryskillTypeScript
Open Interpreter: A Rust-Based Coding Agent for Low-Cost Models

Open Interpreter: A Rust-Based Coding Agent for Low-Cost Models

August 18, 2026

Open Interpreter is a powerful coding agent written in Rust, specifically optimized for performance with low-cost models like Kimi K3. It provides a Codex-like interface, enabling users to interact with various models and harnesses for efficient code generation and execution. This project emphasizes portability and compatibility with existing agent setups and standards.

rustcoding-agentAI

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 ❤️