New: Decision Runtime — closed-set judgments for Agent OS. Read the guide →
HazelJS LogoHazelJS

Durable Kernel

Durable Kernel is HazelJS architecture language for AgentRuntime + DurableRunStore + DurableJobStore + crash-safe HITL. There is no DurableKernel class or npm package — do not look for one.

01What it is

A composition, not a package: AgentRuntime plus DurableRunStore / DurableJobStore (including SQL helpers such as createSqlDurableRunStore), worker leases, and crash-safe HITL (durableSuspend, approveAndResume). Agent OS Gamma shipped these primitives for TypeScript backends.

02Problem it solves

A bare while (true) loop cannot recover cleanly. Process death loses in-memory state; long tools and human waits need suspend/resume; workers need leases so reclaim does not double-run work.

  • Checkpoints / state → DurableRunStore run records
  • Leases → worker lease fields + reclaimExpired
  • HITL → HumanTaskService + hazel approvals / approve / deny
  • Recovery → hazel agent runs resume; hazeld keeps the node alive

03How you use it today

Enable durable stores on the runtime / AgentOS path; use durableSuspend for approvals that must survive restarts; resume with AgentOS.approve / reject or approveAndResume. Day-2 ops still go through the Control Plane CLI (hazel ps, approvals).

04Where it sits in the stack

Persistence under Agent Runtime. Control Plane keeps the node running; the durable kernel keeps runs and approvals consistent across crashes.

05Boundaries

  • There is no npm package named durable-kernel — search DurableRunStore instead
  • Not a substitute for @hazeljs/flow WAIT/resume business workflows
  • Idempotency still depends on tool design — the kernel stores state, it does not invent domain keys

06FAQ

Where is the DurableKernel class?
Nowhere — it is architecture language for Runtime + stores + crash-safe HITL.
Is SQL required?
No. File-backed stores work locally; SQL helpers exist when you want Prisma / any SQL provider.
How is this different from hazeld?
hazeld is the supervisor node process. The durable kernel is how agent runs persist inside that (or any) Node process.