LangChain → Direct SDKs (no framework)
What it saves, what actually moves, what you rebuild — and the thing that catches people.
What it costs, and what it saves
Neutral on spend — same model calls either way. What you remove is a dependency that has broken compatibility across major versions more than once, and roughly 100MB of transitive packages.
Moves cleanly
Your prompts and your model calls. Underneath the abstraction, LangChain is making the same HTTP requests you would.
You rebuild
Chains, agents and memory. You write the loop yourself — which for most applications is twenty lines rather than a framework.
What LangChain costs you today
The framework is free (MIT). The ecosystem's paid pull is LangSmith: a free developer tier (5k traces/month), then Plus at ~$39/seat/month with usage overages — a real line item for production teams.
What actually holds you in
Moderate, and self-inflicted rather than contractual: your pipeline logic is written against LangChain's abstractions, so leaving means rewriting orchestration code (prompts, data, and vector stores all port cleanly). Teams report the rewrite is usually smaller than expected — often less code than the original.
What you are moving to
The strongest LangChain alternative today is often no framework at all. Modern models ship native tool calling, structured outputs, and long context — the very things LangChain was built to scaffold — so the official Anthropic/OpenAI/Mistral SDKs (MIT/Apache-licensed) plus a small amount of your own orchestration code covers most real applications. You keep full debuggability (a stack trace is your code, not five layers of framework), zero dependency churn, and total freedom to swap providers. Engineering write-ups since 2024 keep landing on the same conclusion: start direct, add a framework only when a specific need demands it — not the other way around.
Free — you pay only your model provider; no framework tier, no per-seat tooling
Direct SDKs (no framework) strengths
- Every line is yours: debugging is a stack trace, not archaeology
- No abstraction churn or breaking framework releases
- Trivially swaps model providers; pairs cleanly with MCP for tools
- Less code than the equivalent chain in many real apps
What you give up
- You write your own retries, streaming, and evaluation plumbing
- Big multi-agent orchestration is where hand-rolling gets costly
The migration, step by step
- 1Print the actual prompts LangChain sends, using verbose mode or a callback — most teams have never seen them
- 2Write the same call with the provider SDK directly and compare the outputs
- 3Replace the chain with an ordinary function; a chain is usually a sequence of calls with string formatting between
- 4Replace memory with a list you own and control
- 5Delete LangChain last, once nothing imports it
The gotcha
Teams discover their prompts were worse than they thought, because LangChain's default templates were adding text nobody had read. That is uncomfortable and it is the main benefit of this migration — you finally see what you are sending.
When to stay on LangChain
You use LangGraph for genuinely stateful multi-step agents, or the integration breadth is saving you real work.
More Layer 4 migrations
Figures verified 2026-07-16 against vendor pricing pages. Prices change and migrations differ by estate — treat the cost delta as a starting model, not a quote. Rankings and recommendations here are merit-only; affiliate income never changes a verdict. See our methodology.