Source: LangChain 101, a free open manual in the AI Engineering from Scratch project (aiengineeringfromscratch.com, repo rohitg00/ai-engineering-from-scratch, manuals/langchain-101). It covers LangChain 1.5, LangGraph 1.2, Deep Agents 0.7 and LangSmith, about 390 pages, and every listing is captured from a real run with the capture scripts committed. Surfaced by Dr. Alvaro Cintas on LinkedIn, 2026-11-22.
Why it matters
Most framework material shows how few lines it takes to build an agent. This manual asks the question a staff engineer actually has to answer: what does the framework change about a run, measured, and what does it not? Each section opens with a one-sentence answer and a recorded experiment behind it. The headline answer is that the harness does not decide quality; the model does.
What it measured
| Question | Finding (as reported by the manual) | Design consequence |
|---|---|---|
| Does the harness change outcomes? | A plain ~40-line tool loop, create_agent and a hand-built StateGraph produced identical outcomes on 60 of 60 shared local tasks, on two models. | Pick a harness for persistence, streaming and approvals, not for accuracy. |
| What does the harness cost? | create_agent adds roughly 5 ms of framework time per model call and no extra tokens. | The thin layer is effectively free; the overhead argument against it is weak. |
| What do batteries-included agents cost? | Deep Agents used 3.6x to 4.3x the prompt tokens of a plain loop across all model sizes tested, and only the deep agent on small local models lost tasks. | Planning scaffolds, sub-agents and file tools are a token tax; adopt them only when tasks need them. |
| Is checkpointing exactly-once? | No. After a crash between steps, a node re-ran on resume in 97 of 100 trials, and no durability mode (sync, async, exit) protects a task that had just returned. | Every external side effect needs an idempotency key and a check of your own records before acting. |
| Is structured output portable? | On Qwen3 4B, ToolStrategy returned no object in 39 of 39 tasks and ProviderStrategy raised in 10 of 10; a separate extraction call matched the best score on every model. | Treat structured-output strategy as a per-provider decision with a test, or extract in a dedicated call. |
| Default limits | The default recursion limit of 9999 steps allows about 5000 model calls. | Set recursion_limit per run. |
Architecture, as the manual frames it
LangChain builds the agent (
init_chat_model, messages and content blocks, tools,create_agent, middleware).LangGraph runs it as a loop of supersteps (plan, execute, update) over typed channels, writing checkpoints through
putandput_writes.interrupt()andCommand(resume)give human-in-the-loop pauses; time travel gives replay and forks.LangSmith traces it.
Deep Agents layers planning, sub-agents and a virtual filesystem on top.
The manual goes from the runtime internals (channel write collisions, checkpoint size and the delta channel, stream modes) through middleware ordering, guardrails and PII handling, memory stores with namespace isolation, and serialization of state that does not round-trip. It ends with a production build: FastAPI, Postgres checkpointer, approvals, OpenTelemetry and evals.
Tradeoffs
Plain loop vs framework. The plain loop is equal on quality and simplest to debug, but you rebuild checkpointing, resumable streaming, approvals and tracing yourself.
create_agentbuys those for about 5 ms a call. The manual's advice is to start with the simplest loop and move up only for a named capability.Durability mode.
syncwaits for the checkpoint write before continuing; it narrows the loss window but cannot make a tool call that already ran disappear from the outside world. Durability is about the graph's state, not your side effects.Deep agents. More scaffolding helps long, open-ended tasks and hurts small models and token budgets. Measure on your own suite before adopting.
Structured output. Provider-native JSON modes are fast where supported and brittle where not; tool-based strategies depend on the model following a schema tool. A dedicated extraction step costs one more call and travels across providers.
Failure modes to design for
Double side effects on resume. A crash after a tool returns but before the checkpoint lands re-runs the node: two charges, two emails, two tickets.
Silent
Nonestructured responses on smaller or local models, which look like success to code that does not check.Runaway loops under the default recursion limit, billed per call.
State that does not round-trip through the checkpointer's serializer, which breaks resume only after a restart.
Token blow-up from a deep-agent template chosen for convenience.
Version drift. Most 0.x code (chains,
AgentExecutor,langchain_communityimports) no longer imports on 1.5; the manual is pinned to one version set, so findings can move with upgrades.
Review checklist
Is there a measured reason for the harness choice, or would a plain loop do?
Does every tool with an external effect take an idempotency key and check prior records before acting?
Has a crash between steps been simulated and the resume path observed?
Is the durability mode chosen deliberately, with its loss window written down?
Is the structured-output strategy tested on every provider and model in use, with
Nonetreated as a failure?Is
recursion_limitset per run?Is token cost per task tracked when Deep Agents or other scaffolds are used?
Is the framework version pinned, with a re-run of the task suite on upgrade?
Caveats
These numbers are the manual's own, from its published capture kit and a task suite of 30 to 99 tasks per model. The suites are local and small, so the equal-outcome result says the harness is neutral on these tasks, not that it is neutral on every workload.
Related entries
R035 Long-horizon agents and durable execution: the full treatment of idempotency keys, unknown outcomes and compensation that this manual's crash experiment demonstrates.
R094 CodeClimb: a coding agent rebuilt on durable workflows, including an Inngest vs LangGraph comparison.
R006 Six must-know terms for agent harnesses: the loop, tool calling and checkpoint vocabulary this manual measures.