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
This commit is contained in:
parent
579057e977
commit
c978db1437
8 changed files with 172 additions and 39 deletions
|
|
@ -1,17 +1,19 @@
|
|||
# Analysis — Durable Agent Runtimes & Harness Engineering
|
||||
# Analysis — Durable Agent Runtime
|
||||
|
||||
> Part of [[durable-agent-runtime/index|Durable Agent Runtimes & Harness Engineering]]
|
||||
> Part of [[durable-agent-runtime/index|Durable Agent Runtime]]
|
||||
> Harness/loop analysis moved to [[harness-engineering/index|Harness Engineering]] (2026-08-11).
|
||||
|
||||
## The four primitive families
|
||||
## The three primitive families
|
||||
|
||||
| Family | Example | Compute primitive | Where state lives | Cold start | Hibernation |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| Durable objects | celld (Deno) | V8 isolate running Worker bundles | Per-object SQLite, replicated to S3 | Fast (isolate) | Idle cells hibernate |
|
||||
| Actors | rivet | Lightweight process (Node/Bun/Deno) | In-memory + SQLite/BYO DB | ~20ms | Actors hibernate when idle |
|
||||
| VM sandboxes | hypeman, E2B | Firecracker/Cloud Hypervisor/QEMU microVM | VM disk (snapshot for standby) | ~30s VM / sub-30ms from snapshot | standby = snapshot to disk |
|
||||
| Harness libraries | nanocodex, Codex, pi | In-process agent loop (WebSocket to LLM) | In-process session / thread store | Instant | N/A (client-side) |
|
||||
| Collaborative substrate | Radicle COBs | Signed, CRDT-like Git commit DAGs | Git objects (replicated, self-certifying) | Instant (local git) | Repos persist; nodes sync on demand |
|
||||
|
||||
(Harness libraries — nanocodex, Codex, pi — moved to [[harness-engineering/index|Harness Engineering]].)
|
||||
|
||||
The industry convergence: **compute is disposable, state is durable elsewhere.**
|
||||
|
||||
- Amp orbs: ephemeral E2B sandbox + durable thread on Amp Server (PostgreSQL). Sandbox destroyed on archive; conversation survives.
|
||||
|
|
@ -24,16 +26,6 @@ The industry convergence: **compute is disposable, state is durable elsewhere.**
|
|||
1. **Cold start latency** — the gap between "VM ~30s" and "actor ~20ms" is closed with snapshots (E2B, hypeman standby, celld/rivet hibernation) or pre-provisioned pools. This is why orbs can feel local despite being remote.
|
||||
2. **State checkpointing & recovery** — thread JSONL (Amp), SQLite replication (celld), actor state persistence (rivet), VM disk snapshots (hypeman). Everything is replayable; nothing is lost on compute failure.
|
||||
|
||||
## Tool interaction: code as the tool interface
|
||||
|
||||
Three independent sources converge on the same insight:
|
||||
|
||||
- **Cloudflare Code Mode**: present MCP tools as a generated TypeScript API and let the LLM write code that calls it. LLMs are trained on billions of lines of real code but only contrived tool-call token sequences. Writing code also skips feeding every intermediate tool result back through the context window.
|
||||
- **nanocodex**: typed `Turn`/`TurnResult` values + event stream over WebSocket instead of stdout parsing. "stdout parsing for agent loops breaks constantly in edge cases; typed events give reliable state checkpoints and clean prompt cache hits."
|
||||
- **Prime Agent RLM**: the model's only tool is a persistent IPython REPL; context is a variable, subagents are function calls.
|
||||
|
||||
The unifying pattern: **the harness should look like a programming environment, not a tool-call menu.** This matters directly for how we build agent environments on hermes-vm (and why pi's minimalism / 4-tool philosophy won).
|
||||
|
||||
## What this means for hermes-vm (our stack)
|
||||
|
||||
Already have (the "durable compute host" layer):
|
||||
|
|
@ -52,7 +44,6 @@ Not worth building on a single box:
|
|||
|
||||
Interesting but optional:
|
||||
- **hypeman** — if we ever want real per-task VM isolation with snapshot/standby on our own box, hypeman is the lean OSS option (multi-hypervisor, OCI images, ms restore). Watch it; don't adopt yet.
|
||||
- **Cloudflare Code Mode pattern** — worth revisiting for our Effect TS stack: present our MCP/REST tools as a typed API and let agents write code against them, rather than exposing raw tool-call schemas.
|
||||
|
||||
## Verdict
|
||||
|
||||
|
|
|
|||
|
|
@ -1,41 +1,39 @@
|
|||
---
|
||||
title: Durable Agent Runtimes & Harness Engineering
|
||||
description: Survey of durable, stateful agent execution primitives — durable objects (celld), actors (rivet), multi-hypervisor VM runtimes (hypeman, E2B/Amp Orbs), harness-as-library (nanocodex), code-as-tool-calling (Cloudflare Code Mode) — and what they mean for building a self-hosted orb-like runtime on hermes-vm.
|
||||
title: Durable Agent Runtime
|
||||
description: 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.
|
||||
status: active
|
||||
category: technical
|
||||
tags: [durable-objects, actors, agent-runtime, agent-harness, sandbox, microvm, self-hosting, orbs, stateful, durable-execution]
|
||||
tags: [durable-objects, actors, agent-runtime, agent-infra, sandbox, microvm, self-hosting, orbs, stateful, durable-execution]
|
||||
draft: true
|
||||
created: 2026-08-07
|
||||
updated: 2026-08-07
|
||||
updated: 2026-08-11
|
||||
origin: buzz://d8a718be-031f-4a6e-9f5c-a55466641654/4123d35532d0b2cbfb80a0a34f79fb3e4e63c16c25b77d43bc0f10bb178e4f1b
|
||||
---
|
||||
|
||||
# Durable Agent Runtimes & Harness Engineering
|
||||
# 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 the spectrum from in-process harness libraries (nanocodex) and V8 isolates (celld, Cloudflare Workers) to actor runtimes (rivet) and microVM sandboxes (hypeman, E2B/Amp Orbs). Goal: derive a build plan for a self-hosted, orb-like runtime on our NixOS VM (hermes-vm) without overbuilding.
|
||||
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|Harness Engineering]]. 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 building a durable, stateful agent runtime (sandboxed or not), and which combination fits a single self-hosted NixOS dev VM?
|
||||
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), agent harness engineering (nanocodex, Amp orbs, Prime Agent RLM), sandbox runtimes (hypeman, E2B, Cloudflare isolates), tool-calling vs code-calling (Cloudflare Code Mode)
|
||||
- Excluded: model training/inference infra, prompt engineering, RLHF
|
||||
- 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|Harness Engineering]]; 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.
|
||||
- **Four primitive families emerged**:
|
||||
- **Three primitive families emerged** (harness libraries split out to [[harness-engineering/index|Harness Engineering]]):
|
||||
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)
|
||||
4. Harness libraries / agent loops — nanocodex (Rust, agent as in-process library, typed events over WebSocket), Codex, pi, Prime Agent RLM
|
||||
- **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.
|
||||
- **Tool interaction is converging on "code as the tool interface"**: Cloudflare Code Mode converts MCP tools into a TypeScript API and has the LLM write code that calls it (LLMs are far better at code than at synthetic tool-call tokens). nanocodex's thesis is the same: typed events beat stdout parsing. Prime Agent's RLM: a persistent IPython REPL is the model's only tool. pi's minimalism: 4 tools, no MCP bloat.
|
||||
- **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.
|
||||
|
||||
|
|
@ -43,8 +41,6 @@ What are the architectural primitives for building a durable, stateful agent run
|
|||
|
||||
For the full reference list see [[durable-agent-runtime/sources|Sources]].
|
||||
|
||||
- [[durable-agent-runtime/sources|Sources]] — all links, one-line descriptions
|
||||
|
||||
## Detail Files
|
||||
|
||||
- [[durable-agent-runtime/sources|Sources]] — full reference list
|
||||
|
|
@ -54,20 +50,21 @@ For the full reference list see [[durable-agent-runtime/sources|Sources]].
|
|||
|
||||
## Related Research
|
||||
|
||||
- [[agent-infra/index|Agent Infrastructure]] — umbrella topic
|
||||
- [[harness-engineering/index|Harness Engineering]] — agent loop & tool interface lens (split out 2026-08-11)
|
||||
- [[codex-app-server-byo-auth/index|Codex App Server & BYO Auth]] — model access & embedding protocols
|
||||
- Amp Orbs research note (workspace): `RESEARCH/AMP_ORBS_REMOTE_DEV.md`
|
||||
- Prime Agent / Continual Harness (arXiv 2605.09998) — self-improving harness state
|
||||
- Forgejo AI reviewer harness (workspace skill reference) — where nanocodex was first evaluated
|
||||
|
||||
## 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, with the option of parallel Luna delegation. Completed directly (all primary sources already extracted; delegation channel has known instability).
|
||||
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
|
||||
- [ ] Revisit Code Mode pattern for our Effect TS stack (tools as typed API, not tool-calling)
|
||||
|
||||
## Conclusion
|
||||
|
||||
The research area is **durable, stateful agent runtime and harness engineering — sandboxed or not**. Four 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 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|Harness Engineering]].
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
# Next Steps — Durable Agent Runtimes & Harness Engineering
|
||||
# Next Steps — Durable Agent Runtime
|
||||
|
||||
> Part of [[durable-agent-runtime/index|Durable Agent Runtimes & Harness Engineering]]
|
||||
> Part of [[durable-agent-runtime/index|Durable Agent Runtime]]
|
||||
|
||||
## Open questions
|
||||
|
||||
- [ ] Which repos get the `.agents/setup`-style contract first (clan-private, law retrieval, idx-cli)?
|
||||
- [ ] Should the dev-server + ports-file pattern be a shared script library in clan-private or per-repo?
|
||||
- [ ] Is hypeman worth an evaluation build on hermes-vm (per-task VM with standby) vs NixOS containers?
|
||||
- [ ] Revisit Cloudflare Code Mode for our Effect TS stack: tools-as-typed-API vs tool-calling.
|
||||
- [ ] Does the Forgejo webhook → kanban wake need a new service, or does an existing cron/webhook path cover it?
|
||||
- [ ] Code Mode pattern for our Effect TS stack now tracked in [[harness-engineering/index|Harness Engineering]]
|
||||
|
||||
## Decisions made (2026-08-07)
|
||||
|
||||
- Research topic: **durable-agent-runtime** — covers durable objects, stateful machines, and harness engineering (sandboxed or not).
|
||||
- Research topic: **durable-agent-runtime** — covers durable objects, stateful machines, and harness engineering (sandboxed or not). On 2026-08-11 harness engineering was split out into its own topic under the agent-infra umbrella.
|
||||
- Do NOT build a distributed durable-object layer (celld) or actor platform (rivet) on a single box.
|
||||
- Do NOT build an E2B-style per-thread VM fleet; use NixOS-native isolation when needed.
|
||||
- DO build environment contracts: per-repo setup hooks, AGENTS.md per repo, dev-server skills, event wake.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue