LangChain vs LangGraph vs Deep Agents: code walkthrough
Learn how four LangChain layers fit together in Google Colab, using GPT-5.4-Mini, stock lookup tools and a Deep Agents Markdown file example.
Player not loading? Watch on YouTube
The speaker explains the LangChain ecosystem through four layers, then implements the same stock lookup task at each level. LangChain supplies the core model and tool abstractions. LangGraph organizes calls into a dependency graph. LangChain's create_agent builds a tool-calling loop on that graph, while Deep Agents adds an agent harness with built-in tools and support for subagents.
The Google Colab walkthrough uses GPT-5.4-Mini through ChatOpenAI and requires an OpenAI API key. An Alpha Vantage key is optional: the example falls back to dictionary values when live lookups fail. During the demonstration, the speaker exhausts the stock lookup allowance and explicitly identifies the subsequent results as fallback values.
The core example requires the developer to execute a requested tool call and send its result back to the model. The LangGraph example expresses that workflow with chatbot and tool nodes. The speaker then inspects the graph produced by create_agent and shows that it matches the manually constructed example.
Deep Agents receives a request to rank share prices and write prices.md. It uses built-in planning and file-writing tools, with the result stored in its virtual file system. This is an API-backed AI agent tutorial; it does not demonstrate how to run models locally.