All videos
0:00 / 0:00
ai

LangChain Agent Executor Deep Dive

James Briggs16 June 2026Watch on YouTube

Part of series

Ep. 4 · Langchain Full Agent

View the series

Description

In this video, we will continue from the introduction to agents and dive deeper into agents. Learning how to build our custom agent execution loop for v0.3 of LangChain. When we talk about agents, a significant part of an "agent" is simple code logic, iteratively rerunning LLM calls and processing their output. The exact logic varies significantly, but one well-known example is the ReAct agent. Reason + Action (ReAct) agents use iterative reasoning and action steps to incorporate chain-of-thought and tool-use into their execution. During the reasoning step, the LLM generates the steps to take to answer the query. Next, the LLM generates the action input, which our code logic parses into a tool call. Following our action step, we get an observation from the tool call. Then, we feed the observation back into the agent executor logic for a final answer or further reasoning and action steps. The agent and agent executor we will be building will follow this pattern. 🔗 Full Course: https://www.aurelio.ai/course/langchain 📌 Article and code: https://www.jamesbriggs.io/langchain-agent-executor 👾 Discord: https://discord.gg/c5QtDB9RAP Twitter: https://twitter.com/jamescalam LinkedIn: https://www.linkedin.com/in/jamescalam/ #ai #coding #aiagents #langchain 00:00 LangChain v0.3 Agent Executor 09:26 Creating an Agent with LCEL 13:53 Executing Tool Calls 16:58 Agentic Final Answers 25:58 Building a Custom Agent Executor 32:47 Executing Multiple Tool Calls

What you'll learn

  • You learn how to build a custom agent executor in LangChain v0.3 using LCEL
  • You understand the ReAct pattern: agents reason iteratively and execute tools based on that reasoning
  • You see how an agent feeds tool observations back into the execution loop for further reasoning or a final answer

Frequently asked questions

What is the ReAct pattern in agents?
ReAct (Reason + Action) combines iterative reasoning and tool-use. The LLM generates reasoning steps and actions, executes tools, and uses observations for further steps until a final answer is reached.
How does an agent feed back tool call observations?
After a tool call, the agent receives an observation. This observation is fed back into the agent executor logic, resulting in a final answer or further reasoning and action steps.
What is the role of LCEL in building agents?
LCEL (LangChain Expression Language) is used to construct the agent and agent executor in LangChain v0.3, allowing you to define custom execution loops.
Can an agent call multiple tools at once?
Yes, the video covers executing multiple tool calls. The agent can invoke different tools sequentially or in a particular order based on its reasoning.

Topics