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

The Agent OS for TypeScript

Operate agents like production systems.

Durable execution · Agent DNA · Skillgate · Gatekeeper · HITL · Observability

Frameworks build agents. HazelJS operates them.

Read the Docs37+ GitHub Stars200K+ NPM Downloads / 30d

Architecture

Inside HazelJS Agent OS

Control Plane

L1
StoreApplyDeployOps

Agent DNA

L2
IdentityModelSkillsPoliciesSLO

Agent Runtime

L3
PlanExecuteCritiqueValidate

Skillgate

L4
APIsGoverned Capabilities

Agent Gatekeeper

L5
AllowDenyApproveRewrite

Durable Kernel

L6
RunsHITLLeasesStateRecovery

TypeScript / Node.js Backend

Define → Deploy → Run → Govern → Observe → Evolve

Explore
Category

Why an Agent OS?

Agents are easy to prototype but difficult to operate reliably. Production agents need durable execution, governed capabilities, policy enforcement, approval flows, observability, testing, and safe rollout workflows. HazelJS brings these primitives together in one TypeScript-native platform.

01

Frameworks help you build

Prompt loops, tool calling, and model adapters get you to a demo.

02

Agent OS helps you operate

Durable runs, governed skills, Gatekeeper authorization, DNA packaging, HITL, and deployment lifecycle keep agents alive in production.

03

One coherent system

Runtime, governance, kernel, and control plane — not a glue stack of Nest + LangGraph + workers + a vendor console.

Production

What breaks in production — and how HazelJS solves it

Operate agents like production systems. Agent OS gives them the lifecycle primitives demos never need — and real traffic always does.

Agent crashes mid-run

Durable Runs

Runs survive process restarts with checkpointed state.

Agent wants to perform risky actions

Gatekeeper + Skillgate + HITL

Default-deny authorization before every tool call, with governed skills and human approval.

Prompt / model / skill behavior changes

Agent DNA

Version identity, model, skills, and policy like packages.

Need safe rollout and testing

Digital Twin + describeAgent() + CI

Test agent behavior before it reaches production traffic.

Need debugging and visibility

Inspector Timeline

Trace plan → execute → critique with full run history.

Multiple workers / concurrency control

Leases

Coordinate workers safely without lost or double work.

Need resilient stateful execution

Durable Kernel

Runs, HITL, leases, state, and recovery as OS primitives.

Architecture

One Agent OS. Six layers that work together.

Every piece is a layer of the operating system — not a standalone feature bolted on later.

01

Control Plane

Desired-state / deployment

Store, Deployments, Reconcile, and Observe — declare how agents should run and keep reality in sync.

02

Agent DNA

Packaging / definition

Identity, model, skills, policy, and SLO packaged as versioned specs — tools stay in TypeScript code.

03

Agent Runtime

Execution loop

Plan → Execute → Critique → Validate inside your DI app — the same process as your APIs.

04

Skillgate

Governance boundary

Turn selected APIs into governed agent capabilities. Reads by default. Writes need approval.

05

Agent Gatekeeper

Authorization boundary

Whether this agent may call this tool now. Default deny, deterministic policies, approvals, and rewrite — not a prompt guardrail.

06

Durable Kernel

Lifecycle primitives

Runs, HITL, leases, state, and recovery — the substrate production agents need to survive.

Built on your TypeScript / Node.js backend. Local first. Kubernetes optional — never the product.

Lifecycle

Operate agents like production systems.

From definition to production — a clear operating loop, not a one-shot prompt script.

  1. 1

    Define

    Define with Agent DNA

  2. 2

    Deploy

    Deploy through control plane workflows

  3. 3

    Run

    Run with durable runtime

  4. 4

    Govern

    Govern via Gatekeeper, Skillgate, and policies

  5. 5

    Observe

    Observe with Inspector

  6. 6

    Evolve

    Evolve safely with tests and digital twins

Operator feel

Operate agents like infrastructure

A Kubernetes-like mental model for AI agents — apply desired state, run, inspect, and read logs.

terminal
$ hazel agent apply support-agent.yaml
$ hazel agent run support-agent
$ hazel agent inspect support-agent
$ hazel agent logs support-agent
support-agent.yaml
apiVersion: hazeljs.ai/v1
kind: Agent
metadata:
  name: support-agent
spec:
  dna:
    version: 1.2.0
  runtime:
    replicas: 3
  skills:
    - orders.read
    - refunds.create
  policy:
    refunds.create:
      approval: required
  budget:
    maxCostPerRun: 0.05
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

Local Store is enough to start. Hosted registry (promote/share packages) is an optional Team SKU — never required for local correctness.

Compare

Agent OS vs glue stacks

NestJS gives you APIs. LangChain gives you loops. HazelJS is the open-source Agent OS — durable process, DNA packaging, Skillgate, and local apply inside the same TypeScript backend.

Great APIs — AI agents are still an add-on.

NestJS structures backends well. Shipping durable agents still means bolting on LangChain, state stores, and approval workflows yourself.

HTTP + DI
NestJSMature decorators, modules, guards
HazelJS Agent OSSame familiar patterns — Agent OS runs inside them
Durable agents
NestJSBring your own runtime + workers
HazelJS Agent OSNative AgentRuntime — HITL, contracts, recovery
Agent packaging
NestJSConfig files and tribal knowledge
HazelJS Agent OSDNA packages + Store — version like libraries
Governed tools
NestJSDIY OpenAPI wrappers
HazelJS Agent OSSkillgate — curated REST, writes need approval
Desired state
NestJSK8s or custom deploy scripts
HazelJS Agent OSLocal apply / Definitions — K8s optional, not required
Start here

Build on Agent OS packages

Run durable agents with @hazeljs/agent. Authorize every tool call with @hazeljs/agent-gatekeeper. Clone Meridian to learn the full path; add Skillgate when REST becomes tools.

Runtime pair

Agents propose. Gatekeeper authorizes.

The kernel executes the loop. Gatekeeper is the authorization boundary before every protected tool call — default deny, deterministic policies, not a prompt guardrail.

@hazeljs/agent

Agent OS kernel

Runtime + durable lifecycle

Durable runs, HITL, leases, policies, and DNA overlay — the Agent OS kernel inside your TypeScript DI app.

  • Durable runs that survive process restarts
  • Crash-safe HITL suspend and resume
  • DNA overlay for prompt and policy versions
  • Plan → Execute → Critique → Validate in your DI app

Install

npm install @hazeljs/agent

Agent OS example

const result = await runtime.execute('support-desk', goal, {
  loop: { maxIterations: 4, successScore: 90 },
  contract: { fallbackAgent: 'safe-desk' },
});
Explore Agent OS
@hazeljs/agent-gatekeeper

Agent Gatekeeper

Authorize every tool call

Deterministic authorization before protected tool execution. Agents propose. Gatekeeper decides — default deny, not a prompt guardrail.

  • Default deny when no allow policy matches
  • Deterministic policies, independent of the LLM
  • Allow, deny, require approval, or rewrite before execution
  • Trusted identity from runtime context — never tool arguments
  • Kafka/OTEL audit and Redis approvals across replicas

Install

npm install @hazeljs/agent-gatekeeper

Gatekeeper example

await gatekeeper.execute({
  context,
  tool: fromFunction('stripe.refund', refund),
});
Read the package docs

Learn the path

hazeljs-meridian-ops

Meridian flagship

Primary path — clone and learn

See the full Agent OS in one repo — DNA, Store, Skillgate, HITL, and local apply. Copy the pattern into your product.

  • DNA, Store, Skillgate, and HITL in one teaching app
  • Copy the pattern into your product backend
  • Local Store first — Cloud and Kubernetes optional

Install

npm run store:sync && npm run platform:sync && npm run dev

Tour path

# DNA ≠ tools · Store ≠ platform ≠ run
# apply does not restart Node — overlay on boot
Build Your First Agent
@hazeljs/skillgate

Skillgate

Governance boundary

Turn selected REST endpoints into governed agent capabilities. Reads by default. Writes need approval.

  • Curate OpenAPI routes into agent skills
  • Reads by default — writes need approval
  • Pairs with Gatekeeper for per-invocation authorization

Install

npm install @hazeljs/skillgate @hazeljs/agent

Skillgate example

const gate = Skillgate.fromOpenApi(spec, {
  include: { tags: ['agent'] },
});
gate.register(registry, 'api-concierge');
Read the guide
Also shipped on HazelJS

Zynli — production SaaS on the HazelJS stack

Proof that HazelJS packages ship real products. Zynli is multi-tenant AI support (RAG, flows, billing) — supporting ecosystem, not the Agent OS teaching path. For DNA, HITL, Skillgate, and apply, clone Meridian.

Zynli.AI

Live in production

Multi-tenant AI support — RAG, flows, billing, and real-time handoff. Built by HumanBee AB.

Status
Live
Product
zynli.ai
Widget on
hazeljs.ai

01

Agentic RAG inbox

Visitors get KB-grounded answers first; low-confidence turns escalate to live agents with full context.

02

Guided flows & tools

Intent routing runs order tracking, ticket creation, and custom HTTP actions — HazelJS stack patterns in production.

03

Production SaaS stack

Multi-tenant workspaces, subscriptions, real-time Socket.IO, and an embeddable React widget — shipped, not a demo repo.

HazelJS stack in production

@hazeljs/rag@hazeljs/ai@hazeljs/core@hazeljs/memory@hazeljs/payment@hazeljs/queue

Try the support widget on this page — it runs on the same HazelJS RAG stack as Zynli.

visitor-bot-reply.ts
// KB → guided flow → ticket bot → LLM → human handoff
await askRag(question, tenantId, { sessionId });
await matchVisitorIntent(tenantId, message);
await tryExecuteVisitorFlow({ conversationId, tenantId, ... });
Also — brownfield only

HCEL when you just need a chain

Prefer Meridian or Agent OS for durable agents. Use @hazeljs/ai only if you need a light prompt→RAG→agent chain inside an existing app.

$npm install @hazeljs/core @hazeljs/ai
$cd my-app && npm install && npm run dev

Brownfield HCEL — orchestration without Agent OS packaging or HITL.

The glue-code way~50 lines of wiring
// 1. Setup DI
// 2. Configure OpenAI Adapter
// 3. Setup LangChain Chain
// 4. Manually pipe input to RAG
// 5. Manually pipe RAG output to Agent
// 6. Handle tool failures manually
// 7. Write 50 lines of boilerplate...

async execute(input) {
  const docs = await this.rag.search(input);
  const prompt = this.template.fill(input, docs);
  const agent = new AgentExecutor({ ... });
  return agent.call({ prompt });
}
HCEL chain5 lines — not Agent OS
// 1. Just call the chain.
// Context flows implicitly.

async execute(input) {
  return await this.ai.hazel
    .prompt(template)
    .rag('docs')
    .agent('specialist')
    .execute(input);
}
37+
GitHub Stars
200K+
NPM Downloads / 30d
Agent OS
Primary product
Apache 2.0
Open Source

From the HazelJS team

Deep dives on Agent OS, agent lifecycle, Skillgate, DNA, and what we are shipping next.

Built with a growing community

Get help from developers shipping production AI agents. Share patterns, debug runs, and shape the Agent OS roadmap.

University Groups

Connect with students and researchers building on HazelJS at your institution.

Discussions

Ask questions, share agent patterns, and get feedback from builders in the trenches.

Early Access

Shape the roadmap, test new packages, and get direct access to the core team.

Operate agents like production systems.

Clone Meridian to see Agent DNA, Store, Skillgate, and HITL in one TypeScript backend. Then keep @hazeljs/agent in your app. Apache 2.0.

Later

Hosted deploy is on the roadmap

Today: run Agent OS locally in your Node app. Cloud registry and managed deploy are optional Team SKUs — never required to ship agents.

Local first

Correct without Cloud or Kubernetes

Optional registry

Promote DNA packages when you are ready

K8s adapter

Optional — not the product

Hosted deploy

Coming later — not required now

Join 9+ developers for early access to HazelJS.Cloud

Partner

Need hands-on help?

Our official consulting partner helps teams architect, implement, and ship HazelJS Agent OS in production — faster.

HumanBee
Official HazelJS Partner

HumanBee

Need help shipping AI agents, RAG pipelines, or production backends on HazelJS? HumanBee is the official consulting partner for architecture, hands-on implementation, and team enablement.

  • Architecture & system design
  • Agent & RAG implementation
  • Team enablement & training