What are LangChain, LangGraph and LangSmith - simply explained

What are LangChain, LangGraph and LangSmith - simply explained

I have come across the terms: langchain, langgraph and langsmith so many times since the agentic AI world took off. These terms and their classical textbook definitions always confused me, and the clarity came only by reading a lot, and doing some hands on exercises. Post understanding the fundamentals clearly, I was able to visualize, understand and relate to these terms more closely.

In today's blog, my goal is to declutter, clarify and make it easy to understand these terms. Before we head onto the lang family, let me make this blog holistic so everyone can understand. Let us define the world of agentic AI - because for non-techies, it might be a bit confusing to understand and correlate GenAI, LLM, Agentic AI, Discriminative AI, RAG, .... and so many other things. But trust me, once you get a fundamental hang of it, it all makes sense. Agentic AI is something which has the power to act on its own without the intervention or handholding of humans. Imagine - a mother asking her child to buy milk from a grocery store. Since human minds are magical, the child would know that she/he would have to keep some cash, go to the market, pick up the milk necessary, check its expiry date, bring back the milk and notify the mother. All done, and all this while, the mother was chilled out about milk and she was focusing on something else. That is the fundamental of Agentic AI: agents that can think, decide, and act on their own to complete tasks — with minimal human help. That is agentic AI.

How is agentic AI different from generative AI.

In my personal opinion, this is not a right question. Both are inter-related and one stems from the other. With the advent of Generative AI, thanks to the transformer architecture and the GPT series which started the whole wave of urgency and unending competition among AI researchers, generation of content became easier, democratic, and most of all "possible". The next step which researchers were thinking - what if human intervention could be removed? The AI could possible think - "what should I do next". And mix this magic with the generative aspects of large language models. That makes it agent+AI.

Why is it a huge focus for today?

Well, because its new, immature and being tested out, being competed with and everyone wants to be a part of it.

Imagine buying a ticket from railways station. When the agent sitting in front of the computer is fixing you a ticket to your destination: the agent would be carrying out certain steps to do the same. Similarly, agentic AI is nothing but a fancy term for automating tasks with GenAI in the loop and to some or none of the extent - human in the loop.

Fundaments of Lang family

To understand the lang family, the first thing to understand is - Lang family (langChain, LangGraph, LangSmith) is nothing but frameworks and tools to build and test out agentic AI applications. Let me give you one example: in case you are familiar with classical machine learning (which btw - I really miss these days with people just blindly running after fancy terms), and you have used python for these tasks, you might be aware of scikit-learn library which has the capability and functions to implement algorithms. The library gives you standard modules and functions to build on these tasks. Similarly, lang family has been developed by a company called LangChain Inc. which constitutes the frameworks to build "agentic systems".

LangChain

You can get all the textbook definitions on the website and so many other blogs. Let me break it down simply. In my previous example of mom asking the kid to bring milk: imagine the kid is an AI now - lets call it Andy. Mr Andy is not a human, but we want it to bring together human like capabilities. Mr. Andy needs legs to walk to the store, eyes to read expiry dates, a wallet app, and also remember that last time - mom had asked for a simple semi-skimmed milk and not almond milk. Hold on to this thought.

Langchain has following core components:

A) Chains: it represents sequences of tasks. In this example, keeping some money -> going to market -> checking expiry -> buying milk...

B) Agents: AI can choose tools and agents to carry out certain tasks. For ex: imagine that the kid is busy, and in that case, he wants to ask his brother to do the same task. That is essentially in AI world - using tools and agents based on certain criteria.

C) Memory: from previous feedback and context, the kid knew - no almond milk. Similarly, an AI agent needs the memory component which has to remember short term and long term.

D) Tools: if the kid needed a calculator to calculate the remainder of the money to ask from a shopkeeper, he might need a calculator. Similarly, AI agents have to make API calls to other functions, pull data from a database, etc. for which the tools will be needed.

E) Retrievals: This concept is related to RAG (Retrieval augmented generation) wherein you are using the LLM knowledge + retrieving context from your own database or files to keep your knowledge personalized.

F) Integration: to connect with LLMs such as OpenAI, Claude, or Gemini - integration comes to play. The open source LLMs have made it possible to delve into the world of foundation models and improvise on top of those or implement RAG based solutions.

H) Prompts: to get things done, you have got to ask them. Writing prompts has become an art in itself for the right reasons. Better the question framing, better the responses.

Very simply, LangChain = Lang+Chain; Lang = Language as in LLMs, chain = representing sequence of tasks.

To summarize, LangChain is a framework that helps build sequential architectures for agentic AI applications by chaining together language models, tools, memory, and logic.

In below diagram, Andy Yang explains in one of his blog how the architecture could be represented

Image is taken from this blog from Andy Yang on medium

LangGraph

Now imagine the mother asking the kid - "Go buy milk. If it’s not available, figure out a good alternative. And don’t bother me unless it’s urgent — I trust you."

What actually happens:

The child, being smart and agentic, sets off — but the journey isn’t simple.

  1. First, the child checks:
    “Do I have enough cash?”
    → If not, loops back to mom to ask for money.
  2. Walks to the local grocery store, but oh no — milk is out of stock.
  3. The child remembers mom said:
    “If there’s no milk, get almond milk — but only if it’s unsweetened. If not, try soy milk. If none, call me.”
  4. So now the logic branches:
    • Check for unsweetened almond milk → yes? Buy it.
    • If no, check soy milk → yes? Buy it.
    • If all fail → call mom for help (only now does she get involved).
  5. While choosing, the child checks expiry dates. If close to expiry → loop back and pick another carton.
  6. At checkout, the card fails!
    → Retry with cash. If both fail → loop back to mom to ask for help.
  7. Finally, returns home and says:
    “Mission accomplished. Here’s your unsweetened almond milk with the latest expiry date!”

This child didn’t follow a linear checklist. They made decisions, branched paths, remembered context, handled failures, and even retried steps — just like LangGraph does for AI agents. The below is what you should remember.

LangChain struggles with complex workflows, loops, and multi-agent coordination. There is where LangGraph comes to play. Both belong to same family and are based on similar principles. However, LangChain considers each task as a chain component, whereas Langgraph considers each component as a "node" and nodes are joined together by "edges".

As per LangChain website,  LangGraph is an orchestration framework for complex agentic systems and is more low-level and controllable than LangChain agents. On the other hand, LangChain provides a standard interface to interact with models and other components, useful for straight-forward chains and retrieval flows.

Let me go one step further to explain why LangGraph has come into the Lang family. There are many kinds of agents and two of them are: Router & Autonomous Agents. Router routes the query to the right handler, whereas Autonomous Agents, as the name suggests, does everything on its own, its more complex in nature. However, in terms of reliability, as you can imagine:

Simpler workflows are more reliable. Therefore, routers are in general, more reliable than autonomous agent. LangGraph's job as an AI framework, is to make these complex agents more reliable. See below visual from LangChain academy:

This visual is taken from LangChain Academy

Below are the core components of LangGraph:

  • Nodes – These are individual steps in your workflow, like calling a model or running a function.
  • Edges – They define the logic for what step comes next, based on the output or current state.
  • State – A persistent memory that carries context, decisions, and results throughout the workflow.
  • Graph Definition – The structure that maps all nodes, their connections, and logic into a complete flow.
  • Entry Point – The starting node where the graph begins its execution.
  • End Condition – A rule or signal that tells the graph when to stop running.

Below diagram from IBM explains the workflow for LangGraph really well:

Image is taken from IBM website

LangSmith

Once you build an application, you have to test it. LangSmith helps you test your Langchain or Langgraph based applications. Here is the textbook definition: LangSmith is a developer tool that helps you trace, debug, evaluate, and monitor your language model applications — especially those built using LangChain or LangGraph.

It gives you a detailed, transparent view of what your app and the model are doing at each step — from prompt construction to final output — including any tool calls, memory use, and intermediate reasoning.

In our previous monther-kid example, LangSmith is the mother’s control center — it doesn’t tell the child what to do, but it helps her observe, learn from, and improve the mission over time.


I hope I was able to clarify the fundamentals of Lang family. In one of my next blogs, I will do a hands on exercise to explain how LangGraph actually works.

Resources:

Hands on LangChain: RAG
RAG tutorial with LangChain
LangChain Series — 01 What is it?
I’m using LangChain in actual development and learning it along the way. I’m documenting my understanding here, so fellow learners can…
LangChain
LangChain’s suite of products supports developers along each step of their development journey.
What is LangGraph? | IBM
Stay ahead of the curve with AI-powered solutions that enhance productivity and streamline workflows using WatsonX and LangGraph.