Comparison
HazelJS vs LangGraph
LangGraph is a strong agent graph runtime. HazelJS Agent OS covers durable AgentRun HITL, DNA packaging, Skillgate, local apply, and your API layer without a separate web framework.
Updated August 7, 2026
HazelJS vs LangGraph
TL;DR
- LangGraph focuses on agent workflows and stateful graphs (often with LangChain).
- HazelJS Agent OS — durable AgentRun stores, crash-safe HITL, DNA, Skillgate, local apply — and HTTP in one TypeScript backend.
- Use LangGraph when you are deep in the LangChain ecosystem and only need the graph runtime.
- Use HazelJS when agents must live beside REST, auth, and production ops — clone Meridian.
Who this is for
Teams comparing:
- LangGraph checkpointed agents vs HazelJS AgentGraph / Supervisor patterns
- Durable execution for approvals, orders, or multi-step AI jobs
- Whether to keep a separate HTTP framework around LangGraph
Prefer LangGraph if your org standardized on LangChain + LangGraph and the API edge is already solved.
Scope difference
| Layer | LangGraph | HazelJS |
|---|---|---|
| Agent DAGs / state machines | Core product | @hazeljs/agent — AgentGraph, SupervisorAgent, @Delegate |
| Durable business workflows | Checkpointing patterns | @hazeljs/flow — WAIT/resume, idempotency, Prisma storage |
| HTTP / REST for flows | You wire Express/Nest/etc. | Controllers + @hazeljs/flow-runtime |
| RAG | Via LangChain | @hazeljs/rag (GraphRAG, memory, loaders) |
| Agent OS (loops, policies, CI) | DIY / LangSmith | Agent OS |
| Durable AgentRun + leases | Checkpoint DIY | Agent OS Gamma |
| OpenAPI → agent tools | Custom tool wrappers | Skillgate |
Side-by-side
| Aspect | LangGraph | HazelJS |
|---|---|---|
| Focus | Agent workflows, state machines | AI-native backend + Agent OS |
| Agent orchestration | Core strength | AgentGraph, SupervisorAgent, @Delegate |
| Durable agent runs | Checkpointing patterns | SQL/file AgentRun, HITL suspend, worker leases |
| REST as agent skills | Manual tools | Skillgate (fromOpenApi / fromModule) |
| Durable business workflows | Outside core | @hazeljs/flow WAIT/resume + optional Prisma |
| HTTP/REST | You wire it | Native controllers; flow REST via flow-runtime |
| RAG | Via LangChain | Native RAG package |
| Backend concerns | Outside LangGraph | Auth, gateway, resilience, serverless in-ecosystem |
Code sketches
HazelJS agent with human-in-the-loop tool:
import { Agent, Tool } from '@hazeljs/agent';
@Agent({
name: 'ops-agent',
systemPrompt: 'Triage incidents; escalate refunds.',
enableMemory: true,
})
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 };
}
}
Durable workflow direction (@hazeljs/flow): model WAIT/resume steps for approvals and long-running jobs in the same monorepo as your HTTP modules — see Flow package docs.
Decision guide
| Need | Prefer |
|---|---|
| LangChain-centric agent graphs only | LangGraph |
| Agent graphs + REST + auth in one TS app | HazelJS |
| Human approvals + durable order/fulfillment flows | HazelJS @hazeljs/flow (+ agents) |
| Already Nest + LangGraph | Evaluate NestJS + LangChain vs HazelJS |
When LangGraph is better
- Team expertise and docs are LangGraph-first
- You do not want another web framework
- You rely on LangGraph-specific checkpoint stores already in production
HazelJS is better when the product is an AI backend: agents, RAG, and APIs sharing modules, config, and observability.
Related
- HazelJS vs LangChain
- NestJS + LangChain vs HazelJS
- Agent OS
- What is an Agent OS?
- Agent OS Gamma (durable runs)
- Skillgate
- Flow · Agent
Next steps
FAQ
- Does HazelJS have something like LangGraph?
- Yes — multi-agent routing via @Delegate / callAgent, plus durable AgentRun with crash-safe HITL. Separately, @hazeljs/flow handles WAIT/resume business workflows (not the same as AgentRun HITL).
- Can LangGraph and HazelJS coexist?
- You can invoke LangGraph from a HazelJS service, but you will still maintain two runtimes. Most Agent OS adopters consolidate on @hazeljs/agent.
- What about checkpointing?
- Agent OS durable runs use file or SQL stores with durableSuspend / approveAndResume. Evaluate against your LangGraph checkpoint store requirements.
- When is LangGraph clearly better?
- When your organization is standardized on LangChain/LangGraph and you only need the graph runtime behind an existing API edge.
Docs & next steps
Related comparisons
- HazelJS vs LangChain
LangChain composes LLM pipelines. HazelJS Agent OS runs those agents inside a production TypeScript backend — DNA, crash-safe HITL, Skillgate, local apply, same DI as your APIs.
- NestJS + LangChain vs HazelJS
Nest + LangChain works but creates two paradigms. HazelJS Agent OS unifies durable agents, DNA, Skillgate, and local apply in the same DI app as your APIs.
- HazelJS vs Vercel AI SDK
Vercel AI SDK optimizes streaming UX. HazelJS Agent OS is the backend for durable agents, DNA, Skillgate, and TypeScript APIs — they can complement each other.