Agent OS — durable agents in your TypeScript backend. Start with Meridian →
HazelJS LogoHazelJS

HazelJS

Agent OS · Apache 2.0 · TypeScript

Durable AI agents inside your TypeScript backend

Same DI/HTTP app as your APIs — version agents like packages, govern writes, survive crashes. Not a chat widget bolted onto Express.

What is unique

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.

support-desk.ts
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' },
});
Mental model

DNA ≠ tools · Store ≠ platform ≠ run

Three layers, one backend. Overlay never replaces your @Tool handlers with stubs.

1DNA / Store

Package identity, prompt, policies, versions, lockfile

2Platform apply

Desired Definitions / Deployments — local control plane

3App runtime

Real @Tool / Skillgate execute, HITL, timelines

Anti-confusion

Pick the right command

Apply declares desired state. Your app still runs the tools. Chat is always real execute.

hazel agent run

DNA smoke with stubs — not product money moves

hazel agent apply

Declare desired state — does not restart Node

npm run dev + /api/chat

Real tools and HITL in your backend

Flagship

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 dev