LangGraph 101: it's better than LangChain

preview_player
Показать описание
LangGraph is a special LangChain-built library that builds intelligent AI Agents using graphs. Ie, agentic state machines. It allows us to build more powerful and flexible AI agents than what we can build using just the core library, LangChain.

In this video, we'll see how to build agents with LangGraph and OpenAI.

📌 Code:

🌲 Subscribe for Latest Articles and Videos:

👋🏼 AI Consulting:

👾 Discord:

#ai #langchain #artificialintelligence #nlp #chatbot #openai

00:00 Intro to LangGraph
00:52 Graphs in LangGraph
03:00 More Complex LangGraph Agent
08:12 LangGraph Graph State
14:00 LangGraph Agent Node
17:08 Forcing a Specific LLM Output
20:00 Building the Graph
23:23 Using our Agent Graph
28:32 LangGraph vs LangChain
Рекомендации по теме
Комментарии
Автор

Someone may correct me but I think LangGraph's potential resides mainly in the cyclical graphs. For instance for making, self-reflective agent. When making Directed acyclic graph (DAG) pipelines (like you did), it's better to use chains (Langchain).

WhylerGame
Автор

Hi James, thanks for the great content. I’m curious about why you went down the road of having the graph playing with the agent state and tools rather than just doing things directly in the langgraph nodes ? I’m seeing less and less examples from langchain using so called « agent » with langgraph and also tools, they only use it for Tavily because they have a langchain prebuilt tool, and i wonder what is your opinion on agents being soon obsolete ? And tools just used for built-in tools wrappers from langchain rather than custom tools

nelsonatp
Автор

my q now is: does it still make sense to learn (theory, modify existing apps, experiment with, write new apps with) langchain? or rather just ignore and just start w/ langgraph? from a beginner's perspective (no prior langchain exp). what's the recommendation and its justification?

themaxgo
Автор

Thanks for the video! This is my first exposure to LangGraph and it seems very useful. During your demo, why did the AI respond with a citation to the wikipedia page if it was supposed to be pulling from the simulated RAG? This part confused me, as I'd want to force it to only use data provided to it via RAG, etc.

jakeparker
Автор

Building an e-commerce chatbot. And getting output to obey a specific format has been a huge road block because of the exact issue you mentioned. The agent just sometimes decides it doesn’t need to invoke any output formatting tool even with explicit instructions.

Definitely trying this graph approach asap. Thanks!!!

tallerdenyooh
Автор

Great content, as always. Very random note: ive been to bali so many times (i work in tech in Singapore) and id recognise a bali villa door handle anywhere! 😂😂😂 Enjoy!

justinhall
Автор

i am really struggling to find a single example that doesn't use open ai function calling (llm.bind, convert_to_openai_ helper functions). can you PLEASE help me out. I specifically am looking for a single agent and multi agent architecture with detailed explanation on the state, interactions with runnables like chat history, geared towards RAG

imposternaruto
Автор

I agree Graphs are excellent choice for Agents and also good for the cost reduction policy. Langgraph is quite complex though. If you want to play with easier solution you can check autogen graph, it is (for now) more generic in use, at least for a fast prototyping.Thanks for this video.

maciejzieniewicz
Автор

We have this on 2x watchlist. Thanks for making this. Still getting our heads around graph vs chain.

getcoai
Автор

Thank you James! can we utilize LangChain for general abstractions and than only use LangGraph for Agents ? Id love to spar and contribute, is there a discord your active on ?

awakenwithoutcoffee
Автор

Learning this at udemy. Finished one chapter. Saw end to end. Liked langsmith. This is a good foundation of machine meaningful graph.

Ramkumar-ujfo
Автор

I have been patiently waiting for your video on langgaraph James. Thanks😊

kubasmide
Автор

Hi James, thanks for the content. I'm trying to use langgraph with Vertex AI with the Gemini-pro model. Do you have any suggestions on how to tackle this task? I'm trying to adapt the code you made.

victorsilva-jbsf
Автор

Thank you for being thorough with very simple and less simple examples. It made it easy to understand and allowed me to run with the knowledge. 💜

irkedoff
Автор

Thanks for the video! As a noob, I’m lost between whether I should learn langgraph or autogen or agency swarm. I learned to use autogen but it seems to lack the minimum control I need to build something reliable. To learn everything…takes to much time for me as I’m totally new to the computer language, and want to build something that I need rather than learning the basics for multiple libraries. Will langgraph the go-to library for the time being? What would you recommend for people like me?

lLvupKitchen
Автор

Thank you for the video. I have a question about how "query_agent_runnable" decide is an error message or not? What's the criteria of the decision?

stevechiou
Автор

This is very interesting. Is there a tool to reverse engineer this Agent solution ?

Can Nodes and Edges be mathematically defined like a enforced index for a DB?

Appreciate any feedback and Thank you for sharing.

SolidBuildersInc
Автор

Can you build an agent in langgraph that focuses on SQL queries to a Postgres database?

johnvicente
Автор

Can you use the OpenAI() API in LangGraph to specify Ollama models?

diegocalderon
Автор

Thank you! This is not simple or basic information; it is hugely valuable to us. Please keep posting more.

JoanApita