Less application plumbing.
Inspect the evidence.
QuoteGraph and QuoteLanggraph implement an insurance quote journey with five stages, validation, corrections, deterministic rating, and acceptance. This case compares the application code in those two implementations.
Measurement snapshot: October 9, 2026. Source file hashes and raw counts are included in the downloadable inventory.
50.3% fewer application lines in this example.
EZGraph: 657 normalized graph-application lines. Direct LangGraph: 1,322. The difference is 665 lines under the stated method.
These are application-maintained lines. Both runtime libraries are excluded. The shared backend implementations are measured separately at 287 normalized lines each; controllers, prompts, tests, and configuration are outside the headline.
The result measures code size in these implementations. It does not measure developer time, runtime performance, model accuracy, or reliability.
7 EZGraph graph files; 4 direct LangGraph graph/session files. Different organization contributes to the count.
What the supplied layer absorbs.
| Responsibility | EZGraph application | Direct comparison application |
|---|---|---|
| Model/tool rounds | Nodes declare prompts and tools; the runtime handles common rounds and dispatch. | The graph class maintains its own model invocation and dispatch loop. |
| State and history | Typed node channels and named history spaces follow the runtime contract. | The application maintains state shape and stage/history bookkeeping. |
| Transitions and responses | Handlers return shared outcomes such as go(), direct(), and finish(). | The application implements response selection and routing around its stage logic. |
| Session lifecycle | The engine coordinates restore, invocation, and persistence. | A dedicated application session-store module and invocation path supply that behavior. |
| Domain policy | Validation, catalog matching, rating, and acceptance remain application code. | The same kinds of domain responsibilities remain application code. |
The integration is the point: one contract connects these responsibilities across stages. A team can also extract reusable helpers in its direct LangGraph application.
Find a stage's responsibilities in its node.
The EZGraph application has a graph definition, a state registry, and five stage files. The direct implementation places most graph behavior in one graph class, with separate state, types, and session-store modules. File organization is a choice, and it affects this result.
A driver validation change belongs in DriverNode. A graph-wide model default belongs in the graph definition. History sharing is declared in historySpaces. This supplies an established location for each concern across EZGraph applications.
| EZGraph file | Normalized lines | Raw lines |
|---|---|---|
src/graphs/quote-graph/quote-graph.ts | 50 | 81 |
src/graphs/quote-graph/quote-graph.state.ts | 66 | 89 |
src/graphs/quote-graph/nodes/coverage.node.ts | 81 | 115 |
src/graphs/quote-graph/nodes/driver.node.ts | 85 | 109 |
src/graphs/quote-graph/nodes/history.node.ts | 83 | 111 |
src/graphs/quote-graph/nodes/quote.node.ts | 178 | 232 |
src/graphs/quote-graph/nodes/vehicle.node.ts | 114 | 141 |
Direct LangGraph application inventory
| Direct LangGraph file | Normalized lines | Raw lines |
|---|---|---|
src/graphs/quote-langgraph/quote-langgraph.ts | 1019 | 1160 |
src/graphs/quote-langgraph/quote-langgraph.state.ts | 83 | 103 |
src/graphs/quote-langgraph/quote-session-store.ts | 177 | 212 |
src/graphs/quote-langgraph/quote-types.ts | 43 | 57 |
Separately counted controllers: 47 versus 74 normalized lines. Backend helpers: 287 versus 287. Full paths, hashes, and counts are in the snapshot.
A shorter loop needs a precise contract.
EZGraph centralizes tool schema validation, corrective results, dispatch, outcomes, and diagnostics. The direct application demonstrates the code needed for its chosen loop and session design.
The direct comparison selects the first tool call from a model candidate. EZGraph supports its defined batch behavior. The implementations share a product journey, but this evidence does not establish complete behavioral parity for multi-tool candidates.
A modern LangGraph application can compose LangChain agents and middleware rather than write every model/tool round by hand. An equivalent baseline using those helpers has not been counted here. This case demonstrates this repository's applications; it does not establish the smallest possible LangGraph implementation.
Read the upstream composition options ↗Reproduce the number, then assess the fit.
The measurement script excludes blank lines, full-line comments, and imports from selected TypeScript files. It counts the remaining physical lines. Formatting choices still matter; this is not an abstract syntax or complexity metric.
The selected files cover graph definitions, node/stage behavior, state definitions, and the comparison's session/type modules. The headline excludes runtime libraries, prompts, controllers, tests, configuration, and backend helpers.
node scripts/ezgraph-compare-metrics.mjs ../ezgraph-demoThe snapshot records the measurement date, repository base revision, and SHA-256 hashes for each measured file. Match the hashes when reproducing this particular result; a moving branch may contain newer application code.
- The baseline is a specific direct implementation, with its own organization and helper choices.
- Shared backend counts do not establish complete semantic equivalence.
- Runtime size and the work performed inside EZGraph are outside the count.
- No development-time, performance, reliability, or adoption experiment is represented by this number.
Source and contract references.
- QuoteGraph source — EZGraph stage files, state registry, and graph definition.
- QuoteLanggraph source — the direct implementation and session store.
- Measurement script — reproduce counts against a selected demo checkout.
- Code-count inventory — file scope, hashes, and normalized/raw counts.
- QuoteGraph tutorial — the behavior and contracts behind the stages.
- Architecture comparison — a broader guide to choosing application conventions.
Give your next LangGraph application a consistent foundation.
Run the starter, inspect the session, and decide whether the node contract fits your team.