The same program, twice
Both examples under the Agent node implement one supervisor and two specialists: the LangGraph supervisor, and the same supervisor with no framework, a loop on the OpenAI Python SDK and over the REST API in TypeScript. Reading them side by side is the fastest way to feel the difference.
Capability by capability
| Capability | LangGraph | Your own loop |
|---|---|---|
| Control flow | Explicit graph, edges in code | A loop in code: the model picks a tool, the code runs it |
| Determinism | Routing can be plain functions | Model routing through tool calls, or plain functions where the order is fixed |
| Tracing | LangSmith, or your own through OpenTelemetry | Whatever you instrument: a span around each model and tool call |
| Provider coupling | Neutral | As thin as your client: one REST call is easy to repoint |
| Testing | Unit-test nodes and edges | Unit-test the loop and the tools; routing needs evals |
| Checkpointing | First class: checkpointers, resume, time travel | Yours to build: persist the message list and the turn count |
Where each one hurts
LangGraph asks you to think about state shape before you have a product, and its upgrades become yours to absorb. Get the shape wrong and you rework the state and every node that reads it.
Your own loop asks you to build what a framework hands you: checkpoints so a run survives a restart, retries with idempotency keys, approval pauses and traces. Each piece is small; together they are an execution layer, and someone has to own it.
Neither solves permissions. Both call tools with whatever credentials the tool holds; which user may trigger which tool, and under whose identity, is decided by a gateway in front of the tools, whichever approach sits behind it.
Our platform runs agents on its own TypeScript execution layer, calling the model's REST API, and Python services call the model through the SDK. The decision note We built our own TypeScript orchestrator explains why.
Key takeaways
- Pick LangGraph when routing is the hard part and you want the control flow reviewable as a graph.
- Write the loop yourself when it has to live in your own stack and carry your platform's rules, and budget for building checkpointing and tracing.
- Neither solves permissions. Both need a gateway in front of tools.
Terms in this piece
About this comparison
- Format
- Comparison
- Level
- Practitioner
- Read
- 1 min read
- Published
- Oct 7, 2026
- Disciplines
Capabilities and trade-offs, without a winner score.
More on these topics
Decision note · · 2 min read
We built our own TypeScript orchestrator, and stayed on it
Why our enterprise AI platform runs agents on a TypeScript execution layer we started almost two years ago, and why reaching near-parity with the frameworks argued for staying.
Checklist · · 24 checks
Working with Claude, practices that hold up
Prompting, agents and tools, Claude Code, evaluation and safety. The habits that make Claude-based systems reliable, as a checklist you can run against your own setup.
Architecture pattern · · 1 min read
Pattern: the outbox for agent actions
Agents that write to systems of record need the same transactional outbox that event-driven services use. This entry covers the shape and the trade-offs.
Discussion