research/durable-agent-runtime/index.md
hermes c978db1437 Restructure agent research under agent-infra umbrella
- Add agent-infra umbrella topic (hub for state, harness, model-access, collaboration lenses)
- Split harness-engineering out of durable-agent-runtime; fold in Cloudflare Code Mode finding
- Narrow durable-agent-runtime to state/durability lens; retitle
- Tag codex-app-server-byo-auth as agent-infra subtopic
- Document umbrella-topic convention in README
2026-08-11 08:16:18 +00:00

5.7 KiB

title description status category tags draft created updated origin
Durable Agent Runtime State & durability lens of agent infrastructure — durable objects (celld), actors (rivet), multi-hypervisor VM runtimes (hypeman, E2B/Amp Orbs), scale-to-zero/hibernation — and what they mean for building a self-hosted orb-like runtime on hermes-vm. Sibling of harness-engineering under the agent-infra umbrella. active technical
durable-objects
actors
agent-runtime
agent-infra
sandbox
microvm
self-hosting
orbs
stateful
durable-execution
true 2026-08-07 2026-08-11 buzz://d8a718be-031f-4a6e-9f5c-a55466641654/4123d35532d0b2cbfb80a0a34f79fb3e4e63c16c25b77d43bc0f10bb178e4f1b

Durable Agent Runtime

Summary

Research into how modern agent execution environments achieve durability and statefulness — where agent state lives, what compute primitive runs the agent, and how the environment hibernates and wakes. Covers durable objects / durable execution (celld, rivet, Durable Objects), actor runtimes, and microVM sandboxes (hypeman, E2B/Amp Orbs). The harness/loop lens (nanocodex, pi, Code Mode) now lives in harness-engineering/index. Goal: derive a build plan for a self-hosted, orb-like runtime on our NixOS VM (hermes-vm) without overbuilding.

Research Question

What are the architectural primitives for a durable, stateful agent runtime (sandboxed or not), and which combination fits a single self-hosted NixOS dev VM?

Scope

  • Included: durable objects / durable execution (celld, rivet, Durable Objects), actor runtimes, sandbox/VM runtimes (hypeman, E2B, Cloudflare isolates), scale-to-zero/hibernation, orbs
  • Excluded (moved): agent harness/loop engineering → harness-engineering/index; model training/inference infra, prompt engineering, RLHF
  • Sufficient answer: a taxonomy of primitives + a recommendation for what to build (and what NOT to build) on hermes-vm

Key Findings

  • The 2026 pattern is unanimous: agent compute is disposable, agent state is durable elsewhere. Amp: sandbox is ephemeral, the thread (prompts, tool calls, results) lives on the server. celld: nodes are replaceable, the S3 bucket is the source of truth. Rivet: actor state persists while the process may hibernate.
  • Three primitive families emerged (harness libraries split out to harness-engineering/index):
    1. Durable object/execution stores — celld (each object = its own SQLite DB, S3 replication, no consensus)
    2. Actor runtimes — rivet (in-memory state + persistence, ~20ms cold start, scale to zero, queues/workflows/scheduling)
    3. Sandbox/VM runtimes — hypeman (multi-hypervisor OCI-in-VM), E2B (Firecracker microVMs, snapshot restore, used as Amp's orb substrate)
  • Scale-to-zero / hibernation is universal: Amp orbs pause after 5 min idle; celld cells hibernate; rivet actors hibernate when idle; hypeman standby = snapshot VM to disk, resume in milliseconds; E2B snapshot reuse gives sub-30ms cold starts.
  • Two hard problems everyone solves: (a) cold start latency (actor ~20ms vs VM ~30s, mitigated by snapshot/pooling), (b) state checkpointing and recovery (SQLite replication, thread JSONL, VM snapshots, actor state persistence).
  • For our stack: hermes-vm is already a durable compute host (systemd services, kanban DB, session DBs, herdr panes). The real gap is a per-task disposable environment contract + event wake, not a distributed state layer. celld/rivet solve problems we don't have on a single box; hypeman is interesting for per-task VMs but likely overkill.

Sources

For the full reference list see durable-agent-runtime/sources.

Detail Files

Discussion

Triggered from the Amp Orbs thread (2026-08-07). User connected the dots: orbs, nanocodex, durable objects (celld), actors (rivet), multi-hypervisor VM runtimes (hypeman), and Cloudflare Code Mode all belong to one research area — "durable object, stateful machine, harness engineering either sandboxed or not." Asked for centralized structured research he can digest. Completed directly (all primary sources already extracted; delegation channel has known instability). On 2026-08-11 the topic was narrowed to the state/durability lens and placed under the agent-infra umbrella; harness engineering split out.

Next Steps

  • Decide Phase 1 scope: per-repo .agents/setup-style contracts + AGENTS.md per repo on hermes-vm
  • Evaluate hypeman as an opt-in per-task VM runtime (snapshot/standby) vs NixOS containers

Conclusion

The research area is durable, stateful agent runtime — sandboxed or not. Three primitive families cover the space; for a single self-hosted NixOS VM the right move is environment contracts + event wake on the existing durable host, not building a distributed durable-object layer. The tool-interface half of the original question now lives in harness-engineering/index.