Skip to content

[Feature]: Lightweight OS-level sandboxing alternative to openshell #748

@lukehinds

Description

@lukehinds

Package

agent-os-kernel

Problem Statement

toolkit's OpenShell integration demonstrates OS-level isolation with application-level governance. However, OpenShell requires a lot of heavy infrastructure (Docker/OCI runtimes, k3s, gateway), which adds significant operational overhead and isn't always practical - especially for local development, CI pipelines, edge deployments, or developer workstation environments. It also limits itself to just a few target deployments - there is also only linux support (last time I checked)

nono is a popular capability-based sandboxing library and CLI that provides OS-enforced isolation using kernel-native mechanisms (Landlock on Linux, Seatbelt on macOS) -- no containers, no daemons, no infrastructure. It would slot into the same architectural position as OpenShell (providing the "walls") while the governance toolkit provides the "brain." , and could even be built natively within tool kit as nono has its own python SDK.

The toolkit's README acknowledges the gap:

"This toolkit provides application-level (Python middleware) governance, not OS kernel-level isolation."

Today, the only path to OS-level enforcement is containers via OpenShell. That's a heavy dependency for what is fundamentally a process-level concern. With nono you could have much faster and native sandboxing.

What nono provides

  • Kernel-enforced sandboxing -- Landlock LSM (Linux 5.13+), Seatbelt/sandbox_init (macOS).
  • Capability-based model -- allowlist-only filesystem and network access, composable deny rules, path canonicalization to prevent symlink escapes
  • Native library bindings -- Python (PyO3, on PyPI), TypeScript/Node (napi-rs, on npm), Rust, C FFI. Integrates directly into agent code without shelling out.
  • Supervisor mode -- transparent capability expansion via seccomp user notification (Linux). Agent requests access, supervisor prompts or applies policy, kernel injects the fd. The agent never needs to know it's sandboxed.
  • Atomic snapshots - secure content addressable snapshots of all changes made by an agent.
  • Audit - secure content addressable audit record of every action an agent takes

How it would compose with the governance toolkit

The integration pattern mirrors OpenShell but is lighter:

Layer OpenShell (current) nono (proposed)
Filesystem isolation Container filesystem policies Landlock/Seatbelt allowlists
Network control Container egress rules Landlock TCP filtering / proxy with credential injection
Process restrictions Container seccomp profiles Landlock + seccomp-notify
Deployment Requires Docker/OCI runtime In-process library call or CLI wrapper
Platform Linux containers only Linux (Landlock) + macOS (Seatbelt) + Windows via WSL2
SDK integration Container orchestration API Python, TypeScript, Rust, C native libraries

A typical integration would look like:

from nono import CapabilitySet, Sandbox

# Build capabilities from governance toolkit's policy decisions
caps = CapabilitySet()
caps.allow_read("/app/workspace")
caps.allow_write("/app/workspace/output")
caps.allow_read("/tmp")

# Apply OS-enforced sandbox -- irrevocable after this point
sandbox = Sandbox(caps)
sandbox.apply()
# Agent runs with kernel-enforced restrictions from here

Example with pydantic-ai https://github.com/always-further/pydantic-ai-fastapi-nono

The governance toolkit's ring model and trust scoring would drive which capabilities are granted. nono enforces them at the kernel level.

Key differences from OpenShell

  • macOS and Windows support -- OpenShell is Linux-container only; nono supports macOS via Seatbelt and Windows via WSL2 (Landlock runs natively in the WSL2 kernel), which is particularly relevant for Microsoft's own developer ecosystem
  • In-process integration -- native library bindings mean the sandbox is applied from within the agent's own process, not by wrapping it in a container
  • Lighter weight -- no image pulls, no overlay filesystems, no container networking. Sandbox applies in microseconds.
  • Composable with containers -- nono can also run inside containers for defense-in-depth, and also microvms (firecracker, kata etc) - many folks are running nono on top of kubernetes for orchestration

Proposed Solution

Would you be open to a nono integration doc (similar to the OpenShell one) and potentially a thin adapter in the agent-runtime package that maps ring-level permissions to nono capability sets?

Happy to collaborate on the design. The library is Apache-2.0 licensed and multiple vendors are working on the project

Alternatives Considered

No response

Priority

Important

Contribution

  • I would be willing to submit a PR for this feature

Metadata

Metadata

Labels

enhancementNew feature or requesthelp wantedExtra attention is neededtriageNeeds triage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions