New: HCEL — chain prompts, RAG, and agents in native TypeScript Learn more →
HazelJS LogoHazelJS

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

LayerLangGraphHazelJS
Agent DAGs / state machinesCore product@hazeljs/agent — AgentGraph, SupervisorAgent, @Delegate
Durable business workflowsCheckpointing patterns@hazeljs/flow — WAIT/resume, idempotency, Prisma storage
HTTP / REST for flowsYou wire Express/Nest/etc.Controllers + @hazeljs/flow-runtime
RAGVia LangChain@hazeljs/rag (GraphRAG, memory, loaders)
Agent OS (loops, policies, CI)DIY / LangSmithAgent OS

Side-by-side

AspectLangGraphHazelJS
FocusAgent workflows, state machinesFull framework + agents + workflows
Agent orchestrationCore strengthAgentGraph, SupervisorAgent, @Delegate
Durable executionCheckpointing, persistence@hazeljs/flow WAIT/resume + optional Prisma
HTTP/RESTYou wire itNative controllers; flow REST via flow-runtime
RAGVia LangChainNative RAG package
Backend concernsOutside LangGraphAuth, 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

NeedPrefer
LangChain-centric agent graphs onlyLangGraph
Agent graphs + REST + auth in one TS appHazelJS
Human approvals + durable order/fulfillment flowsHazelJS @hazeljs/flow (+ agents)
Already Nest + LangGraphEvaluate 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

  1. Agent package
  2. Flow / durable workflows
  3. Installation
  4. GitHub

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.

← All comparisons