Video summary
Tools in LangGraph | Agentic AI using LangGraph | CampusX
Main summary
Key takeaways
Summary
The tutorial adds tool use to an existing LangGraph chatbot that already has a GUI, short-term memory, database persistence, and streaming. The goal is to let the bot handle ordinary conversation as well as take action when a request requires it.
Tools and workflow
The presenter demonstrates three tools:
- DuckDuckGo Search for current information from the internet.
- Calculator for numerical operations.
- Stock-price lookup using the Alpha Vantage API, which requires an API key.
Key LangGraph concepts include:
- ToolNode: A prebuilt node that receives tool calls and runs the appropriate tool.
- tools_condition: A prebuilt conditional edge that routes the graph either to the tools or to the end of the conversation.
- LLM-to-tool loop: After a tool runs, its result returns to the LLM. The LLM can then present a clearer answer, decide whether another tool is needed, or finish the response. This also enables multi-step tasks, such as looking up a company and then calculating a related cost.
Sending tool output directly to the user can expose raw data, such as JSON, and prevents the LLM from using one tool’s result to guide a later tool call. Returning tool results to the LLM addresses both issues.
Implementation and integration
The tutorial proceeds in two parts:
- Build a basic tool-enabled graph: Bind the tools to the LLM, create chat and tool nodes, and connect them with conditional routing and a return edge from the tool node to the chat node. The presenter also uses LangSmith traces to inspect the sequence of LLM and tool calls.
- Add tools to the existing chatbot: Create a new backend file containing the graph and tools, then point the existing Streamlit frontend to it. Filter the streaming output so only AI messages are displayed, rather than raw tool messages. An optional Streamlit status container can show which tool is running.
The demos include normal chat, arithmetic, web searches, stock lookups, and a multi-step request. The presenter notes that search results may not always be accurate. The video ends with an exercise: add a tool of your choice.
Speaker and sources
The sole presenter is Nitesh, as named in the subtitles, from CampusX. The tutorial references LangGraph, LangChain tools, OpenAI, DuckDuckGo Search, Alpha Vantage, Streamlit, and LangSmith.
Rate this summary
Your feedback will help improve summaries.
Improve this summary
Reprocess with a stronger model when the summary feels incomplete or inaccurate.
Translate summary in another language
Ask questions to this video
Chat for follow-up questions, clarifications, and source-backed answers.