๐๏ธ ๐ Concepts
Here is a quick overview of concepts that you will come across in this section of the lab:
๐๏ธ ๐ Define graph state
Let's start by defining the state of our agent's graph.
๐๏ธ ๐ Instantiate the LLM
Now let's instantiate the LLM that will serve as the "brain" of our agent, and give it access to the tools we defined previously.
๐๏ธ ๐ Define graph nodes
Let's define the nodes of our graph. Our agent will have two nodes- an agent node and a tool node.
๐๏ธ ๐ Define conditional edges
Edges in a LangGraph graph can be fixed or conditional. For conditional edges, we need a routing function to conditionally route the workflow to different nodes.
๐๏ธ ๐ Build and execute the graph
Now that we have defined the nodes and edges of the graph, let's put the graph together and execute it to ensure that our agent is working as expected.