LangChain in Practice: Why It Remains the Core Framework for Agent Development

Why LangChain remains the smartest investment for Agent developers in an era of rapidly changing AI tools.
This article explains why learning LangChain—rather than chasing ever-changing AI tools like Cursor, Claude Code, or Codex—is the smarter path for Agent developers. It covers the layered AI tech stack, the limitations of prompt engineering, strategic token consumption planning using LangGraph's time travel feature, and why LangChain's mature ecosystem and cross-language transferability make it the ideal foundational framework.
In an era overflowing with large model tools, many developers find themselves trapped in a cycle: endlessly chasing new tools yet never building the deep capability to truly solve problems. In his latest LangChain 1.3 hands-on course, Bilibili creator Loulan presents a thoughtful learning methodology. Based on his insights, this article explores why diving deep into the underlying framework LangChain is actually the smarter choice—even as application products like Cursor, Claude Code, and Codex continue to proliferate.
Learning Tools vs. Learning Concepts: A Critical Distinction Overlooked in Agent Development
A widespread misconception exists in AI learning today: equating learning AI with learning tools. Since tools interface directly with applications and produce immediate results, they seem to offer the best return on investment. But Loulan argues this thinking has a fundamental flaw.
Within the AI development tech stack, there's a clear layered structure. At the bottom are the large language models themselves (GPT, Claude, Llama, etc.). The middle layer consists of orchestration frameworks (LangChain, LlamaIndex). The top layer comprises end-user application products (Cursor, Claude Code, Codex). Upper-layer products typically encapsulate the capabilities of middle-layer frameworks while adding specific interaction designs and business logic. Understanding this layered relationship reveals why learning middle-layer frameworks offers greater transferable value—they serve as the critical hub connecting model capabilities to application scenarios.
From early tools like Cursor and Trae, to OpenClaw and Crawfish, to today's Claude Code and Codex, the pace of tool iteration is staggering. If you merely chase tools, you'll easily fall into an exhausting treadmill—ending up tired after each learning sprint with little tangible benefit to show for it.

More critically, every tool embeds its developer's own design philosophy. The moment your needs diverge from the developer's vision, you're stuck in a passive position. Loulan uses Claude Code as an example: while the tool is excellent, it has recently imposed escalating restrictions on users in China—suspending domestic service, banning accounts, and even capturing users' IP addresses and timezone information, while flagging companies with over 50% Chinese ownership. In such circumstances, if all your projects depend on a specific product to function, you've essentially handed over control.
This is precisely where learning an underlying framework like LangChain proves its value: these popular products are fundamentally built on underlying frameworks. Once you understand the underlying logic, you can reference or even customize similar functionality to solve your own real-world problems. For most people, you don't need to build a tool everyone can use—solving your own problems is enough.
The Truth About "Programming by Talking": Prompt Engineering Isn't a Silver Bullet
Current AI programming emphasizes "programming by talking," as if stating a requirement automatically produces results. But Loulan pointedly observes that the real difficulty lies in "how to state the requirement well."
He offers a brilliant analogy: a large model has studied the source code of the Spring framework and could theoretically recreate Spring. But when you actually ask it to "recreate Spring," where do you even begin? How do you verify whether its design is correct? To appreciate the weight of this analogy—Spring is the most important enterprise development framework in the Java ecosystem. After 20 years of evolution, it has grown into an enormous system encompassing dependency injection, aspect-oriented programming, transaction management, and dozens of core modules, with millions of lines of source code. Even if AI masters all the technical knowledge, it cannot proceed if humans cannot decompose a complex system's requirements into clear, verifiable subtasks. This fundamentally reflects the "requirements analysis" and "architecture design" capabilities in software engineering—skills that are precisely cultivated through framework learning.
Real-world business requirements are often more complex than open-source frameworks—open-source frameworks have already abstracted many things into specifications, while real business is full of highly specific, detailed requirements.
This leads to a widely propagated myth: making prompts more complete always yields better results. Loulan considers this untenable. He poses a counter-question: when communicating between humans, does clearly stating a requirement guarantee the other person understands? In reality, miscommunications and disputes are everywhere. What makes you so confident that an AI will perfectly grasp everything you say in a prompt?
Therefore, prompts themselves need training and validation. And the only path to validation is practice—when you have an idea, quickly build a small demo and use prompts combined with basic tools to verify the results. Without practice, all ideas remain empty, and even the tokens consumed are wasted.
Plan Token Consumption Like You Plan Architecture
As large model usage deepens, a common phenomenon emerges: spending keeps increasing while output becomes harder to measure. Loulan points out that this isn't just a problem for individual users—even giants like Microsoft, Amazon, and Google are shifting from "AI everywhere" to "token restrictions," because unregulated use of large models turns token consumption into a bottomless pit.
To understand the severity of this issue, you need to grasp the basics of token economics. A token is the fundamental unit large models use to process text; one Chinese character corresponds to roughly 1.5–2 tokens. Taking GPT-4o as an example, input pricing is approximately $2.50 per million tokens, and output is about $10. A complex Agent task might involve dozens of conversation rounds, multiple tool calls, and context passing—consuming tens of thousands of tokens in a single task is not uncommon. According to a McKinsey 2024 report, enterprises' actual GenAI spending typically exceeds budgets by 30%–50%, with runaway token consumption being a primary culprit. Microsoft began implementing a "Token Budget" system internally in early 2025, requiring teams to manage AI call costs the same way they manage cloud computing budgets—marking the industry's shift from "use freely" to "precision operations."

The solution lies in developing planning capability—planning token consumption the same way you plan system architecture. The mature pattern of mainstream Agent products (like Codex) is: when facing complex tasks, first decompose the task, then have different Agents complete subtasks, and finally aggregate results. But a hidden problem lurks here—if an intermediate step fails (say, a network fluctuation causes an online query to fail), the common approach is either to throw an error directly or rerun the entire task from scratch, possibly even re-planning. Tokens then flow away like water, completely wasted.
Loulan specifically highlights a tool in LangChain that's "not cutting-edge but highly practical"—time travel. This feature is based on LangGraph's unique state management mechanism: the Checkpointer. LangGraph models an Agent's execution process as a directed graph, where each node represents an execution step connected by edges. During execution, the Checkpointer automatically saves a complete state snapshot after each node completes (including all variables, context, and intermediate results). When a downstream node fails, the system can roll back to any previous checkpoint, restore state from that point, and re-execute—without starting from scratch. This mechanism draws from the Savepoint concept in database transactions and the branch-rollback philosophy in version control systems, significantly reducing token waste while ensuring execution reliability.
Once you master this approach, you can spend with confidence, putting every dollar where it counts. This is precisely the shift from a user mindset to a developer mindset: the technical barrier to development is no longer high, but the conceptual barrier remains.
Why LangChain Should Be Your First Choice for Agent Development
LangChain isn't the only framework on the market—there's also LlamaIndex, Spring AI in the Java ecosystem, and others. Loulan offers two core reasons for recommending LangChain.
The Most Experience, the Most Active Ecosystem
First, LangChain is one of the earliest frameworks, having accumulated the most issues and experience—just as you'd prefer to seek help from someone with extensive experience. Second, its ecosystem is extremely active. Standards like MCP and Skill, originally proposed by specific products, quickly receive LangChain support.
It's worth explaining these two key concepts. MCP (Model Context Protocol) was proposed by Anthropic in late 2024, aiming to standardize interactions between large models and external tools and data sources. Before MCP, every AI application needed custom integration code for each external service, creating massive duplication. MCP defines a unified JSON-RPC communication protocol, allowing tool providers to implement an MCP server once and be callable by all MCP-supporting clients. Skill is a concept introduced by Claude Code, referring to reusable task execution capability modules—similar to installing "skill plugins" for an AI Agent, enabling it to perform domain-specific operations (such as code review, database queries, etc.).
For example, with the Skill feature, LangChain provides direct support in its Deep Agents module—just download an API and start using it. This means that even when new technologies emerge in the future, you have good reason to trust that LangChain will quickly integrate them, freeing you from worrying about underlying protocol implementation details. LangChain's rapid support for these standards demonstrates its integration capability as a central node in the framework ecosystem.
The Eye of the Storm: Master One, Understand All
LangChain sits at the "eye of the storm" in the framework ecosystem. Built on Python and TypeScript, once you truly master it, language is no longer a barrier—want to switch to Java? There's LangChain4j. LangGraph has its corresponding LangGraph4j. Spring AI has its own Graph system.

In other words, once you thoroughly understand LangChain, many surrounding frameworks naturally click into place because their underlying ideas are connected. This also answers a common beginner question: "What language should I use for Agent development?" Once you've truly internalized the framework system, language simply isn't a barrier.
Three Design Principles Behind the LangChain and LangGraph Course
This upgraded course unifies the previously separate LangChain and LangGraph modules. Loulan explains that while the two take very different high-level approaches to building Agents, they share common ground at the lower level—he calls this shared layer the "foundational base of an Agent." By extracting this common base, the upper-level construction approaches become interconnected, eliminating the need for two separate courses.
Understanding the architectural differences between Chain mode and Graph mode helps grasp the significance of this unification. LangChain originally gained fame through its Chain mode, whose core idea is to string multiple processing steps into a linear pipeline: Input → Step A → Step B → Step C → Output. This pattern is clean and intuitive, well-suited for deterministic workflows, but struggles with complex scenarios requiring conditional branching, iterative loops, or parallel execution. LangGraph adopts a Directed Graph mode, where each node is an independent processing unit, connections between nodes can include conditional logic, and the system supports loop-backs and parallel branches. More importantly, LangGraph has a built-in state management mechanism—the entire graph shares a mutable state object, and nodes collaborate by reading from and writing to this state. This architecture is naturally suited for building complex Agent systems that require multi-step reasoning, dynamic decision-making, and error recovery.

The course follows three principles: prioritize system over features, practice over theory, concepts over code. Take Deep Agents as an example: built on LangGraph at its core, it represents an autonomous agent approach—delegating task planning entirely to the large model itself, contrasting with the traditional approach where programmers preset process branches.
Notably, LangGraph sees more use than LangChain in enterprise practice because Chain mode is less flexible than Graph. Nearly everything LangChain can do, LangGraph can also do—often more elegantly. Yet the course retains LangChain as a "complementary perspective"—the more classic ideas you're exposed to, the higher you can reach.
Additionally, the course includes local large model deployment content. Local deployment has become increasingly viable thanks to rapid advances in open-source models—represented by Meta's Llama series, Alibaba's Qwen series, and the DeepSeek series—which have approached closed-source model performance on many tasks. On the tooling side, Ollama offers a minimalist one-click deployment experience, while vLLM and TGI provide high-performance inference services for production environments. Hardware-wise, NVIDIA consumer GPUs (like the RTX 4090 with 24GB VRAM) can run quantized 7-billion-parameter models, while enterprise GPUs (A100/H100) can handle larger-scale models. Enterprises choose private deployment primarily for: data compliance requirements (sensitive data in finance and healthcare cannot be sent to third-party APIs), cost control (local deployment has far lower marginal costs than API calls for high-frequency usage), and reducing dependency risk on a single vendor. This satisfies both the need to avoid consuming cloud tokens and enterprises' private deployment requirements driven by data security concerns.
Conclusion: Become a Driver in the AI Era
AI brings a promising but rapidly changing future. Loulan's core message is clear: you don't need to become an expert in every tool, nor memorize every API. What you need is to build a complete knowledge system. With this system in place, even when a framework's APIs or features undergo minor adjustments, you can quickly keep pace.
As he puts it: "AI is the future, you must be the driver." In an era of tool overload, only by going deep into the fundamentals, building a systematic understanding, and persisting in practice can you truly command AI—rather than being commanded by AI (or the developers behind the tools).
Related articles

Harness Engineering: A Three-Layer Architecture for Production-Ready AI Agents
Explore Harness Engineering's three-layer architecture — Information, Constraint, and Automation layers — for building production-ready AI Agents with stability and control.

The Ethical Boundaries of AI Image Generation: Religious Sensitivity and the Content Moderation Dilemma
Exploring the ethical and technical challenges of AI image generation through the lens of religiously sensitive content, content moderation, and platform responsibility.

Wolf Defender Retraining in Practice: How Hard Negatives Cut False Positive Rate from 33% to 3%
Patronus retrained Wolf Defender v2 using hard negatives, contrastive regularization, and adversarial training, boosting real-world benign specificity from 66.85% to 96.63% while maintaining 97%+ attack detection F1.