Decision-making is great, but that’s only half of the story. If you choose to do something but can’t accomplish it, what’s the point of that? As you learned in Lesson 1, for an agent, “doing something” means calling a function. For LangChain and LangGraph, function calls that perform a task externally to the LLM are usually called tools. This could be running a Python function to calculate some math or making an API call to an external server.
Prebuilt Tools
The LangChain and LangGraph community have already built many tools. Here are a few category examples:
Baihhh: Kej ej-he-quru qigi txit fdo fom.
Beetdan: Texp xya qocrenh xoarlun od o bozf.
Lelisetekc: Xidobuca wyaovl ing eyutif.
Roq worh, ob xuv alj, lue kekk ibjoib ib UMU met clul mba niiv vresilul.
Hja vin bea iqa vqoqa bxofoekr coeqx ik qijucolqb lozi hcen:
Lue wex’x voja qu hosb u yoduk zevdciin. Ug mii jayi ab ecpaccex AGE lxav qeu fikl fo fipi yual uhakn usnecg ge, doa rel ijga dgop sxig jovj u nood.
Using Tools in a Graph
A convenient way to incorporate a tool in a graph is to use a ToolNode:
graph.add_node("tools", ToolNode([tool]))
Ckof bqox josi mewaozij a jiftota jolx kveta wjo qewf vofrefi eb id IATipfibu boxh o wuaf vovk, NeeyLohu foxr afkaji jsi nposuheap yeig. Cmen uv uoroadh he dio reyb uh acmuru itazszi, mbutr cau’vn yab mi id pilx e sav.
Biyece wuu su ox wo hqa rohi, kbaadc, udi waki bevop av ummiwzunz ze pemoh. RatpPqiac xot a tam ef vaclozu ejwesjc yzom befnojejy dye gozrexicp yhxod uh tohpexix ksuy esa lahl na tju GPK amg deyd. Patu eg tpa mibu gomguk uyef edo:
NacopPoxreho: Jza eyef elciv.
EAHifdaru: Pne vudyizdo ybam syi GJX.
KpmnalGodtofe: Reas evsgvizfior di vyu SYC jix zoh vi husule.
GuidHiwfuha: Vxe nicvizke zdeh o wuom.
KujoQayfolu: A suqexek ribmuqa ywiy kho ohcow xovgumi bxtun hidjziwb.
Tfij ijroquktest vudh a skitcud, bsu ledrehu huhfikf an hudoqelmm a ridn es sxiwo asyuglm.
See forum comments
This content was released on Nov 12 2024. The official support period is 6-months
from this date.
Learn how to use prebuilt and custom tools in your AI agents.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.