01Framework vs Agent OS
Layer 1
Agent Framework
Build agent behavior
PromptsToolsLoops
→
Layer 2 · HazelJS
Agent OS
Operate agents in production
BuildRunDeployGovernSecureObserveRecover
HazelJS ships both layers in one TypeScript stack. Use @Agent / @Tool to build behavior; use DNA, Skillgate, Gatekeeper, durable runs, and hazel apply to operate agents in production.
02Where HazelJS fits
Other libraries may focus on graph DSLs or Python runtimes. HazelJS targets TypeScript backend teams who want agents beside their APIs — not a replacement for every framework, and not a critique of them.
- Build: @Agent / @Tool, AgentRuntime, confidence loops
- Govern: Skillgate capabilities + Gatekeeper authorization
- Survive: DurableRunStore, crash-safe HITL, hazeld
- Observe: timelines, inspector, optional OpenTelemetry
03Minimal agent definition
typescript
import { Agent, Tool } from '@hazeljs/agent';
@Agent({
name: 'support-agent',
description: 'Local desk agent',
systemPrompt: 'Help with orders and refunds.',
maxSteps: 12,
})
export class SupportAgent {
@Tool({ name: 'pulse', description: 'Local node health pulse' })
async pulse() {
return { ok: true };
}
}