[KongchangAI]
· 2 min read· 1,439 words

LangChain 1.3 Comprehensive Tutorial: Architecture Basics and Full Project Implementation of RAG/Agent/MCP/LangGraph

LangChain 1.3 Comprehensive Tutorial: Architecture Basics and Full Project Implementation of RAG/Agent/MCP/LangGraph

Bilibili creator Loulan advocates mastering the LangChain underlying framework rather than chasing new tools, and releases a 1.3 comprehensive tutorial.

The article introduces Bilibili creator Loulan's LangChain 1.3 comprehensive tutorial and its core viewpoint: developers should not exhaust themselves chasing endless AI tools but should master the underlying framework to gain migration capability and customization space. The course unifies LangChain and LangGraph into an "Agent underlying foundation," covering multi-agent, Deep Agents, and other modules in one course, following three principles: system over features, practice over theory, and thinking over code, with multi-agent projects hand-coded from scratch. The article also highlights the value of the time travel feature for controlling token costs, that prompts are not a panacea and require practical verification, and the low-cost migration path to the Java ecosystem after mastering the LangChain system.

AI tools are emerging endlessly, and many developers find themselves trapped in a cycle of "learn a tool—tool becomes obsolete—learn a new tool." In his newly released LangChain 1.3 comprehensive tutorial, Bilibili creator Loulan offers a key insight: rather than chasing higher-level products, it's better to thoroughly master the underlying framework. This viewpoint deserves serious consideration.

Why Learn LangChain Now Instead of Chasing New Tools

At the beginning of the course, Loulan spends considerable time discussing a phenomenon: developers exhaust themselves learning various new tools, only to find limited results after all that effort. His core argument is that every tool carries its developer's design intentions, and once your needs diverge from the tool's预设 assumptions, you end up in a passive position.

According to Loulan's analysis in the video, tools like Claude Code have layered increasingly strict security measures against domestic users—from stopping services and banning accounts to capturing private information such as IP addresses and time zones, even tagging enterprise users with more than 50% domestic ownership. His stance is clear: "If all your projects must rely on a certain product to be built, then are you playing with the tool, or is the tool playing with you?"

This judgment points to a more fundamental issue: mastering the underlying framework means having migration capability and customization space. As one of the earliest Agent development frameworks, LangChain leads its peers in ecosystem activity. Loulan emphasizes two reasons for choosing it: first, "the most experienced"—it has accumulated the most problems and solutions; second, an active ecosystem—when new standards like MCP and Skill emerge, LangChain can quickly integrate and support them.

A practice of colonel engineering

Three Core Principles of Course Design: System over Features, Practice over Theory, Thinking over Code

Loulan explicitly states that this course does not require students to be familiar with every API. The course design follows three principles: emphasizing system over features, practice over theory, and thinking over code.

In terms of structure, the biggest change is the unification of LangChain and LangGraph. Previously, these two modules were usually taught as two independent courses because the approaches to building Agents differ significantly. But Loulan believes they are different modules under the same LangChain framework, sharing common ground at the底层 level. He calls this part the "Agent's underlying foundation"—encapsulating the basic capabilities for interacting with large models. Once the foundation is extracted, the construction approaches of upper-layer LangGraph and LangChain become interconnected, and one course suffices to cover them.

The Deep Agents module is also built on LangGraph. Loulan explains the difference in approach among the three: LangChain and LangGraph involve programmers pre-defining execution paths, while Deep Agents leave task planning to the large model to complete autonomously. After understanding the underlying foundation, the learning cost of all three approaches drops significantly.

Made a unification

LangGraph is an orchestration framework launched by the LangChain team for building stateful, multi-step Agent applications. Its core idea is to model an Agent's execution flow as a graph: nodes represent specific processing steps (such as calling a model or executing a tool), edges define the transition conditions between steps, and it supports loops, branching, and state persistence. Compared to LangChain's early chain-call-based abstraction, LangGraph is better suited for expressing complex Agent logic that requires repeated reasoning and dynamic decision-making, and it is also the construction foundation for upper-layer modules like Deep Agents.

Deep Agents is an Agent development pattern built on top of LangGraph. Its core difference is that it delegates "task planning" itself to the large model, rather than having programmers pre-write every execution step. The model autonomously decomposes goals, decides which tools to call, evaluates intermediate results, and adjusts subsequent actions. This pattern reduces the coding required for process orchestration but places higher demands on the model's reasoning ability and state management, so it still relies on the model interaction, tool invocation, and state-saving capabilities provided by the underlying foundation.

Time Travel: An Underrated Cost-Saving Tool

There is a discussion about token costs in the video that deserves separate attention. Loulan points out that even tech giants like Microsoft, Amazon, and Google are shifting from "all-in AI" to "token restriction," because using large models without regulation can lead to bottomless consumption.

He illustrates this with a scenario of an Agent executing a task: a complex task is split into multiple sub-steps, the first few steps execute smoothly, and then a middle step fails due to network fluctuations. Most Agent products re-run the entire task, with costs flowing out like water while results remain stuck. LangChain's "time travel" feature can save the task execution process and restart from the failed step, so previously completed parts don't need to be paid for again.

This feature isn't cutting-edge, but Loulan believes it reflects a mindset: plan token consumption the way you plan system architecture, so money is spent where it matters.

In Agent scenarios, token consumption accumulates rapidly as steps increase: each round of model calls requires resending context such as historical conversations and tool return results to the model. The longer the task chain, the larger the context carried in each call, and costs grow in an additive fashion. If the entire task is re-run after a mid-task failure, all previously consumed tokens are wasted. The value of time travel lies in using LangGraph's state persistence mechanism (checkpoint) to save execution snapshots at each step. When a failure occurs, it recovers from the nearest checkpoint and only re-executes the failed and subsequent steps, minimizing duplicate billing.

Hand-Writing Multi-Agent from Scratch: Practice Throughout the Course

There is a noteworthy detail in the course's practical design. Loulan mentions that the notes for the multi-agent practical section contain only a flowchart, and all other code is hand-written live. The purpose is to let students see the complete process from design to implementation, rather than copying existing code.

The practical coverage includes: building RAG applications with LangChain, Deep Agents hands-on practice, and building a multi-agent project from scratch. Additionally, the course supplements a section on building local large model services, addressing enterprises' reluctance to hand private information to cloud services by explaining local deployment and the setup of new API relay stations.

How we wrote it

Prompts Are Not a Panacea: No Practice, No Results

Loulan spends considerable time in the video correcting a popular misconception: that writing a complete prompt will necessarily produce good results. His rebuttal is direct—when communicating with another person, if you explain your needs clearly, will they definitely get it? The same applies to large models.

He further points out that claims commonly seen in short videos, such as "RAG accuracy improved from 60% to 90%," are confusing: evaluating natural language interaction cannot be summarized by a simple number. The correct approach is to quickly build a small demo to validate the idea, and after practical verification, iterate on prompts and processes.

This viewpoint aligns with the course's "practice-oriented" design logic: without practice, everything you propose is empty, and the tokens you spend are wasted.

Actually there's no threshold anymore

After Learning LangChain: Migration Paths for Languages and Frameworks

Regarding the common question "what language should I use for Agent development," Loulan gives an answer based on ecosystem migration: once you've thoroughly mastered the LangChain system, language is no longer a barrier. Want to switch to Java? There's LangChain4j and LangGraph4j, and Spring AI also has a corresponding Graph module. The ideas are interconnected, and the framework ecosystem is universally applicable.

The course's positioning is set accordingly: not to cultivate large model experts, but to help students move up from "beginner" and build a complete cognitive system for Agent development. Even if LangChain's API undergoes minor adjustments in the future, with the system in place, you can quickly keep up.

Loulan concludes with a sentence as a footnote to the course philosophy: "AI is the future, but you must be the driver." This may also be what distinguishes this course from tool-based teaching—it seeks to cultivate mastery, not operational proficiency.

LangChain4j is the corresponding implementation of LangChain concepts in the Java ecosystem, providing model integration, prompt templates, tool invocation, RAG retrieval augmentation, and other capabilities; LangGraph4j is a port of LangGraph's graph-based orchestration ideas to Java, supporting stateful multi-step processes; Spring AI is the official AI application development framework launched by Spring, whose Graph module also provides process orchestration capabilities. These frameworks differ in API naming and details, but the underlying abstract concepts—model encapsulation, tool invocation, state transitions, retrieval augmentation—are highly consistent. Therefore, after mastering one system, migration mainly involves familiarizing yourself with syntax and the surrounding ecosystem, rather than re-understanding how Agents work.

#LangChain#LangGraph#Agent development#RAG#MCP#Deep Agents#multi-agent#tutorial
Share:

Related articles