stateful kubernetes pods for ai-agents
Find a file
2026-02-07 19:30:40 -05:00
.github/workflows build 2026-02-07 14:08:09 -05:00
cmd/agentikube init 2026-02-07 13:49:11 -05:00
internal update 2026-02-07 14:39:14 -05:00
.gitignore readme + gitig 2026-02-07 14:00:08 -05:00
agentikube.yaml update config and initgo CRD 2026-02-07 14:19:40 -05:00
go.mod init 2026-02-07 13:49:11 -05:00
go.sum init 2026-02-07 13:49:11 -05:00
Makefile init 2026-02-07 13:49:11 -05:00
README.md Remove context section from README.md 2026-02-07 19:30:40 -05:00

agentikube

Go Version Release

A small Go CLI that spins up isolated agent sandboxes on Kubernetes.

image

What it does

  • init - Installs CRDs, checks prerequisites, ensures your namespace exists
  • up - Renders and applies Kubernetes manifests from templates (--dry-run to preview)
  • create <handle> - Spins up a sandbox for a user with provider credentials
  • list - Shows all sandboxes with status, age, and pod name
  • status - Warm pool numbers, sandbox count, Karpenter node count
  • ssh <handle> - Drops you into a sandbox pod shell
  • destroy <handle> - Tears down a single sandbox
  • down - Removes shared infra but keeps existing user sandboxes

Quick start

# 1. Copy and fill in your config
cp agentikube.example.yaml agentikube.yaml
# Edit: namespace, EFS filesystem ID, sandbox image, compute settings

# 2. Set things up
agentikube init
agentikube up

# 3. Create a sandbox and jump in
agentikube create demo --provider openai --api-key <key>
agentikube list
agentikube ssh demo

What gets created

Running up applies these to your cluster:

  • Namespace, StorageClass (efs-sandbox), SandboxTemplate
  • Optionally: SandboxWarmPool, NodePool + EC2NodeClass (Karpenter)

Running create <handle> adds:

  • A Secret and SandboxClaim per user
  • A workspace PVC backed by EFS

Project layout

cmd/agentikube/main.go         # entrypoint
internal/config/               # config structs + validation
internal/manifest/             # template rendering
internal/manifest/templates/   # k8s YAML templates
internal/kube/                 # kube client helpers
internal/commands/             # command implementations
agentikube.example.yaml        # example config
Makefile                       # build/install/fmt/vet

Build and test locally

go build ./...
go test ./...
go run ./cmd/agentikube --help

# Smoke test manifest generation
./agentikube up --dry-run --config agentikube.example.yaml

Good to know

  • storage.type is efs only for now
  • kubectl needs to be installed (used by init and ssh)
  • Fargate is validated in config but templates only cover the Karpenter path so far
  • No Go tests written yet - go test passes but reports no test files
  • k9s is great for browsing sandbox resources (brew install derailed/k9s/k9s)

Context

Blog Post: Isolated Long-Running Agents with Kubernetes