AI Hints
Home›LangGraph Tutorial›Wrapping Up
LangGraph · Lesson 119 of 120

LangGraph and LangChain

Working together.

⏱ 2 min read▶ Video at 2:07:37🎓 Free
Watch this lesson in the LangGraph courseWatch on YouTube ↗Full LangGraph course

LangGraph and LangChain aren't rivals. They're layers. LangChain gives you models, prompts, tools, and retrievers. LangGraph gives you control of the flow. Most real apps use both.

LangGraph and LangChain
From the video: LangGraph and LangChain
  • Not rivals
  • Layers
  • Most apps use both

The layers

From the bottom up. LangChain's building blocks. Models, tools, and retrievers. Then create agent, a ready made agent, which is itself a LangGraph graph. Then your own LangGraph graphs, for full control. And LangSmith, across everything, for tracing and testing.

  1. LangSmith: tracing, evals
  2. Your LangGraph graphs
  3. create_agent
  4. Models, tools, retrievers

How they fit

Use LangChain pieces inside your nodes. Use create agent for standard agents, and add them to your graphs as nodes. And use your own graph for the overall flow. You did exactly this in the support desk.

keyvalue
Inside nodesLangChain pieces
Standard agentscreate_agent
Overall flowyour graph
Examplethe support desk

Summary

LangChain provides the building blocks, and LangGraph controls the flow. Together, they cover simple and complex apps. Next, what to learn after this course.

Key takeaways
  • Building blocks
  • Control of the flow
  • Use both
Next up: What to Learn Next — keep building