Comparison
HazelJS vs LangGraph
LangGraph is a strong agent graph runtime. HazelJS covers agent orchestration, durable business workflows, and your API layer without a separate web framework.
Updated August 4, 2026
HazelJS vs LangGraph
TL;DR
- LangGraph focuses on agent workflows and stateful graphs (often with LangChain).
- HazelJS ships agent orchestration and durable business workflows and HTTP in one TypeScript framework.
- Use LangGraph when you are deep in the LangChain ecosystem and only need the graph runtime.
- Use HazelJS when agents must live beside REST/gRPC, auth, and production ops without a second stack.
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 |
Side-by-side
| Aspect | LangGraph | HazelJS |
|---|---|---|
| Focus | Agent workflows, state machines | Full framework + agents + workflows |
| Agent orchestration | Core strength | AgentGraph, SupervisorAgent, @Delegate |
| Durable execution | Checkpointing, persistence | @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
Next steps
FAQ
- Does HazelJS have something like LangGraph?
- Yes — AgentGraph, SupervisorAgent, and @Delegate cover agent DAGs and multi-agent routing. Separately, @hazeljs/flow handles durable WAIT/resume business workflows.
- Can LangGraph and HazelJS coexist?
- You can invoke LangGraph from a HazelJS service, but you will still maintain two runtimes. Most HazelJS adopters consolidate on AgentGraph + flow.
- What about checkpointing?
- HazelJS flow supports durable execution with optional Prisma persistence and recovery patterns. 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 ships those capabilities inside a production TypeScript backend — controllers, agents, RAG, and ops together.
- NestJS + LangChain vs HazelJS
The common production path — NestJS for HTTP and LangChain for AI — works, but creates two paradigms. HazelJS unifies APIs, agents, and RAG in one module system.
- HazelJS vs Vercel AI SDK
Vercel AI SDK optimizes streaming UX on Vercel. HazelJS is the backend framework for agents, RAG, and enterprise TypeScript APIs — they can complement each other.