Kagmus kagmus // kernel-enforced safety
0x00 exec() ret=0
kernel-enforced ai safety

Kernel-enforced safety for autonomous AI agents

> EPERM, not a refusal.

Containment enforced by the operating-system kernel - not by the model's willingness to follow a prompt. The agent keeps full apparent access; the kernel refuses to let it touch your real workspace except through a reviewed gate.

trace - agent uid=10001 caps=none branch=feat strace(illustrative)
$ ws branch create feat $ ws branch sh --branch feat --tty --fs-sandbox -- claude open("/workspace/src", O_RDONLY) = 3 write("branch://feat/src/app.rs", 412) = 412 ...one bad prompt later... unlink("/workspace") rm -rf . = -1 EPERM dropdb prod -> broker = -1 EPERM # base unreachable - destruction contained to the branch $ ws branch accept feat # review 1 diff, then promote
isolated write branches kernel-anchored identity kernel confinement multi-cloud credential broker reviewed promotion
0x01 fault SIGKILL
why this matters

The failure that keeps happening

9s
to delete a production database - and its backups

The PocketOS incident, April 2026: an AI agent with explicit safety rules in its prompt destroyed a company's production data in seconds.

And it isn't a one-off - the same root cause keeps surfacing across tools and models.

"I violated every principle I was given."
- the agent, after the incident
  • The safety rules - prompt, skills, .md configs - were all advisory.
  • The kernel had no awareness of them and enforced nothing.
  • Once the agent held a shell at the user's UID, no boundary stopped a destructive syscall.
  • This is a structural class of failure - and prompt-level safety cannot close it.
0x02 policy eval
the inflection

Advisory safety vs. enforced safety

prompt-layer controls

System prompts, CLAUDE.md / AGENTS.md, skills, tool configs, "read-only" flags.

  • Every one lives at the same privilege as the agent.
  • Nothing is enforced below the model - a jailbreak or injection ignores all of it.
  • Status: advisory.
containers & git

Docker, VMs, branches.

  • Heavy; copy data in and out.
  • No per-agent identity; docker -v /:/host escapes.
  • git's working tree is mutable - rm -rf still bites.
kernel-anchored system

Kagmus.

  • The destructive call never lands. It hits a throwaway layer - your data was never reachable.
  • Identity is attested by the kernel, not claimed on the wire.
  • Enforced and logged: the kernel's EACCES is the receipt.

assert Safety that depends on the model behaving is not safety. Kagmus turns misbehavior into a denied, logged syscall - your data is never touched.

0x03 run() diff
what it looks like

Same agent, same prompt - one wrapper different

today - the agent runs as you
~/your-repo - your shell, your keys
$ claude # on your real checkout, AWS keys in env ...one bad prompt later... $ rm -rf . && dropdb prod # files gone - DB dropped - nothing to undo
  • Destruction hits your real tree and your real data.
  • Recovery = backups and luck.
with kagmus - the agent runs in a branch
kagmus branch - real paths, brokered creds
$ ws branch create feat $ ws branch sh --branch feat --tty --fs-sandbox -- claude $ rm -rf . && dropdb prod # hit the branch layer - base byte-identical - logged $ ws branch accept feat # review the diff, then promote
  • Files & file-DBs (SQLite, DuckDB) land in copy-on-write; networked DBs & cloud (DynamoDB, Cosmos, Firestore) go through the broker - the agent never holds the raw credential, egress is host-allowlisted, every call logged.
  • Nothing reaches your base until you review the diff. Recovery = discard the branch.

> The whole migration: wrap your agent in ws branch sh. No change to the agent, the repo, or the prompt - and it runs where your agents already do: Linux, or the Lima / WSL2 VM on a Mac or Windows laptop.

0x04 boundary held
the system

How it works, in one diagram

The agent works against real paths with real tools. Its writes land in a copy-on-write layer - your base is reached only through the reviewed promotion gate.

host
kernel boundary
Kagmus
writes contained - identity attested by the kernel, not claimed on the wire
untrusted
AI agent
full apparent filesystem access - believes it runs as you
broker
Credential broker
networked DBs + cloud creds are brokered; the agent never holds the raw key, egress is host-allowlisted, every call logged
gate: promote feat -> base only through a typed, reviewed diff
protected
Your workspace
byte-identical and untouched until you approve
isolated write branches privilege separation kernel-anchored identity kernel confinement gated promotion
0x05 caps x5
the system

Five kernel primitives, one guarantee

01

Copy-on-write branches

Each agent writes to its own copy-on-write layer over a read-only base.

rm -rf hits the copy, never your files
02

Privilege separation

A small trusted component holds the sensitive privilege; the agent never does.

minimal blast radius
03

Kernel-anchored identity

An agent's identity is attested by the kernel, not claimed on the wire.

identity cannot be forged
04

Filesystem confinement

The agent's reachable filesystem is fenced by the kernel before it runs.

out-of-bounds = EACCES
05

Gated promotion

Changes reach your base only through a typed, audited check.

no silent writes
=

The guarantee

Even a jailbroken, injected, or actively hostile agent cannot reach your base except through review - and cannot impersonate anyone at the gate.

0x06 compare scan
how we compare

Nobody else solves this problem

Solution What it gives agents What it doesn't
E2B - Morph Isolated ephemeral execution per agent Persistent shared workspace; concurrent multi-agent; promotion
Modal - RunPod Serverless compute Shared state, ownership, or promotion of any kind
GitHub Actions / CI Pipeline isolation Runtime agent isolation; concurrent writes; diff-gated promotion
Kata - gVisor Strong VM-level isolation per workload Multi-agent shared base; per-change conflict detection; audit
git Version history, branching Structural enforcement; agent identity; concurrent multi-agent
Kagmus N agents on one real codebase - kernel-isolated, identity-bound, reviewed promotion by design doesn't trust the agent, the prompt, or the wire - nothing to jailbreak, inject, or forge; misbehavior returns EPERM, not a refusal.

Cloud sandboxes solve "one agent, one throwaway box." Kagmus solves "N agents, one real persistent codebase, kernel-enforced separation, with a reviewed path back."

0x07 meter peak
pricing

Pay for what runs, not what sits idle

One meter: peak concurrent agents - the work actually running in parallel, measured by the kernel. Not invocation count, not idle time, not per-seat.

// all-in-one - one box, start in minutes

Individual
$99.99/mo
Up to 2 concurrent agents

A single isolated box for one developer. Self-serve, month-to-month.

[get started]
Pro
$249.99/mo
Up to 4 concurrent agents

For power users running several agents in parallel on one box.

[get started]
Pro Plus
$599.99/mo
Up to 8 concurrent agents

Maximum parallelism on a single box before you need the org product.

[get started]

// teams and enterprise - your infrastructure

Team
$1,500/mo
16 concurrent agents

Multi-seat org with SSO and audit retention.

contact us
Business
$5,000/mo
64 concurrent agents

Scaled isolation with overage flexibility.

contact us
Enterprise
$18,000/mo
256 concurrent agents

Fleet-scale, deployed on infrastructure you choose.

contact us
Enterprise+
$60,000/mo
1,024 concurrent agents

Large fleets; uncapped Custom and Site licenses on request.

contact us

note Air-gapped / fully offline is available on Business and above, with compliance audit rights. Pricing is set per deployment - contact us.

All prices subject to change. Monthly plans are month-to-month; annual commitments lock your rate for the term.

0x08 verify pass
proof

A real system, running today

reference implementation
1,200+
tests in the suite

31 crates - tens of thousands of lines of Rust. Real I/O, real kernel calls.

the incident, restaged

Four real frontier-model agent CLIs run in parallel; one is given a destructive prompt.

=The base is byte-identical before and after.
forgery, defeated

A hostile process forges another agent's identity at the gate.

xThe kernel overwrites the claim; the attack is refused; both identities logged.
Claude Code OpenAI Codex CLI GitHub Copilot CLI Gemini CLI
0x09 pilot open
request a pilot

Contain every agent. Trust every change.

Kernel-enforced isolation, unforgeable identity, and reviewed promotion - so an AI agent keeps its usefulness and loses its ability to do harm.

// what a pilot looks like
  • Run your own agents in Kagmus branches against a real codebase.
  • Watch destructive actions stay contained - and review every change before it lands.
  • Concurrent multi-agent on one VM; flat cost, no per-agent metering.
  • Deploys on your infrastructure - cloud VM, Kubernetes, or a laptop via Lima or WSL2.
// why now
  • Agentic coding is going multi-agent - the safety boundary has to move below the model.
  • The category is open: no one offers kernel-isolated concurrent agents with reviewed promotion.
  • Patent-pending system; working reference implementation today.