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

CapabilityLangGraphYour own loop
Control flowExplicit graph, edges in codeA loop in code: the model picks a tool, the code runs it
DeterminismRouting can be plain functionsModel routing through tool calls, or plain functions where the order is fixed
TracingLangSmith, or your own through OpenTelemetryWhatever you instrument: a span around each model and tool call
Provider couplingNeutralAs thin as your client: one REST call is easy to repoint
TestingUnit-test nodes and edgesUnit-test the loop and the tools; routing needs evals
CheckpointingFirst class: checkpointers, resume, time travelYours 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.

What we run

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.

About this comparison

Format
Comparison
Level
Practitioner
Read
1 min read
Published
Oct 7, 2026

Capabilities and trade-offs, without a winner score.

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.