HazelJS LogoHazelJS
HazelJS Blog

Agent OS vs Agent Framework

Author
HazelJS Team
10/21/2026
General
Agent OS vs Agent Framework
← Back to Blog

Frameworks help you build agent behavior. An Agent OS helps you operate agents — runtime, governance, durability, and observability. How HazelJS draws the line.

An agent framework helps you define how an agent thinks and which tools it can call. An Agent OS helps you operate that agent after the demo: package it, authorize tools, survive crashes, approve sensitive actions, and observe runs.

HazelJS is an open-source Agent OS for TypeScript. It also gives you framework primitives (@Agent, @Tool, AgentRuntime) so you are not forced to glue three products together.

The short contrast

Agent frameworkAgent OS
JobBuild behaviorOperate agents
Typical artifactsPrompts, tools, graphsDNA, policies, durable runs, apply
Failure modeProcess dies mid-toolRecover / resume with durable state
AuthorizationOften ad hocGatekeeper (allow / deny / require-approval)
PackagingApp redeployDNA packages + local store / apply
Day-2 opsLogs in the app processhazel ps / logs / approvals on hazeld

Neither column is “bad.” Frameworks are necessary. Agent OS is what you add when demos must become services.

Where HazelJS sits

Framework layer → @Agent /​ @Tool /​ AgentRuntime loops
Agent OS layer  → DNA, Skillgate, Gatekeeper, durable HITL, hazeld apply

You can start with a single agent class and grow into DNA packages and local apply without changing languages.

Concrete example

Framework-only path:

@Agent({ name: 'support-agent', systemPrompt: '…' })
export class SupportAgent {
  @Tool({ name: 'lookup_order' })
  async lookupOrder() { /​* … */​ }
}

Agent OS path (same codebase, more operating surface):

  1. Export DNA for versioned identity + policies
  2. Curate tools with Skillgate instead of exposing every route
  3. Authorize with Gatekeeper (require-approval on refunds)
  4. Persist runs for crash-safe HITL
  5. hazel apply so hazeld keeps the agent Running after the terminal closes

How this differs from popular frameworks

Comparisons are architectural, not attacks:

  • LangGraph / LangChain — strong graph/runtime ecosystems; HazelJS bets on TypeScript DI/HTTP + DNA/Skillgate/Gatekeeper as an operating layer (compare LangGraph).
  • CrewAI / AutoGen — Python-first multi-agent crews/teams; HazelJS is TypeScript-native Agent OS (CrewAI, AutoGen).
  • Mastra — TypeScript agents/workflows/evals; HazelJS emphasizes packaging, governance, and local apply as Agent OS (Mastra).

See also the commercial lander: TypeScript agentic framework and the category pillar: What is an Agent OS?.

What “Agent OS” does not mean here

  • Not a claim that HazelJS replaces every framework
  • Not a hosted multi-tenant mesh by default (local-first hazeld)
  • Not inventing Continue/Finish stages — confidence loops are plan → execute → critique → validate

What to read next