页面简介
Agent Sandbox is a cloud native controller for sandboxes
正文摘录
Build Agents in a Safer Environment Agent Sandbox Quickstart Spin up an isolated sandbox and run code in a few lines with the SDK. Python Go from k8s_agent_sandbox import SandboxClient client = SandboxClient() sandbox = client.create_sandbox( warmpool="example-sandbox-pool", namespace="default", ) try: result = sandbox.commands.run("echo 'Hello from Agent Sandbox!'") print(result.stdout) # Hello from Agent Sandbox! finally: sandbox.terminate() Read the full Python SDK quickstart → package main import ( "context" "fmt" "log" "sigs.k8s.io/agent-sandbox/clients/go/sandbox" ) func main() { ctx := context.Background() // Connect to your cluster and ensure sandboxes are cleaned up. client, err := sandbox.NewClient(ctx, sandbox.Options{ WarmPoolName: "example-sandbox-pool", Namespace: "default", RouterNamespace: "agent-sandbox-system", }) if err != nil { log.Fatal(err) } defer client.DeleteAll(ctx) // Create a sandbox and run a command. // CreateSandbox arguments take precedence over options passed with Options sb, err := client.CreateSandbox(ctx, "example-sandbox-pool", "default") if err != nil { log.Print(err) return } result, err := sb.Run(ctx, "echo 'Hello from the sandbox!'") if err != nil { log.Print(err) return } fmt.Println(result.Stdout) } Read the full Go SDK quickstart → GitHub View Source Code Documentation Read and Deploy Agent Sandbox provides a secure and isolated execution layer to safely deploy autonomous AI agents on Kubernetes that generate and run untrusted code at scale. Use Cases Short-lived sandbox Code Execution Run untrusted code in fully isolated sandboxes. Ideal for code interpreters, analytics tools, and on-demand computation. Medium-lived sandbox Coding Agents Autonomous agents that write, debug, and refactor code inside secure sandboxes with full dev tooling. Medium-lived sandbox Computer Use AI agents that interact with graphical desktops, browsers, and GUI applications inside isolated sandboxes. Short to medium-lived sandbox CI/CD Integrate Agent Sandbox into CI/CD pipelines for isolated testing, validation, and automated workflows. Always-lived sandbox Agents in Sandbox — OpenClaw Run always-on agent environments with OpenClaw inside Agent Sandbox for persistent, long-running workloads. Isolation runtime gVisor Isolation Harden sandbox isolation with gVisor — a userspace kernel that intercepts system calls to protect the host. Isolation runtime Kata Containers Isolation Hardware virtualization with a dedicated kernel per sandbox via Kata Containers and QEMU. Enable Complex Agentic Workloads Safely execute arbitrary, untrusted code in a fully isolated environment to enable high-risk applications like stateful code interpretation, agentic web browsing, complex "computer use" tasks, and sophisticated data analysis Decoupled Isolation. Built for Choice Interoperability is core to Agent Sandbox with a standardized Kubernetes API that fully decouples the execution layer from the underlying isolation technology. This abstraction supports various backends, including gVisor and Kata Containers, allowing you to select the isolation method that perfectly aligns with your specific security, performance, and workload needs Contributions welcome! We do a Pull Request contributions workflow on GitHub. Read more Connect with us Talk to contributors on #agent-sandbox channel Read more Join the mailing group Join the conversation on the mailing group Read more