How LangChain, LangGraph, LangSmith fits together
LangChain, LangGraph, LangSmith: Three Names, One Confusing Naming Convention They all start with "Lang," they're all made by the same company, and they solve three completely different problems. Here's what each one actually does. If you've started building anything with LLMs in the last year, you've run into this wall: someone's tutorial uses LangChain, someone else's uses LangGraph, a third…
LangChain, LangGraph, and LangSmith are three separate tools that together create a powerful suite for building and managing large language model (LLM) applications. Despite their similar names, each serves a distinct purpose.
LangChain is the foundation of the stack, providing the building blocks for creating LLM applications. It offers standardized interfaces for interacting with different models, prompt templates, data retrievers, tool definitions, conversation memory, and pre-built integrations for various components like vector stores, document loaders, and APIs.
LangChain uses the LangChain Expression Language (LCEL) to compose these components into a pipeline, making it suitable for straightforward applications like chatbots, basic RAG systems, or summarizers.
However, LangChain alone cannot handle more complex agents that require loops, conditional branching, multi-step planning, or must survive crashes while retaining their state. That's where LangGraph comes in. LangGraph is an orchestration layer that models agents as StateGraphs, consisting of nodes (each representing a step, either a deterministic function or an LLM call) connected by edges.
It introduces checkpointing, ensuring that the agent's execution state persists even if the system crashes, allowing it to resume from where it left off. LangGraph can be used independently of LangChain, though most teams combine LangChain's components with LangGraph's nodes for building robust agents.
Finally, LangSmith is the observability layer that complements the other two tools. It captures every run of the agent, recording details like LLM calls, tool invocations, and the path taken through the graph. With LangSmith, you can monitor traces, evaluate the agent's performance, track error rates and latency in production, and identify failure patterns that would otherwise be difficult to detect. LangSmith works with any SDK, not just LangChain, making it a versatile tool for monitoring and debugging LLM applications.
In summary, LangChain provides the building blocks, LangGraph handles the orchestration and state management of complex agents, and LangSmith offers the observability needed to ensure your agent runs smoothly in production. When building an LLM application, it's recommended to use all three tools together, as they work seamlessly together and address different aspects of the development process.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.