Agent safety, enforced below the agent.
Prompts and training shape what an agent tries. Mriga decides what it can do. Each agent gets its own KVM virtual machine, every syscall passes a policy decision, and credentials never enter the guest.
Live runs, one AWS c6i.metal.
The hazard is what an agent does with access it legitimately holds.
Agents hold real grants: repos, connectors, keys, the open web. An injected prompt, a confused tool call or a malicious tool acts through them at machine speed. Model-side controls are probabilistic. Runtime controls are deterministic.
Today you trade safety for cost. Containers share the host kernel; seccomp is the last line. MicroVMs boot a guest kernel and need a tap device each, which runs out before memory. Mriga keeps the hardware boundary and shares the overhead.
Hazard, control, mechanism
None depends on the model or the agent's intent.
| Hazard | Control | Mechanism |
|---|---|---|
| Escape to the host | Hardware boundary per agent | KVM VM, no guest kernel to pivot from. |
| Routing around enforcement | No unmediated syscalls | Syscalls rewritten to traps at load; JIT-emitted ones on first execution. |
| Unapproved action | Allowlist policy per jail | JSON policy on syscalls, files, destinations at dispatch. Seccomp backstop. Hot reload. |
| Credential exfiltration | Keys never enter the guest | TLS terminates in the host daemon, which injects the key. |
| Cross-tenant blast radius | One jail, one policy per tenant | Isolation cheap enough for a VM per run. |
| Unseen behavior | Every event attributed | Live syscall trace and denials, per agent. |
The trade: the host daemon reads request plaintext. That seam enables policy, audit and key custody.
How enforcement works, in four steps
- 1 / 4
Rewrite the binary
Every path to the kernel is one two-byte instruction. Each
Post 1 →syscallbecomes a trap at load; JIT-emitted ones on first execution. - 2 / 4
Drop the guest kernel
A 36 KB
Post 2 →no_stdshim answers the ~30 syscalls an agent makes. No guest OS, no guest TCP stack, no tap per VM. - 3 / 4
Snapshot it while serving
Boot once, snapshot while answering, fan out. Pages share copy-on-write; writable data hardlinks from one template. 1,500 instances, ~101 MB of disk.
Post 3 → - 4 / 4
Own the network path
The pool daemon sits between agents and upstreams, holding the DNS cache, warm TLS sessions and credentials. Handshakes are already paid.
Post 4 →
What safety on every run costs
A control too expensive for every run doesn't get applied. One c6i.metal, n = 1,500, live LLM load.
| Property | Value | Measured |
|---|---|---|
| Fleet warm-up | 0.42 s | 1,500 VMs restored from one 99 MB snapshot |
| Running density | 10.8 / GB | Agents per GB, 139 GB physical |
| Dispatch to first syscall | 44 ms | p50 · 86 ms p95 · 105 ms p99 |
| TLS handshake per call | 0 ms | 338 upstream sessions shared by the fleet |
| DNS cache hit rate | 100 % | 260.7 K hits, one upstream query per name per TTL |
| Restore to serving | 25 ms | n8n, past startup and answering HTTP |
Same app, same machine, three runtimes
1,500 copies of n8n on one box. Docker and Firecracker hit per-instance overhead, not memory.
What runs today, and what doesn't yet
- Model-generated code
Shipping - Code interpreters, tool sandboxes, coding agents. A VM per run.
- Multi-tenant agent platforms
Shipping - A jail and policy per tenant. Your provider keys stay host-side.
- An instance per customer
Shipping - A real app per account, proven with n8n at 1,500 per box. Idle costs a shared image.
- Bursty fleets that mostly wait
Shipping - Runs, evals and rollouts waiting on a model. A 25 ms restore replaces the warm pool.
- Ray, GPU residency, Kubernetes
Roadmap - Not yet proven. No numbers until they are.
What engineers ask first
Why enforce safety in the runtime instead of the model?
Does it stop prompt injection?
Is this a guardrail layer around the model?
How is it different from Firecracker or a seccomp-hardened container?
Do we rebuild our images or binaries?
What can the host daemon see?
What does evaluation take from our team?
Which numbers are measured?
Built in the open
Run your agents under Mriga
Onboarding a few teams running agents or untrusted code in production.
Image, runtime, what it calls.
How many at once, peak and average.
Trace, policy, and cost on your workload.