GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - xiaods/k8e: k8e.sh - OpenSource Agentic AI Sandbox Matrix

BranchesTags
Open more actions menu

Latest commit

 

History

1,934 Commits
1,934 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.pi/extensions
.pi/extensions
 
 
cmd
cmd
 
 
contrib
contrib
 
 
docs
docs
 
 
hack
hack
 
 
manifests
manifests
 
 
pkg
pkg
 
 
plugins/deepseek-harness
plugins/deepseek-harness
 
 
proto/sandbox/v1
proto/sandbox/v1
 
 
sandbox
sandbox
 
 
sandboxd
sandboxd
 
 
tandem
tandem
 
 
tests
tests
 
 
.deepsource.toml
.deepsource.toml
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
.golangci.json
.golangci.json
 
 
.sonarcloud.properties
.sonarcloud.properties
 
 
AGENTS.md
AGENTS.md
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
build.zig
build.zig
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
main.go
main.go
 
 
skills-lock.json
skills-lock.json
 
 
sonar-project.properties
sonar-project.properties
 
 

Repository files navigation

K8E sandbox

Go Version License Stars Release Arch


k8e.sh β€” Open Source Agentic AI Sandbox Matrix. A single binary under 100MB that turns any Linux host into a secure, isolated execution platform for AI agents β€” gVisor, Kata, or Firecracker isolation, warm-pool fast starts, and an E2B-compatible API. Up and running in 60 seconds.


curl -sfL https://k8e.sh/install.sh | sh -

That's it. Your agentic sandbox matrix is ready. πŸ€–


πŸ€– What is K8E?

K8E is the Open Source Agentic AI Sandbox Matrix β€” a self-hosted sandbox platform for running secure, isolated AI agent workloads at scale, packaged as a single binary under 100MB.

As autonomous AI agents increasingly generate and execute untrusted code, robust sandboxing infrastructure is no longer optional. K8E ships everything needed to spin up a production-grade cluster in under 60 seconds, with first-class primitives for agent isolation, resource governance, and persistent execution environments β€” purpose-built for the AI era.

πŸ”’ One cluster. Many agents. Zero trust between them.

Sandbox Capabilities

Capability Description
πŸ”’ Hardware Isolation Pluggable runtimes: gVisor (default), Kata Containers, Firecracker microVM
🌐 Network Policies Bundled Cilium enforces the standard networking.k8s.io/v1 NetworkPolicy API by default β€” plus eBPF toFQDNs egress control per session; allowed_hosts enforced via --cilium-dns-proxy (KIP-16 M10)
βš–οΈ Resource Quotas CPU/memory caps per agent session to prevent runaway costs
πŸ’Ύ Persistent Workspaces Every session carries a PVC workspace (1Gi local-path by default); warm pods boot with their claim pre-provisioned β€” fast start and durable files
🧠 Warm Pool Pre-booted sandbox pods for sub-500ms session claim latency; application-layer readiness handshake, adaptive sizing, per-session background-run caps
πŸ“Έ Content-Addressed Snapshots SHA-256 CAS layerstore with zstd compression, chunked multi-layer manifests, incremental --base restore, server-side registry, autosquash (KIP-16 M2)
πŸ“œ Exec Transcripts File-backed, windowed, offset-resumable command transcripts β€” k8e-sandbox-cli log (KIP-16 M4)
πŸ“Š Observability Prometheus metrics, disk-only NDJSON event stream, process topology β€” events / ps CLI (KIP-16 M5)
πŸ”„ Sub-agent Reuse Sub-agents share the parent pod + workspace; isolated reset (KIP-16 M1)
🧾 CLI Catalog Machine-readable command/flag surface for SDK generation β€” catalog (KIP-16 M9)
🀝 agent-sandbox compatible Works with kubernetes-sigs/agent-sandbox
πŸ”„ SKILL + CLI + MCP AI agents (Claude Code, Codex, Pi) connect via k8e-sandbox-cli or the /k8e-sandbox skill

πŸ“š Full documentation: k8e.sh/guide β€” guides, CLI reference, and examples live on the official site.


πŸ—οΈ Architecture

 AI Agents (Claude Code / Codex / Pi / dsh)
        β”‚  k8e-sandbox-cli / plugin tools    (gRPC over mTLS)
        β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              SANDBOX GATEWAY                 β”‚
β”‚  sessions Β· exec Β· files Β· PTY terminals     β”‚
β”‚  expose Β· allow-hosts Β· snapshots            β”‚
β”‚  warm pool Β· metrics Β· event stream          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚ claims ready pods from the warm pool
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚   SANDBOX POD         β”‚   β”‚   SANDBOX POD  β”‚
   β”‚   gVisor / Kata / FC  β”‚ … β”‚   (isolated)   β”‚
   β”‚   agent's code + PVC  β”‚   β”‚                β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        eBPF per-session network policy between all of them

One gateway fronts every operation β€” session lifecycle, streaming exec, filesystem, PTY terminals, service exposure (expose), live egress policy (allow-hosts) and content-addressed snapshots β€” so agents get one audited door instead of raw infrastructure access.


πŸš€ Quick Start

Step 1 β€” Install a Sandbox Runtime (recommended: before K8E)

gVisor is recommended β€” no KVM required:

ARCH=$(uname -m)   # x86_64 on most servers, aarch64 on ARM
URL=https://storage.googleapis.com/gvisor/releases/release/latest/${ARCH}

wget ${URL}/gvisor.tar.zstd ${URL}/gvisor.tar.zstd.sha512
sha512sum -c gvisor.tar.zstd.sha512   # must print OK
sudo tar --zstd -xf gvisor.tar.zstd -C /usr/local/bin

K8E detects runsc at startup and automatically injects the gVisor stanza into its containerd config. Do not run runsc install β€” K8E manages its own containerd configuration.

Need stronger isolation? Kata Containers and Firecracker are covered in the Sandbox Runtime Setup guide.

Step 2 β€” Install K8E

curl -sfL https://k8e.sh/install.sh | sh -

Step 3 β€” Verify the Sandbox

k8e-sandbox-cli status        # -> {"available": true, ...}
k8e-sandbox-cli run 'echo hello from the sandbox'

Step 4 β€” Connect Your AI Agent

Download the standalone sandbox CLI, authenticate, and install the /k8e-sandbox skill into your agent:

# 1. Download (~44MB) β€” pick your platform suffix
#    k8e-sandbox-cli-linux-amd64 / linux-arm64 / darwin-arm64 / windows-amd64.exe
curl -sLO https://github.com/xiaods/k8e/releases/latest/download/k8e-sandbox-cli-linux-amd64
chmod +x k8e-sandbox-cli-linux-amd64

# 2. Create an API key on the server (default TTL 30 days; --ttl never for non-expiring)
k8e sandbox-apikey create my-agent
# β†’ {"name":"my-agent","key":"k8e-abc123...","ttl_days":30,"expires_at":"..."}

# 3. Connect: mTLS auth + install the skill into Claude Code / Codex / Pi
./k8e-sandbox-cli-linux-amd64 --endpoint <server-ip>:50051 --apikey k8e-abc123... connect

Then ask your agent naturally:

"Run this Python snippet in a sandbox"

The agent executes k8e-sandbox-cli run automatically β€” no session management needed.

πŸ“– Tutorial walkthroughs, the full command reference, and configuration details live in the Sandbox CLI guide and Sandbox Examples on the official docs site.


πŸ†š K8E vs Other Sandbox Platforms

K8E πŸš€ E2B Daytona agent-sandbox DIY gVisor/Firecracker
Self-hosted, single binary βœ… <100MB ⚠️ Heavy (per-env VM images) βœ… ❌ needs a K8s cluster ❌ you build it
Isolation runtimes βœ… gVisor / Kata / Firecracker β€” pluggable Firecracker microVMs βœ… microVM/containers K8s RuntimeClass one runtime
E2B SDK compatibility βœ… native (official SDKs unmodified) βœ… native ❌ own API ❌ ❌
Warm pool (sub-500ms claims) βœ… built-in, adaptive sizing βœ… managed ⚠️ ⚠️ manual scaling ❌
Per-session network policy (eBPF) βœ… Cilium, live-configurable managed (fixed) ⚠️ ⚠️ NetworkPolicy hand-written
License Apache 2.0 Apache 2.0 (hosted core paid) Apache 2.0 Apache 2.0 β€”

When to choose K8E: you want E2B-style sandboxes but self-hosted, with a rich tool surface beyond "run code" β€” PTY terminals, snapshots, service exposure, and live egress policy, all through one audited gateway.


🀝 Contributing

git clone https://github.com/<your-username>/k8e.git && cd k8e
git checkout -b feat/my-feature
make && make test
git push origin feat/my-feature
  • πŸ› Bug Reports
  • πŸ’‘ Feature Requests
  • πŸ” Open PRs

πŸ›‘οΈ Security

Report vulnerabilities via GitHub Security Advisories. Do not open public issues for security bugs.


πŸ“„ License

Apache License 2.0 β€” see LICENSE.


πŸ™ Acknowledgments

Project Contribution
πŸ„ K3s Lightweight Kubernetes foundation that inspired K8E
☸️ Kubernetes The orchestration engine everything is built on
πŸ”· Cilium eBPF-powered networking and per-session egress control
πŸ€– agent-sandbox Kubernetes-native agent sandboxing primitives
🌐 CNCF Fostering the open-source cloud native ecosystem

k8e.sh β€” Open Source Agentic AI Sandbox Matrix

GitHub Website Docs

If K8E powers your agents, give us a ⭐ β€” it means the world to us!

About

k8e.sh - OpenSource Agentic AI Sandbox Matrix

k8e.sh

Topics

agentic-aidsh-plugink8skubernetessandbox-playground

Resources

Readme
Apache-2.0 license
Activity

Stars

518 stars

Watchers

9 watching

Forks

35 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.