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

Production AI Agents

A demo agent answers a prompt. A production AI agent survives crashes, respects policy, leaves an audit trail, and can wait for humans. HazelJS Agent OS is the infrastructure layer that closes that gap in TypeScript.

01What it is

Production AI agents are agents you can operate: versioned packages, fail-closed tool policy, durable runs, human approval, secrets, and a node that keeps running after the terminal closes. HazelJS Agent OS is that infrastructure layer for TypeScript — not a chat UI product.

02Problem it solves

Demos usually skip:

  • Retries and timeouts
  • Durable state and recovery
  • Authorization and least privilege
  • Audit logs / timelines
  • Human approval
  • Secrets and rate limits
  • Versioned agent packages (DNA)
  • A node that keeps running after the terminal closes

03How you use it today

Map those gaps to DurableRunStore, Gatekeeper, HITL, encrypted hazeld secrets, Skillgate classification, DNA packages, and hazel apply / hazeld. Step-by-step: Production AI agents in Node.js.

hazel new agent support-agent
cd support-agent
hazel dev          # foreground — dies with the TTY
hazel apply        # hazeld keeps agents Running
hazel ps && hazel logs support_agent

04Where it sits in the stack

Production readiness is the outcome of composing runtime, governance, security, and durability — see durable agents, governance, and security.

05Boundaries

  • Local-first: hazeld on your machine is the default product path
  • No hazel deploy command today — hazel apply is the supported local path
  • Managed Cloud apply is optional; never required for open-source Agent OS

06FAQ

Is hazel dev production?
No. hazel dev dies with the TTY. Use hazel apply so hazeld keeps agents Running.
Do I need Kubernetes?
Not for the default path. Distributed/K8s backends remain experimental.
Where is the long how-to?
Production AI agents in Node.js.

07Agent with approval-gated tool

typescript
import { Agent, Tool } from '@hazeljs/agent';

@Agent({
  name: 'ops-agent',
  systemPrompt: 'Triage incidents; escalate refunds.',
})
export class OpsAgent {
  @Tool({
    description: 'Issue a refund',
    requiresApproval: true,
    parameters: [
      { name: 'orderId', type: 'string', required: true },
      { name: 'amount', type: 'number', required: true },
    ],
  })
  async refund(input: { orderId: string; amount: number }) {
    return { ok: true, ...input };
  }
}