Langgraph with LangChain |Tutorial:106

Опубликовано: 08 Апрель 2026
на канале: Total Technology Zonne
374
6

GITHUB: https://github.com/ronidas39/LLMtutor...
TELEGRAM: https://t.me/ttyoutubediscussion
thank you king clauneck
Introduction

Hi everyone, this is Ronnie. Welcome back to Total Technology Zone. Today, we are diving into tutorial 106, focusing on integrating Langraph with Langchain. Before we get into the details, I want to apologize for not uploading videos for the past five days. I’ve been under the weather with a fever and still have some throat issues, but I’m pushing through to bring you this content. If my voice sounds different, that’s why.

First off, if you’re new here, please subscribe to the channel and check out our previous tutorials. This is number 106, so there’s plenty of content to catch up on. Sharing and subscribing helps the channel grow, and it motivates us to create more quality content. Don’t forget to hit the bell icon for notifications and join our Telegram channel for direct discussions.

Overview of Today's Tutorial

Today, we'll set up a simple Langraph with Langchain. Even though Langraph can be used independently, we’ll integrate it with Langchain to develop LLM-driven applications. Langraph, developed by the same team as Langchain, allows us to create graph-based workflows with nodes representing Python functions or agents.

Steps to Create Langraph Integration

1. *Import Necessary Modules:*
Begin by importing the required modules from Langraph and other necessary libraries.

2. *Define the Agent State Class:*
Create a class to manage the state, which holds messages passed between the user and agents.

3. *Create Nodes:*
Define nodes which can be Python functions or agents performing specific tasks. Each node will handle a specific part of the workflow.

4. *Set Entry Point and Compile Workflow:*
Set the initial node (entry point) of the workflow and compile it to make it executable.

5. *Create Function to Invoke Workflow:*
Write a function to handle user input and process it through the workflow. This function will pass the user input through the nodes and return the final response.

6. *Execute and Test:*
Test the setup with different inputs to see how the workflow processes them. Ensure that the workflow navigates through the nodes correctly based on the input.

Explanation

*Node Execution:* Nodes represent stages in the workflow. Each node performs a specific task, such as checking user input and determining the next step.
*State Management:* The `AgentState` class keeps track of messages exchanged during the workflow, ensuring that each step has access to the necessary information.
*Conditional Logic:* The workflow uses conditional logic to navigate between nodes based on the input provided. This allows for dynamic decision-making within the workflow.

Conclusion

This tutorial gives a basic understanding of integrating Langraph with Langchain. In upcoming tutorials, we’ll build more complex use cases and dive deeper into advanced functionalities. Your support by subscribing, liking, and sharing the videos is greatly appreciated and helps the channel grow.

Thank you for watching, and see you in the next video! Happy learning!