Agent OS vs Agent Framework
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 framework | Agent OS | |
|---|---|---|
| Job | Build behavior | Operate agents |
| Typical artifacts | Prompts, tools, graphs | DNA, policies, durable runs, apply |
| Failure mode | Process dies mid-tool | Recover / resume with durable state |
| Authorization | Often ad hoc | Gatekeeper (allow / deny / require-approval) |
| Packaging | App redeploy | DNA packages + local store / apply |
| Day-2 ops | Logs in the app process | hazel 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):
- Export DNA for versioned identity + policies
- Curate tools with Skillgate instead of exposing every route
- Authorize with Gatekeeper (
require-approvalon refunds) - Persist runs for crash-safe HITL
hazel applyso 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