HazelJS
Agent OS for TypeScript — durable agents in your backend
An Agent OS is the production lifecycle for AI agents — durable runs, packaging, governance, and recovery — not a bootable host OS. HazelJS runs that lifecycle inside your TypeScript / Node app, in the same DI process as your APIs.
What you cannot get from LangChain alone
Packaging, durable approvals, and governed skills — inside the same Node process as your APIs.
01
DNA + Store
Version prompt and policies like libraries. Tools stay in @Tool code — DNA is not the implementation.
02
Crash-safe HITL
Refunds and freezes suspend on durable AgentRun. Restart mid-approval without losing the run.
03
Skillgate + apply
Curate REST into governed skills. Declare Definitions locally — apply does not restart Node. Kubernetes optional.
04
Agent Gatekeeper
Authorize every protected tool call before execution. Default deny, deterministic policies, and crash-safe approval — independent of the LLM.
05
Agent VM
Effect-typed tools (@Pure, @Read, @Reversible, @Irreversible) — speculative branches, transactional undo, automatic compensation on losing paths.
await runtime.execute('support-desk', message, {
loop: { maxIterations: 4, successScore: 90 },
contract: { name: 'support-slo', maxLatencyMs: 30_000, fallbackAgent: 'safe-desk' },
recovery: { maxRetries: 2, fallbackAgent: 'safe-desk' },
});DNA ≠ tools · Store ≠ platform ≠ run
Three layers, one backend. Overlay never replaces your @Tool handlers with stubs.
Package identity, prompt, policies, versions, lockfile
Desired Definitions / Deployments — local control plane
Real @Tool / Skillgate execute, HITL, timelines
Pick the right command
Apply declares desired state. Your app still runs the tools. Chat is always real execute.
hazel agent runDNA smoke with stubs — not product money moves
hazel agent applyDeclare desired state — does not restart Node
npm run dev + /api/chatReal tools and HITL in your backend
Clone Meridian — see the whole Agent OS
One repo that teaches DNA vs tools, Store vs platform vs run, Skillgate, router, and HITL. Copy the pattern into your product.
01
store:sync
Publish DNA packages + lockfile
02
platform:sync
Apply Definitions / Deployments
03
npm run dev
Chat with real @Tool handlers
terminal
cd hazeljs-meridian-ops && npm i && npm run store:sync && npm run platform:sync && npm run devAgent OS, explained
Short answers for the search query — then clone Meridian or read the guide.
What is an Agent OS?+
An Agent OS is the production lifecycle for AI-native agents: durable runs, packaging, governance, recovery, and CI — not a bootable host operating system. HazelJS Agent OS runs that lifecycle inside your TypeScript / Node backend, in the same DI app as your APIs. Read What is an Agent OS?
What is HazelJS Agent OS?+
HazelJS Agent OS is durable AI agents inside your TypeScript backend: DNA packages, crash-safe HITL, Skillgate, Gatekeeper authorization, and local apply/reconcile. It is not a bare-metal OS and not a Python-only kernel.
Is DNA the same as tool implementation?+
No. DNA owns identity, prompt, tool names, and policies. Real side effects stay in TypeScript @Tool handlers or Skillgate. Overlay never replaces tools with stubs.
Does apply restart my Node app?+
No. apply writes desired state. Your app overlays prompt/policies on boot (or explicit reload). Chat is always AgentRuntime execute with real tools.
Can I undo agent side effects or speculate across plans?+
Yes — with @hazeljs/agent-vm. Tools declare effect classes (@Pure, @Read, @Reversible, @Irreversible). @Speculate forks K reasoning branches; the winner commits and losers roll back via @Compensate handlers. @Atomic enables transactional undo of entire runs.
What is an Agentic Organism?+
With @hazeljs/organism you deploy a mission, genes, and constitution — not a fixed agent graph. Environment signals drive spawn, reuse, specialization, survival, and a resource economy under hard safety limits. Embed with createOpsOrganism and OrganismHostRegistry; a durable OrganismRepository hydrates the same organism across process replicas.
Do I need Cloud or Kubernetes?+
No. Local registry and local backend are enough. Hosted registry and K8s are optional.
What is an Agent OS?
Category definition
Agent OS guide
DNA, HITL, Skillgate, apply
@hazeljs/agent
Kernel package
@hazeljs/agent-gatekeeper
Authorize every tool call
@hazeljs/agent-vm
Effect types & speculation
@hazeljs/organism
Mission-defined self-organizing agents
vs LangGraph
Backend + lifecycle
Glossary: Agent OS
Canonical term