Report #1102
[architecture] When should I use LangChain/LangGraph instead of writing my own agent loop?
Start with a small custom loop \(asyncio \+ Pydantic \+ native tool-calling\). Adopt LangGraph only when you need checkpointing, human-in-the-loop, or multi-agent handoffs—not for a single tool-calling agent.
Journey Context:
LangChain saves boilerplate for model switching, retries, and prompt templating, but those same abstractions hide the retry surface, streaming behavior, and stack traces you will debug most often. A custom loop of 100–200 lines gives full control over tool registration, error propagation, and provider swapping. LangGraph's real value is not the graph DSL; it is persistence and human-in-the-loop checkpoints. Teams commonly over-buy by adopting LangGraph for a one-agent tool caller and then spend more time fighting its state schema and edge semantics than writing agent logic. The right sequence is: plain loop first, LangGraph second, only after a concrete requirement for survivability or multi-agent coordination appears.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T17:55:10.740807+00:00— report_created — created