Skip to content

v0.1.0 — first release

Choose a tag to compare

@EeroEternal EeroEternal released this 30 Aug 05:49
· 59 commits to main since this release

AgentCell — a ~1000-line AI-agent sandbox built directly on Linux kernel primitives. No Docker, no container runtime, no daemon required for the sandbox itself — it runs fully unprivileged (user namespaces).

./sand -- claude                                    # isolated shell
./sand --net veth --mem 1G --timeout 600 -- codex   # real networking + limits
./sand serve && ./sand exec <sock> -- python3 x.py  # ~2 ms per command

What's inside

Isolation (unprivileged)

  • cgroup v2 limits: cpu.max / memory.max / pids.max / io.max (--io-rbps/--io-wbps)
  • 6 namespaces via clone(2); tmpfs root + pivot_root; fresh /proc /dev /sys
  • Landlock path allowlist; hand-built seccomp-BPF deny-list as a balanced binary-search tree
  • --overlay DIR: copy-on-write views — agent edits freely, host never touched

Observability & enforcement (root daemon)

  • agentlsm serve: BPF LSM enforcement on lsm/file_open — per-cell deny prefixes, hot-swappable at runtime (sand lsm deny/allow/reset), kernel-side and invisible to the payload
  • unified live event stream (sand lsm -f [deny,exec,open,net,trip]): LSM denials + exec/open/connect tracepoints + seccomp escape attempts (via raw_syscalls/sys_exit)
  • --net veth: daemon-provisioned veth + NAT (10.200.0.0/16), full teardown on exit
  • agentmon: standalone monitor for ad-hoc cgroups + kernel-audit tail

Human-in-the-loop

  • --ask: blocked syscalls park in-kernel, supervisor approves per call on the terminal (y/n/a/k)

Long-running mode

  • sand serve sets up isolation once; sand exec streams commands over a unix socket with fds passed via SCM_RIGHTS (~2 ms/command vs ~5 ms one-shot)

Verified

make check: 49 tests locally (Arch, kernel 7.x, bpf LSM), 29 on CI (ubuntu-latest; privileged tiers skip cleanly). Performance: ~5 ms startup, +2.8% syscall overhead, 2.1 GB/s tmpfs scratch.

Requirements

x86_64 Linux. Build: clang, libbpf, libelf, zlib, xxd. Sandboxing itself needs no root; agentlsm/agentmon/--net veth need root and (for enforcement) bpf in /sys/kernel/security/lsm.