Free YouTube Transcribe

Video transcript

Stop Confusing LangChain, LangGraph, and LangSmith | Full Breakdown

ByteMonk · 1,996 words · 10 min read

Want to search this transcript, jump the video from any line, or download it as TXT, SRT, or VTT?

Open in the transcript tool

Full transcript

Why Everyone Is Talking About LangChain, LangGraph & LangSmith

0:00LangChain, LangGraph, LangSmith. Three

0:02names you keep seeing in every serious

0:04AI engineering discussion right now.

0:06Not in research papers, in production.

0:09In systems that retrieve from real data,

0:11call external tools, run multi-step

0:13reasoning loops, and get monitored like

0:16actual software. But most people who

0:18have heard of them, or even used them,

0:20have a fuzzy picture of what each one

0:22does,

0:23why all three exist, and how they fit

The Problem: LLM Apps Are More Than API Calls

0:25together.

0:26That's what this video is about. A

0:27ground-up breakdown of the entire stack,

0:29what each piece solves, how they relate,

0:32and how they combine into a coherent

0:34architecture for building AI systems

0:36that go well beyond a single API call.

0:39Let's get started.

0:46When you hit an LLM through an API, the

0:48interaction is that simple.

From Single Prompt to AI Pipelines

0:50You send a prompt, the model returns

0:53text. That's the whole thing.

0:55Think about a simple document Q&A

0:57system.

0:58A user asks a question about an internal

1:01document.

1:02Before you even call the model, you need

1:05to find the right document out of

1:07potentially thousands.

1:09Then you need to construct a prompt that

1:11includes the relevant context.

1:13The model generates an answer.

1:15Maybe you need to format that answer, or

1:17pass it to another step.

1:19What you have now isn't an LLM call.

1:22It's a pipeline.

1:23You're retrieving data, constructing

1:25prompts dynamically, calling the model,

1:28parsing outputs, and chaining steps

1:30together.

1:31And if you're building all of that from

1:33scratch, you'll end up writing the same

1:35boilerplate over and over again.

What LangChain Solves (Core Idea)

1:38That's the problem LangChain was built

1:40to solve.

1:41LangChain gives you the building blocks

1:43to structure applications around

1:45language models,

1:46rather than just treating them as

1:48isolated API calls.

1:50So let's walk through the key

1:51abstractions, because each one solves a

1:53specific pain point.

Prompt Templates Explained

1:55First, prompt templates.

1:58Instead of hardcoding prompts as static

2:00strings, you define reusable templates

2:02that inject context at runtime.

2:05Something like, "Explain the concept of

2:07so and so topic in simple terms."

2:09Your application substitutes the topic

2:12based on what the user is asking.

2:14Simple idea, but it means your prompts

2:16are structured, testable, and

2:18maintainable, rather than scattered

2:20string literals across your code base.

Chains: Building Multi-Step Workflows

2:22Second, chains. A chain is a sequence of

2:25steps where the output of one component

2:27becomes the input of the next.

2:29Summarize a document, extract key

2:31insights, generate a user-facing

2:33response.

2:35Each step involves the model, but they

2:37are wired together into a single

2:38cohesive workflow.

2:40LangChain handles the plumbing, so you

2:42don't have to.

2:43And then there is tools.

Tools: Giving LLMs Real Actions

2:45By default, an LLM can only generate

2:47text. It can't run a calculation. It

2:50can't check today's stock price. It

2:52can't query your database.

2:54Tools fix that.

2:55A tool is just a function the model can

2:57invoke when it decides it needs external

3:00information.

3:01The model says, "I need to run a web

3:03search." The framework runs it, gets the

3:06result, and passes that back into the

3:07model's context.

3:09Now the model can continue reasoning

3:11with fresh, real-world data. This is the

3:14shift that turns a text generator into

3:16something that acts.

3:18Next up, RAG. Retrieval augmented

Retrieval Augmented Generation (RAG) Basics

3:21generation.

3:22LLMs have a hard limitation. They only

3:24know what they were trained on. You

3:26can't retrain a model every time your

3:28company updates its internal docs.

3:30RAG solves this elegantly.

3:32Instead of cramming knowledge into the

3:34model, you store your documents in a

3:35vector database.

3:37So when a user asks a question, the

3:39system retrieves the most relevant

3:40chunks using semantic similarity search,

3:43injects them into the prompt, and the

3:45model answers based on that context.

3:48The model doesn't need to know

3:49everything. It just needs access to the

3:51right information at the right time.

The OAuth & Authentication Problem in Agents

3:54Now, here is a problem that doesn't show

3:55up until you try to ship. Your LangChain

3:57agent can call tools, but the moment

3:59that agent needs to act on behalf of a

4:01real user, read their Gmail, post to

4:04Slack, update a Jira ticket, push a

4:05GitHub issue, you need OAuth. And not

4:08once, for every single provider your

4:10agent touches.

4:12Think about what you are actually

4:13building here.

4:14Your application kicks off an OAuth

4:16flow. That flow needs to handle three

4:18things that are all your responsibility

4:20by default. The OAuth handshake itself,

4:23storing and managing the tokens it gets

4:25back, and refreshing those tokens before

4:27they expire mid-task.

4:29And all of that produces a connected

4:31account. A live authenticated link

4:33between one of your users and one

4:35external provider.

4:36Then that connected account

4:37authenticates against the actual OAuth

4:39providers. Gmail, Slack, Jira, GitHub,

4:43each with its own token logic and

4:44scopes.

4:45Now, multiply this by every provider

4:47your agent needs, and every user in your

4:50system.

4:51Your LangChain tools request a token.

4:53You have to return tokens at tool call

4:55time via an encrypted token vault, so

4:57that the tokens live outside the model's

4:59context window, as there's a huge

5:01surface area for attacks and

5:02vulnerabilities. And this is what our

5:04today's sponsor, Scale Kit, offers you

Tool Authentication Layer (ScaleKit Overview)

5:06out of the box.

5:07Your agent calls a tool, Scale Kit

5:10handles the authentication, OAuth, token

5:12refresh, credential isolation. It

5:14enforces the access rules. Delegated

5:16identity, per-agent scoping, RBA,

5:19and executes the tool call against

5:21whatever system you need. SaaS, API, MCP

5:24server, database,

5:25and logs every action. Who, what, when,

5:28which agent.

5:30And you just focus on the agent and

5:32business logic, while this unified

5:33gateway handles the messy complex stuff.

5:36They in fact support 3,000 plus tools.

5:38Gmail, Slack, Jira, Salesforce, Notion,

5:40GitHub, and more. And if you need your

5:42own OAuth app credentials or production

5:43branding and higher rate limits, they

5:46support that, too. Link is in the

5:48description.

5:49And once you have tools and chains

5:50working,

5:51developers naturally start pushing it

From Chains to Agents (Reason + Act Loop)

5:53further.

5:54What if instead of a fixed pipeline, the

5:56model could decide what to do next?

5:59That's an agent.

6:00An agent doesn't just answer one

6:02question.

6:03It reasons about a problem, takes an

6:05action, executes it, observes the

6:07result, and then decides what to do

6:09next.

6:11Over and over until the task is

6:12complete.

6:13The loop

6:14called the react loop, reasoning and

6:16acting. It looks like this.

6:19You first analyze the task. What do I

6:21need to do?

6:22Choose an action. Which tool should I

6:24invoke?

6:25Execute it. Run the tool, get the

6:27result.

6:28Observe. What did I learn? Is the task

6:31done?

6:32Repeat if not.

Why Agent Workflows Become Complex

6:34But here is where the engineering

6:35challenge hits. These workflows are no

6:38longer linear.

6:39They have loops. They branch. They call

6:41different tools depending on what they

6:43find.

6:44They have state. Information that needs

6:46to persist across multiple reasoning

6:48steps.

6:49You're no longer writing script. You're

6:50engineering a dynamic stateful system.

Why LangGraph Exists

6:53Simple chains can't handle this cleanly,

6:56which is exactly why LangGraph exists.

6:59LangGraph takes a fundamentally

7:01different approach to structuring AI

Graph-Based AI Architecture (Nodes & Edges)

7:03systems.

7:04Instead of chains, it uses graphs.

7:07A LangGraph application is made up of

7:09nodes and edges.

7:10Each node is a unit of work.

7:13An LLM call, a tool execution, a

7:15retrieval step, a custom function.

7:18Each edge defines how the system moves

7:20between nodes.

7:22And those transitions can be

7:23conditional.

Research Agent Example (Loops & Decisions)

7:25Here is what that looks like in

7:26practice.

7:27Say you're building a research agent.

7:29It gets a question, runs a web search,

7:31reads the result, decides whether it has

7:34enough to answer. And if not, it

7:36searches again with a refined query.

7:38That's a loop. It's It's a straight

7:40line. And a chain can't model it

7:42cleanly.

7:43In LangGraph, that loop is explicit.

7:46The reasoning step is a node.

7:48The search is a node.

7:50That do I have enough decision is an

7:52edge condition.

7:53The system loops back or exits based on

Stateful AI Systems Explained

7:55state. Speaking of state, that's the

7:58other key idea.

7:59Rather than passing data manually

8:01between steps,

8:02LangGraph maintains a shared state

8:04object that entire graph reads from and

8:06writes to.

8:07Each node picks up the current state,

8:10does it work, updates it, and passes

8:12control forward.

8:14This makes the system auditable.

8:16You know exactly what information each

8:18step had, what it changed, and what

8:20triggered the next move. But there's a

Debugging Problem in AI Systems

8:22problem that doesn't surface until you

8:24actually try to ship one of these

8:26systems.

8:27When something goes wrong, and it will,

8:29you need to figure out why.

8:31Was it the prompt? Did the retrieval

8:33step pull the wrong documents?

8:35Did the agent choose the wrong tool?

8:38Did the model hallucinate?

8:40In a system with multiple reasoning

8:41steps, tool calls, and retrieval

8:43pipelines,

8:44the failure could be anywhere.

8:46And unlike traditional software where

8:48failures are crashes,

8:50the failure mode here is often a subtly

LangSmith: Observability for AI Applications

8:52wrong answer.

8:54LangSmith fills that observability gap.

8:56LangSmith records every step, the input

8:58prompt, the model's response, which

9:00tools were called, what they returned,

9:02the retrieved documents, intermediate

9:04reasoning, all visualized as a

9:06structured trace.

9:08When something produces a wrong answer,

9:10you open the trace and see exactly where

9:12things went sideways. But observability

9:15isn't just about debugging. It's also

Evaluation & Measuring AI Quality

9:17how you get better over time.

9:19AI outputs aren't binary. A response can

9:22be partially correct, off-topic, or

9:24subtly misleading.

9:26LangSmith lets you build evaluation data

9:28sets and runs your system against them

9:30automatically, measuring accuracy,

9:33relevance, latency, and token usage. So

9:36when you change a prompt tweak your

9:37retrieval logic, you're not guessing

9:39whether it helped.

9:41You can measure it.

9:42Same goes for prompt experimentation.

Prompt Experiments and A/B Testing

9:45Small wording changes can dramatically

9:47shift model behavior.

9:49LangSmith lets you run AB comparison

9:51across prompt variants against the same

9:53data set. So, your iteration is

9:55systematic.

9:56And once you are live in production, it

Production Monitoring & Metrics

9:58tracks latency, error rates, token

10:00usage, and tool invocation patterns

10:03under real traffic.

10:04Think New Relic or Grafana for

10:06distributed systems.

End-to-End Architecture (How All Three Work Together)

10:07Here is what this looks like end-to-end.

10:09A user sends a request. LangGraph

10:12determines the execution path.

10:14Which steps to run, in what order, with

10:16what branching logic.

10:18At each node, LangChain components do

10:20the actual work. The prompt

10:21construction, the retrieval, the model

10:24call, the tool execution.

10:26And LangSmith records the entire thing.

10:29Every input, every output, every

10:30decision point, every tool invocation.

LangChain vs LangGraph vs LangSmith Summary

10:34That's the architecture.

10:35LangChain is the vocabulary. LangGraph

10:38is the control flow. LangSmith is the

10:40visibility layer.

10:41Each one solves a distinct problem.

10:44Together, they cover the full surface

10:46area of building AI systems that

10:48actually work in production.

Limitations & Criticism of LangChain

10:50Now, none of this means LangChain is

10:52perfect.

10:53The most common criticism you'll hear

10:55from engineers,

10:56the abstractions can be too heavy.

10:58When something breaks, you're often

11:00debugging through multiple layers of

11:02framework code before you even get your

11:04actual logic.

11:06For a simple one-step LLM call, the

11:08overhead generally isn't worth it.

11:10Just hit the API directly.

11:12There has also been a pain around how

11:14fast the library evolved.

11:17Teams that built on early versions found

11:19themselves refactoring when the API

11:20shifted under them.

Why LangGraph Was Created

11:22LangGraph was actually born out of some

11:24of this frustration.

11:25Instead of rigid chains, you get

11:27explicit graphs where the control flow

11:29is right in front of you.

11:31And LangSmith exists because

11:32observability was an afterthought in the

11:35original design. When your pipeline is a

When You Actually Need This Stack

11:37black box, you can't improve what you

11:39can't see.

11:40So, the honest take is

11:42if you are prototyping something small,

11:44you probably don't need this stack.

11:46Where it earns its complexity is

11:47multi-step pipelines, dynamic agents,

11:50and systems you need to evaluate and

11:52iterate on over time.

11:54That's where these three pieces start

11:55pulling their weight together.

11:57A year ago, building with AI meant

The Shift: From Prompting to System Design

12:00writing clever prompts.

12:01Today, it means designing systems

12:04with retrieval pipelines, reasoning

12:05loops, tool orchestration, and

12:07observability baked in. That shift is

12:10already happening. The engineers

12:12building the next generation of AI

12:13products aren't just prompt crafting.

12:16They are architecting. And this stack is

12:18one of the core foundations they are

12:19building on.

Final Takeaways & What to Learn Next

12:20If you want to go deeper on any of these

12:22pieces, rag pipelines, agent

12:24architectures, evaluation frameworks,

12:26that's exactly what we cover in this

12:27channel. Subscribe, and I'll see you in

12:29the next one.

This transcript was generated from the captions YouTube publishes for this video. Get the transcript of any YouTube video atfreeyoutubetranscribe.com: free, unlimited, no sign-up.