title
LangGraph Crash Course with code examples

description
Colab 01. Learning LangGraph Agent Executor: https://drp.li/vL1J9 Colab 02. Learning LangGraph - Chat Executor: https://drp.li/HAz3o Colab 03. Learning LangGraph - Agent Supervisor: https://drp.li/xvEwd Interested in building LLM Agents? Fill out the form below Building LLM Agents Form: https://drp.li/dIMes Github: https://github.com/samwit/langchain-tutorials (updated) https://github.com/samwit/llm-tutorials Time Stamps: 00:00 Intro 00:19 What is LangGraph? 00:26 LangGraph Blog 01:38 StateGraph 02:16 Nodes 02:42 Edges 03:48 Compiling the Graph 05:23 Code Time 05:34 Agent with new create_open_ai 21:37 Chat Executor 27:00 Agent Supervisor

detail
{'title': 'LangGraph Crash Course with code examples', 'heatmap': [], 'summary': 'Introduces landgraph and its compatibility with langchain ecosystem, covers creating custom tools, agent workflow, random number process, tool transformation, chat model implementation, building agent supervisor, and setting up graph and agent supervision, providing comprehensive insights into their functionalities and applications.', 'chapters': [{'end': 439.773, 'segs': [{'end': 39.526, 'src': 'embed', 'start': 0.189, 'weight': 0, 'content': [{'end': 3.733, 'text': 'Okay So in this video, I want to have a look at LandGraph.', 'start': 0.189, 'duration': 3.544}, {'end': 8.016, 'text': "So I'm going to talk a little bit about what it is, and then I'll go through some coding examples of it.", 'start': 3.953, 'duration': 4.063}, {'end': 11.261, 'text': "So if you're interested in building LLM agents, you will want to learn this.", 'start': 8.318, 'duration': 2.943}, {'end': 18.708, 'text': 'And then maybe over the next few videos, we can look at going more in depth with building some different agents and some different use cases here.', 'start': 11.301, 'duration': 7.407}, {'end': 26.115, 'text': 'So first off, what actually is LangGraph? You can think of this as sort of the new way to run agents with Langchain.', 'start': 19.449, 'duration': 6.666}, {'end': 31.339, 'text': "So it's fully compatible with the Langchain ecosystem and, especially,", 'start': 26.695, 'duration': 4.644}, {'end': 37.224, 'text': 'can really make good use of the new sort of custom chains with the Langchain expression language.', 'start': 31.339, 'duration': 5.885}, {'end': 39.526, 'text': 'But this is built for running agents.', 'start': 37.564, 'duration': 1.962}], 'summary': 'Landgraph is a tool for building llm agents with langchain, compatible with the ecosystem and capable of utilizing custom chains with langchain expression language.', 'duration': 39.337, 'max_score': 0.189, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw189.jpg'}, {'end': 98.763, 'src': 'embed', 'start': 60.956, 'weight': 2, 'content': [{'end': 65.379, 'text': "So another way of thinking about this is it's like a giant state machine that you're building,", 'start': 60.956, 'duration': 4.423}, {'end': 71.165, 'text': 'where the graph is basically the state machine that decides okay, what state are you in now?', 'start': 65.379, 'duration': 5.786}, {'end': 77.11, 'text': 'What state will you go to run a particular chain or to run a particular tool, et cetera?', 'start': 71.565, 'duration': 5.545}, {'end': 79.032, 'text': 'And then how do you get back?', 'start': 77.451, 'duration': 1.581}, {'end': 85.798, 'text': 'And then also things like how do you know when to complete or end the graph or end the sequence in here?', 'start': 79.132, 'duration': 6.666}, {'end': 98.763, 'text': 'So Lang graph is built on these ideas of trying to make it easier for you to build custom agents and to build things that are more than just simple chains with Lang chain.', 'start': 86.158, 'duration': 12.605}], 'summary': 'Lang graph functions as a state machine for building custom agents, facilitating complex chains beyond simple sequences.', 'duration': 37.807, 'max_score': 60.956, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw60956.jpg'}, {'end': 149.72, 'src': 'embed', 'start': 103.105, 'weight': 1, 'content': [{'end': 110.168, 'text': "So this is where your state is being persisted in some way throughout the agent's life cycle.", 'start': 103.105, 'duration': 7.063}, {'end': 120.371, 'text': 'And you can think about this as a sort of way of passing the dictionary around from chain to chain or from chain to tool and stuff like that.', 'start': 110.588, 'duration': 9.783}, {'end': 126.552, 'text': 'And then being able to update certain things and you can update things where you can just overwrite them or you can add to them.', 'start': 120.731, 'duration': 5.821}, {'end': 131.553, 'text': "So if you've got a list of things like immediate steps, you can basically add to that,", 'start': 126.632, 'duration': 4.921}, {'end': 135.714, 'text': 'as the agent is actually going through running the various parts of the graph, et cetera.', 'start': 131.553, 'duration': 4.161}, {'end': 139.916, 'text': 'The next part, which is key to this is the whole idea of nodes.', 'start': 136.414, 'duration': 3.502}, {'end': 143.978, 'text': 'As you build the graph, you want to add nodes to the graph.', 'start': 140.516, 'duration': 3.462}, {'end': 149.72, 'text': "And you can think of these nodes as being like chains or actually they're also runnables.", 'start': 144.418, 'duration': 5.302}], 'summary': "State is persisted, updated, and nodes are added in the agent's life cycle.", 'duration': 46.615, 'max_score': 103.105, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw103105.jpg'}, {'end': 279.818, 'src': 'embed', 'start': 255.791, 'weight': 3, 'content': [{'end': 264.221, 'text': "Now I can see that there's going to be a lot of use for sort of making reusable agents that you would then wire together on a graph.", 'start': 255.791, 'duration': 8.43}, {'end': 269.166, 'text': 'So you might have lots of little pre-made things for using tools, that kind of thing.', 'start': 264.261, 'duration': 4.905}, {'end': 276.455, 'text': "And you could imagine also that you've got agents that use certain kinds of prompts based on the inputs that come before them.", 'start': 269.587, 'duration': 6.868}, {'end': 279.818, 'text': 'here. what i want to do now is go through some of the code.', 'start': 276.775, 'duration': 3.043}], 'summary': 'There will be a lot of use for making reusable agents to be wired together on a graph, with pre-made tools and prompts based on inputs.', 'duration': 24.027, 'max_score': 255.791, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw255791.jpg'}, {'end': 411.993, 'src': 'embed', 'start': 376.022, 'weight': 6, 'content': [{'end': 379.784, 'text': "So in this case, they're persisting the input, they're persisting a chat history.", 'start': 376.022, 'duration': 3.762}, {'end': 385.127, 'text': 'So this is more sort of traditional way of adding the memory and doing that kind of thing.', 'start': 380.304, 'duration': 4.823}, {'end': 391.529, 'text': "You'll see in the second notebook that we move to more just a list of messages going back,", 'start': 385.467, 'duration': 6.062}, {'end': 394.491, 'text': 'but this is using more of sort of a traditional way of having a chat history.', 'start': 391.529, 'duration': 2.962}, {'end': 397.594, 'text': 'And then having things like intermediate steps here.', 'start': 395.171, 'duration': 2.423}, {'end': 402.26, 'text': "And you'll see that some of these things can be basically overwritten.", 'start': 398.235, 'duration': 4.025}, {'end': 411.993, 'text': 'So this agent outcome gives us the outcome from something that the agent did, or gives us this agent finish of when the actual agent should finish.', 'start': 402.361, 'duration': 9.632}], 'summary': 'The chat system persists input and chat history in a traditional way, with some data being overwritten.', 'duration': 35.971, 'max_score': 376.022, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw376022.jpg'}], 'start': 0.189, 'title': 'Landgraph and langchain agent graph', 'summary': 'Introduces landgraph, emphasizing its compatibility with the langchain ecosystem and its role in building custom agents and state machines. it also discusses the concept of nodes and edges in the langchain agent graph, including their role in wiring components together and allowing conditional transitions, and the ability to compile the graph for running the state of the agent, with potential applications for creating reusable agents and using different models for function calling.', 'chapters': [{'end': 126.552, 'start': 0.189, 'title': 'Introduction to landgraph', 'summary': 'Introduces landgraph as a new way to run agents with langchain, emphasizing its compatibility with the langchain ecosystem and its role in building custom agents and state machines.', 'duration': 126.363, 'highlights': ['LandGraph is a new way to run agents with LangChain, compatible with the LangChain ecosystem and designed to make it easier to build custom agents and state machines.', "It allows nodes to make decisions about which node to go to next, resembling a giant state machine, and includes the concept of a state graph for persisting state throughout the agent's life cycle.", 'The chapter also mentions the potential for more in-depth exploration of building different agents and use cases with LandGraph.']}, {'end': 439.773, 'start': 126.632, 'title': 'Langchain agent graph', 'summary': 'Discusses the concept of nodes and edges in the langchain agent graph, including their role in wiring components together and allowing conditional transitions, and the ability to compile the graph for running the state of the agent, with potential applications for creating reusable agents and using different models for function calling.', 'duration': 313.141, 'highlights': ['The Langchain agent graph involves adding nodes and setting up edges to wire components together, along with conditional edges for transitions, providing flexibility in deciding the next node to go to, and compiling the graph to run the state of the agent (Frequency: 6)', 'Potential applications include creating reusable agents and using different models like OpenAI and Gemini for function calling to make decisions and support various personas (Frequency: 3)', 'The state of the agent involves persisting inputs, chat history, and intermediate steps, with the ability to override certain values like agent outcome and agent finish, while also considering traditional and alternative ways of managing chat history (Frequency: 2)', "The chapter explores examples of Langchain agent executor and discusses the process of setting the state, including persisting key information throughout the agent's execution (Frequency: 1)"]}], 'duration': 439.584, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw189.jpg', 'highlights': ['LandGraph is compatible with LangChain ecosystem, designed for custom agents and state machines.', 'Langchain agent graph involves adding nodes, setting up edges, and conditional transitions.', 'LandGraph allows nodes to make decisions, resembling a giant state machine.', 'Potential applications include creating reusable agents and using different models for function calling.', "State graph in LandGraph persists state throughout the agent's life cycle.", 'Langchain agent graph compiles for running the state of the agent.', 'The state of the agent involves persisting inputs, chat history, and intermediate steps.', 'Traditional and alternative ways of managing chat history are considered.', 'LandGraph explores building different agents and use cases.']}, {'end': 1022.865, 'segs': [{'end': 470.437, 'src': 'embed', 'start': 440.313, 'weight': 0, 'content': [{'end': 443.596, 'text': 'All right, now what I wanted to do is set up some custom tools in here.', 'start': 440.313, 'duration': 3.283}, {'end': 445.898, 'text': 'Many of you have seen custom tools before.', 'start': 443.896, 'duration': 2.002}, {'end': 448.3, 'text': 'I did some videos about it a long time back.', 'start': 445.958, 'duration': 2.342}, {'end': 452.504, 'text': 'I probably should have done some more videos updating things in Langchain for it.', 'start': 448.741, 'duration': 3.763}, {'end': 459.43, 'text': 'But if you think custom tools, you can basically pick a bunch of pre-made tools from Langchain, and there are a lot of those already.', 'start': 452.604, 'duration': 6.826}, {'end': 461.652, 'text': 'But you can also do custom tools.', 'start': 459.891, 'duration': 1.761}, {'end': 465.336, 'text': "So here I've made two sort of silly little custom tools.", 'start': 461.752, 'duration': 3.584}, {'end': 470.437, 'text': 'And one is basically just going to give us a random number between 0 and 100.', 'start': 465.936, 'duration': 4.501}], 'summary': 'Setting up custom tools in langchain to generate random numbers.', 'duration': 30.124, 'max_score': 440.313, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw440313.jpg'}, {'end': 585.245, 'src': 'embed', 'start': 550.405, 'weight': 1, 'content': [{'end': 556.23, 'text': 'is you know what I think going on, rather than getting this long Jason back of a search or something like that?', 'start': 550.405, 'duration': 5.825}, {'end': 561.233, 'text': "All right, next up, we've basically got the way of making an agent.", 'start': 556.65, 'duration': 4.583}, {'end': 564.275, 'text': 'Now, remember, a graph can have multiple agents.', 'start': 561.293, 'duration': 2.982}, {'end': 567.797, 'text': 'It can have multiple parts of agents, can have multiple chains in there.', 'start': 564.435, 'duration': 3.362}, {'end': 575.862, 'text': 'In this case, this is the sort of agent, the standard sort of agent, which basically uses OpenAI functions.', 'start': 567.957, 'duration': 7.905}, {'end': 578.644, 'text': 'right?. You can think of it as an OpenAI functions agent here.', 'start': 575.862, 'duration': 2.782}, {'end': 581.805, 'text': "So here we're basically pulling in a prompt.", 'start': 579.284, 'duration': 2.521}, {'end': 585.245, 'text': "This is, they had originally where they're pulling in the prompt from the hub.", 'start': 582.105, 'duration': 3.14}], 'summary': 'Discussion on creating multiple agents using openai functions.', 'duration': 34.84, 'max_score': 550.405, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw550405.jpg'}, {'end': 888.297, 'src': 'embed', 'start': 858.634, 'weight': 2, 'content': [{'end': 865.941, 'text': "So first off, we've got our workflow, which is going to be the state graph, and we're passing in that agent state that we defined earlier on.", 'start': 858.634, 'duration': 7.307}, {'end': 871.506, 'text': "We're then going to add a node for agent, and that's going to be running the agent there.", 'start': 866.501, 'duration': 5.005}, {'end': 877.87, 'text': "We're going to add a node for action and we could have called this actually tools, right? Tool action or something like that.", 'start': 871.986, 'duration': 5.884}, {'end': 888.297, 'text': "This is going to be that the function that we've got here for actually running the tool and getting the response back and sticking it back on immediate steps like that.", 'start': 878.17, 'duration': 10.127}], 'summary': 'Workflow involves state graph with agent, action, and tool nodes.', 'duration': 29.663, 'max_score': 858.634, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw858634.jpg'}], 'start': 440.313, 'title': 'Langchain custom tools and agent workflow', 'summary': 'Covers creating custom tools in langchain and agent tool execution workflow, demonstrating two simple custom tools, creating agents using openai functions, and detailing the workflow for executing agent actions and tools, including passing inputs, determining tool selection, agent and tool execution, conditional edges, and graph compilation.', 'chapters': [{'end': 636.368, 'start': 440.313, 'title': 'Custom tools and creating agents in langchain', 'summary': 'Discusses creating custom tools in langchain, showcasing two simple custom tools and the process of creating an agent using openai functions, with the ability to have multiple agents and parts.', 'duration': 196.055, 'highlights': ['The chapter explains the process of creating custom tools in Langchain, demonstrating two simple custom tools for generating a random number and converting input to lowercase, providing an overview of using the tool decorator and running the tools.', 'It details the creation of an agent using OpenAI functions, highlighting the setup of the prompt with placeholders for chat history, human message, and agent scratch pad, along with the process of creating an agent runnable with LLM, tools, and the prompt.', 'The discussion also mentions the capability of a graph to have multiple agents and parts, showcasing the standard agent that utilizes OpenAI functions and the retrieval of the prompt from the hub.']}, {'end': 1022.865, 'start': 637.449, 'title': 'Agent tool execution workflow', 'summary': 'Describes the workflow for executing agent actions and tools, including passing inputs, determining tool selection, agent and tool execution, conditional edges, and graph compilation.', 'duration': 385.416, 'highlights': ['The chapter covers passing inputs in a dictionary to execute agent actions and tools.', 'It explains the process of determining tool selection based on the input and returning an agent action message log response.', 'The workflow includes executing the agent and tools, adding conditional edges for deciding to continue or end, and compiling the graph for the workflow.']}], 'duration': 582.552, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw440313.jpg', 'highlights': ['The chapter covers creating custom tools in Langchain and agent tool execution workflow', 'It details the creation of an agent using OpenAI functions and the setup of the prompt', 'The workflow includes executing the agent and tools, adding conditional edges, and compiling the graph', 'The chapter explains the process of creating custom tools in Langchain, demonstrating two simple custom tools', 'The discussion also mentions the capability of a graph to have multiple agents and parts']}, {'end': 1237.634, 'segs': [{'end': 1067.122, 'src': 'embed', 'start': 1023.886, 'weight': 0, 'content': [{'end': 1031.636, 'text': "but i'm going to pass in the input, basically saying give me a random number and then write in words should be right in words, but anyway,", 'start': 1023.886, 'duration': 7.75}, {'end': 1034.66, 'text': 'write it in words and make it lowercase.', 'start': 1031.636, 'duration': 3.024}, {'end': 1036.402, 'text': "so you'll see that all right.", 'start': 1034.66, 'duration': 1.742}, {'end': 1037.723, 'text': 'what happens here?', 'start': 1036.402, 'duration': 1.321}, {'end': 1042.468, 'text': 'so we start off and it decides ah, okay, i need a tool right.', 'start': 1037.723, 'duration': 4.745}, {'end': 1048.792, 'text': "so its tool is going to be random number and in this case it's putting the input being random number.", 'start': 1042.468, 'duration': 6.324}, {'end': 1050.714, 'text': 'it then gets that response back.', 'start': 1048.792, 'duration': 1.922}, {'end': 1054.756, 'text': "now i've printed this so that it basically sends that to the tool right.", 'start': 1050.714, 'duration': 4.042}, {'end': 1060.18, 'text': "so you see, each of these is where we're going, from one node to the next node that we're printing out here.", 'start': 1054.756, 'duration': 5.424}, {'end': 1067.122, 'text': 'So we go from this agent, run node, the outcome being that okay, I need to run a tool coming back.', 'start': 1060.64, 'duration': 6.482}], 'summary': 'Pass input for random number, convert to lowercase, and print response.', 'duration': 43.236, 'max_score': 1023.886, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw1023886.jpg'}, {'end': 1194.459, 'src': 'embed', 'start': 1113.692, 'weight': 1, 'content': [{'end': 1114.092, 'text': 'Yes, here.', 'start': 1113.692, 'duration': 0.4}, {'end': 1117.255, 'text': "We're going to see the tool result is four in lower case there.", 'start': 1114.112, 'duration': 3.143}, {'end': 1118.836, 'text': 'So again, this is a tool.', 'start': 1117.575, 'duration': 1.261}, {'end': 1120.478, 'text': 'This is the straight up agent.', 'start': 1119.057, 'duration': 1.421}, {'end': 1121.379, 'text': 'This is the tool.', 'start': 1120.538, 'duration': 0.841}, {'end': 1123.1, 'text': 'This is the initial agent.', 'start': 1121.659, 'duration': 1.441}, {'end': 1124.201, 'text': 'Again, this is the tool.', 'start': 1123.14, 'duration': 1.061}, {'end': 1126.784, 'text': 'And then, then finally we go back to the agent again.', 'start': 1124.502, 'duration': 2.282}, {'end': 1130.767, 'text': 'And now it says, okay, now I can do agent finish.', 'start': 1127.484, 'duration': 3.283}, {'end': 1134.33, 'text': "Because I've done everything that I was asked to do in there.", 'start': 1131.408, 'duration': 2.922}, {'end': 1135.771, 'text': "I've got the random number.", 'start': 1134.45, 'duration': 1.321}, {'end': 1137.171, 'text': "I've got it in words.", 'start': 1135.951, 'duration': 1.22}, {'end': 1139.072, 'text': "I've got it in lowercase here.", 'start': 1137.412, 'duration': 1.66}, {'end': 1143.855, 'text': 'So we can see that the output here is the random number is four.', 'start': 1139.153, 'duration': 4.702}, {'end': 1148.138, 'text': 'And when written in words and converted to lowercase, it is four.', 'start': 1144.035, 'duration': 4.103}, {'end': 1151.339, 'text': "right. so it's a bit of a silly sort of task to do it,", 'start': 1148.778, 'duration': 2.561}, {'end': 1157.081, 'text': "but it shows you how it's breaking it down and we can see if we look at the intermediate steps that we're getting out there.", 'start': 1151.339, 'duration': 5.742}, {'end': 1160.362, 'text': "we've got the steps for each of the different things going along.", 'start': 1157.081, 'duration': 3.281}, {'end': 1163.57, 'text': "we've got the message log and stuff as we're going through this All right.", 'start': 1160.362, 'duration': 3.208}, {'end': 1166.432, 'text': 'If we wanted to do it without streaming it, we could do it like this.', 'start': 1163.73, 'duration': 2.702}, {'end': 1169.934, 'text': "If I just say invoke, I'm not going to see each agent broken out.", 'start': 1166.512, 'duration': 3.422}, {'end': 1170.915, 'text': "I'm just going to see.", 'start': 1170.054, 'duration': 0.861}, {'end': 1175.517, 'text': "okay, the first off it's going to pick the random number tool.", 'start': 1170.915, 'duration': 4.602}, {'end': 1182.962, 'text': 'get 60, takes that as a word in uppercase, puts it into the lowercase tool and we get the result in here.', 'start': 1175.517, 'duration': 7.445}, {'end': 1186.835, 'text': "Now I've saved the output to output in this case.", 'start': 1183.533, 'duration': 3.302}, {'end': 1189.276, 'text': 'So remember these are print statements that I put in there.', 'start': 1186.855, 'duration': 2.421}, {'end': 1191.218, 'text': "That's why we're seeing this come along.", 'start': 1189.316, 'duration': 1.902}, {'end': 1194.459, 'text': "And then we've got this agent, get agent outcome.", 'start': 1191.658, 'duration': 2.801}], 'summary': 'The tool result is four in lowercase, with a random number and its words converted to lowercase.', 'duration': 80.767, 'max_score': 1113.692, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw1113692.jpg'}], 'start': 1023.886, 'title': 'Agent node random number process', 'summary': 'Discusses the process of generating a random number, converting it to words, and transforming it to lowercase, with a random number of 4 being used as an example. it also explores using specific tools and agents to convert a given number to lowercase, demonstrating step-by-step execution and the ability to view intermediate steps and outcomes, with an example of manipulating the number 60 through various tools and obtaining the final result in lowercase.', 'chapters': [{'end': 1092.033, 'start': 1023.886, 'title': 'Agent node random number process', 'summary': 'Discusses the process of generating a random number, converting it to words, and transforming it to lowercase, with a random number of 4 being used as an example.', 'duration': 68.147, 'highlights': ['The process involves passing an input to generate a random number, converting it to words, and making it lowercase.', 'The generated random number is 4.', 'The response is passed back to the original agent node.']}, {'end': 1157.081, 'start': 1092.534, 'title': 'Working with tools and agents', 'summary': 'Discusses the process of converting a given number to lowercase using a specific tool and agent, demonstrating the breakdown of steps and the intermediate outputs.', 'duration': 64.547, 'highlights': ['The process involves converting a given number to lowercase using a specific tool and agent, demonstrating the breakdown of steps and the intermediate outputs.', "The output showcases the random number 'four' being converted to lowercase, resulting in the output 'four'.", 'The chapter illustrates the step-by-step process of utilizing the tool and agent to accomplish the task, showcasing the intermediary outputs and the final result.']}, {'end': 1237.634, 'start': 1157.081, 'title': 'Agent outcome and intermediate steps', 'summary': 'Covers the process of using agents to manipulate data, demonstrating the step-by-step execution of a task, and the ability to view intermediate steps and outcomes, with an example of manipulating the number 60 through various tools and obtaining the final result in lowercase.', 'duration': 80.553, 'highlights': ['Demonstration of manipulating the number 60 through various tools and obtaining the final result in lowercase, showcasing the step-by-step execution of a task.', 'Explanation of the ability to view intermediate steps and outcomes, providing insight into the process of using agents to manipulate data.', 'Example showcasing the scenario where no tools are needed, and the agent returns a response without intermediate steps, illustrating a different type of call execution.']}], 'duration': 213.748, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw1023886.jpg', 'highlights': ['The process involves passing an input to generate a random number, converting it to words, and making it lowercase.', 'The chapter illustrates the step-by-step process of utilizing the tool and agent to accomplish the task, showcasing the intermediary outputs and the final result.', 'Demonstration of manipulating the number 60 through various tools and obtaining the final result in lowercase, showcasing the step-by-step execution of a task.', 'The response is passed back to the original agent node.', "The output showcases the random number 'four' being converted to lowercase, resulting in the output 'four'.", 'Explanation of the ability to view intermediate steps and outcomes, providing insight into the process of using agents to manipulate data.', 'Example showcasing the scenario where no tools are needed, and the agent returns a response without intermediate steps, illustrating a different type of call execution.', 'The generated random number is 4.']}, {'end': 1620.462, 'segs': [{'end': 1328.078, 'src': 'embed', 'start': 1257.222, 'weight': 0, 'content': [{'end': 1261.386, 'text': "And we can see that, okay, it's going to come back that the input is four in capital letters.", 'start': 1257.222, 'duration': 4.164}, {'end': 1263.628, 'text': "We'll go into the tool lowercase.", 'start': 1262.007, 'duration': 1.621}, {'end': 1268.373, 'text': 'Yeah, this is going to transform it to just deliver back four in lowercase.', 'start': 1264.069, 'duration': 4.304}, {'end': 1271.175, 'text': "And then finally, we're going to pass that in.", 'start': 1268.853, 'duration': 2.322}, {'end': 1277.922, 'text': "If we look at here, we're passing all of that in with the string of, okay, what we've actually done in here as well.", 'start': 1271.415, 'duration': 6.507}, {'end': 1282.587, 'text': 'And now it can say, okay, the output is going to be the random number is four.', 'start': 1278.562, 'duration': 4.025}, {'end': 1288.834, 'text': "And when written in words, it's converted to lowercase four, right? And you can see the type that we got back was agent finish.", 'start': 1282.667, 'duration': 6.167}, {'end': 1292.858, 'text': "So that's what tells it not to continue as we go through this.", 'start': 1289.414, 'duration': 3.444}, {'end': 1296.5, 'text': "All right, let's jump in and have a look at the second example.", 'start': 1293.439, 'duration': 3.061}, {'end': 1300.341, 'text': 'So the second example in here is very similar.', 'start': 1297.14, 'duration': 3.201}, {'end': 1310.663, 'text': "The big difference here is it's using a chat model and it's using a list of messages rather than this sort of chat history that we had before.", 'start': 1300.921, 'duration': 9.742}, {'end': 1312.104, 'text': "So we've got the tools here.", 'start': 1310.723, 'duration': 1.381}, {'end': 1321.192, 'text': "Now, one of the things with doing it this way is that we're not using the create open AI functions agent here.", 'start': 1312.944, 'duration': 8.248}, {'end': 1328.078, 'text': 'So we are using an open AI model, but we need to basically bind the functions to the model.', 'start': 1321.612, 'duration': 6.466}], 'summary': "Demonstrating the transformation of 'four' to lowercase and using a chat model for a list of messages.", 'duration': 70.856, 'max_score': 1257.222, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw1257222.jpg'}, {'end': 1498.778, 'src': 'embed', 'start': 1472.867, 'weight': 5, 'content': [{'end': 1478.69, 'text': "We've got one node being the initial sort of agent and one node being the tool or the action that gets called.", 'start': 1472.867, 'duration': 5.823}, {'end': 1481.731, 'text': 'Here we set the entry point to agent again.', 'start': 1479.23, 'duration': 2.501}, {'end': 1486.313, 'text': "We've got our conditional the same as we had before as we go through this.", 'start': 1482.231, 'duration': 4.082}, {'end': 1493.477, 'text': "So we've got a conditional edge and we've also got a hardwired edge being that always from action, we always go back to agent.", 'start': 1486.814, 'duration': 6.663}, {'end': 1496.938, 'text': 'in this case, compile it and then now we can just run it.', 'start': 1493.937, 'duration': 3.001}, {'end': 1498.778, 'text': 'so you can see here that we can.', 'start': 1496.938, 'duration': 1.84}], 'summary': 'Transcript describes nodes, conditional edge, and hardwired edge in the process flow.', 'duration': 25.911, 'max_score': 1472.867, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw1472867.jpg'}, {'end': 1540.895, 'src': 'embed', 'start': 1511.361, 'weight': 1, 'content': [{'end': 1514.462, 'text': "but you're going to find that in some ways this can be.", 'start': 1511.361, 'duration': 3.101}, {'end': 1521.564, 'text': "this allows you to do a lot more things in here, in that if we were to come in here, you see how we're popping off the last message.", 'start': 1514.462, 'duration': 7.102}, {'end': 1526.106, 'text': "when we come in here, We're also able to basically summarize messages.", 'start': 1521.564, 'duration': 4.542}, {'end': 1527.907, 'text': "We're able to play with the messages.", 'start': 1526.166, 'duration': 1.741}, {'end': 1533.33, 'text': "We're able to limit it so that we've only got the last 10 messages in memory,", 'start': 1527.947, 'duration': 5.383}, {'end': 1537.333, 'text': "so that we're not making our calls 35 messages long or something like that.", 'start': 1533.33, 'duration': 4.003}, {'end': 1540.895, 'text': 'Even with the GBD4 Turbo we can go really long,', 'start': 1537.733, 'duration': 3.162}], 'summary': 'Ability to summarize and limit messages, improving efficiency.', 'duration': 29.534, 'max_score': 1511.361, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw1511361.jpg'}], 'start': 1238.295, 'title': 'Agent tool transformation and chat model implementation', 'summary': "Covers the process of transforming a random number using an agent tool resulting in the output 'four' converted to lowercase. it also discusses implementing a chat model with a list of messages to bind functions to an open ai model, enabling the system to handle conversations and persist them with flexibility and cost-effectiveness.", 'chapters': [{'end': 1300.341, 'start': 1238.295, 'title': 'Agent tool transformation', 'summary': "Discussed the process of transforming a random number using an agent tool, resulting in the output 'four' converted to lowercase, with the type of result being 'agent finish'.", 'duration': 62.046, 'highlights': ["The process involved receiving a random number, transforming it to lowercase, and passing it back, resulting in the output 'four' converted to lowercase.", "The type of result obtained was 'agent finish'.", 'The chapter emphasized the usage of an agent tool to transform the input.']}, {'end': 1620.462, 'start': 1300.921, 'title': 'Implementing chat model with list of messages', 'summary': 'Discusses using a chat model and a list of messages to bind functions to an open ai model, allowing it to handle tool calls and return responses, ultimately enabling the system to handle conversations and persist them, while offering flexibility and cost-effectiveness.', 'duration': 319.541, 'highlights': ['The system uses a chat model and a list of messages to bind functions to an open AI model, allowing it to handle tool calls and return responses.', 'The approach enables the system to persist conversations through a list of messages, offering flexibility and cost-effectiveness by limiting calls and tokens usage.', 'The system can handle both using and not using tools, with each interaction generating a list of messages to persist the conversation.']}], 'duration': 382.167, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw1238295.jpg', 'highlights': ['The system uses a chat model and a list of messages to bind functions to an open AI model, allowing it to handle tool calls and return responses.', 'The approach enables the system to persist conversations through a list of messages, offering flexibility and cost-effectiveness by limiting calls and tokens usage.', 'The system can handle both using and not using tools, with each interaction generating a list of messages to persist the conversation.', "The process involved receiving a random number, transforming it to lowercase, and passing it back, resulting in the output 'four' converted to lowercase.", "The type of result obtained was 'agent finish'.", 'The chapter emphasized the usage of an agent tool to transform the input.']}, {'end': 1971.428, 'segs': [{'end': 1648.26, 'src': 'embed', 'start': 1620.979, 'weight': 0, 'content': [{'end': 1627.204, 'text': "Okay, in this third notebook, we're going to look at the idea of building a sort of agent supervisor.", 'start': 1620.979, 'duration': 6.225}, {'end': 1631.367, 'text': "So where you've got it, so that the user is going to pass something in.", 'start': 1627.264, 'duration': 4.103}, {'end': 1636.171, 'text': 'the supervisor is then going to decide okay, which agent do I actually route this to?', 'start': 1631.367, 'duration': 4.804}, {'end': 1638.813, 'text': "And then it's going to get the responses back.", 'start': 1636.671, 'duration': 2.142}, {'end': 1641.375, 'text': 'And some of these agents can be tools.', 'start': 1639.273, 'duration': 2.102}, {'end': 1648.26, 'text': 'Some of them can be just other agents that actually are not using a tool, but are using a large language model, et cetera.', 'start': 1641.595, 'duration': 6.665}], 'summary': 'Building an agent supervisor to route user input to different agents and tools.', 'duration': 27.281, 'max_score': 1620.979, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw1620979.jpg'}, {'end': 1746.878, 'src': 'embed', 'start': 1718.231, 'weight': 1, 'content': [{'end': 1724.156, 'text': 'So this is just a way to sort of instantiate multiple agents based on their prompts and stuff like that.', 'start': 1718.231, 'duration': 5.925}, {'end': 1728.66, 'text': 'So the second helper function here is this basically this agent node,', 'start': 1724.736, 'duration': 3.924}, {'end': 1736.046, 'text': 'which is for converting what we got here creating the agent into an actual agent node so that it can be run in here.', 'start': 1728.66, 'duration': 7.386}, {'end': 1741.312, 'text': "It's also got a thing where it's going to take the message and convert it to being a human message.", 'start': 1736.206, 'duration': 5.106}, {'end': 1746.878, 'text': "Because we've got multiple agents which are going to be LLM responses and stuff.", 'start': 1741.392, 'duration': 5.486}], 'summary': 'Creating multiple agents for llm responses and converting messages to human messages.', 'duration': 28.647, 'max_score': 1718.231, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw1718231.jpg'}, {'end': 1813.904, 'src': 'embed', 'start': 1787.062, 'weight': 3, 'content': [{'end': 1790.805, 'text': 'So we can see here that this supervisor has got a very sort of unique prompt, right?', 'start': 1787.062, 'duration': 3.743}, {'end': 1796.229, 'text': "It's basically that you're a supervisor tasked with managing conversation between the following workers", 'start': 1790.845, 'duration': 5.384}, {'end': 1798.631, 'text': "And then we're passing in that members.", 'start': 1796.829, 'duration': 1.802}, {'end': 1802.054, 'text': 'So the members is this lotto manager and coder.', 'start': 1798.711, 'duration': 3.343}, {'end': 1807.819, 'text': 'Given the following user request, respond with a worker to act next.', 'start': 1802.514, 'duration': 5.305}, {'end': 1811.682, 'text': 'So each worker will perform a task and respond with their results and status.', 'start': 1807.839, 'duration': 3.843}, {'end': 1813.904, 'text': 'When finished, respond with finish.', 'start': 1812.082, 'duration': 1.822}], 'summary': 'Supervisor manages conversation between lotto manager and coder, responding to user requests and tracking worker tasks.', 'duration': 26.842, 'max_score': 1787.062, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw1787062.jpg'}, {'end': 1942.713, 'src': 'embed', 'start': 1914.601, 'weight': 4, 'content': [{'end': 1918.522, 'text': 'And then the prompt for this is you are a senior lotto manager.', 'start': 1914.601, 'duration': 3.921}, {'end': 1924.083, 'text': "You run the lotto and get random numbers, right? It's telling it that, hey, this is the agent to do that.", 'start': 1918.602, 'duration': 5.481}, {'end': 1927.524, 'text': "It's then going to have to basically use the tools to do that.", 'start': 1924.623, 'duration': 2.901}, {'end': 1929.245, 'text': "So that's the lotto agent.", 'start': 1928.024, 'duration': 1.221}, {'end': 1931.987, 'text': 'And then the second agent is this coder agent.', 'start': 1929.345, 'duration': 2.642}, {'end': 1935.009, 'text': 'So this coder agent is just using the tool.', 'start': 1932.087, 'duration': 2.922}, {'end': 1937.55, 'text': 'So I passed in all the tools in here for tools, by the way.', 'start': 1935.029, 'duration': 2.521}, {'end': 1942.713, 'text': 'And this particular agent is just going to use the Python REPL tool.', 'start': 1938.111, 'duration': 4.602}], 'summary': 'A senior lotto manager uses two agents, one for lotto and the other for coding with python repl tool.', 'duration': 28.112, 'max_score': 1914.601, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw1914601.jpg'}], 'start': 1620.979, 'title': 'Building agent supervisor and supervisor delegation ai setup', 'summary': "Discusses building an agent supervisor to route user inputs to different agents, including tools and language models like gpt-4, and creating agent nodes and a supervisor to handle multiple agent personalities and responses. it also covers a supervisor's unique prompt to manage conversation between lotto manager and coder workers, using openai function for delegation and creating a graph with gpt-4 turbo model and python repl tool.", 'chapters': [{'end': 1786.722, 'start': 1620.979, 'title': 'Building agent supervisor', 'summary': 'Discusses building an agent supervisor to route user inputs to different agents, including tools and language models like gpt-4, and creating agent nodes and a supervisor to handle multiple agent personalities and responses.', 'duration': 165.743, 'highlights': ['Creating agent supervisor to route user inputs to different agents, including tools and language models like GPT-4, and creating agent nodes and a supervisor for multiple agent personalities and responses', 'Introduction of the idea of building a sort of agent supervisor which can route user inputs to different agents', 'Setting up Langsmith and bringing in the model GPT-4, along with custom tools like lowercase and random number, and the Python REPL tool', 'Explanation of helper utilities for making a general agent, passing in llm, tools, and system prompt to assemble messages and create an open AI tools agent', 'Introduction of a helper function for converting the agent into an actual agent node and handling LLM responses to convert them into human responses', 'Creating agent supervisor to determine multiple agent personalities such as lotto manager and coder to handle specific tasks like generating lotto numbers and making a plot']}, {'end': 1971.428, 'start': 1787.062, 'title': 'Supervisor delegation ai setup', 'summary': "Discusses a supervisor's unique prompt to manage conversation between lotto manager and coder workers, using openai function for delegation and creating a graph with gpt-4 turbo model and python repl tool.", 'duration': 184.366, 'highlights': ['The supervisor is tasked with managing conversation between lotto manager and coder workers using an OpenAI function for delegation.', 'The chapter discusses creating a graph with GPT-4 turbo model and Python REPL tool for the lotto manager and coder workers.', 'Accidentally passing the Python REPL tool into multiple agents is noted as not ideal for limiting the number of tools passed into something.']}], 'duration': 350.449, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw1620979.jpg', 'highlights': ['Creating agent supervisor to route user inputs to different agents, including tools and language models like GPT-4, and creating agent nodes and a supervisor for multiple agent personalities and responses', 'Introduction of a helper function for converting the agent into an actual agent node and handling LLM responses to convert them into human responses', 'Introduction of the idea of building a sort of agent supervisor which can route user inputs to different agents', 'The supervisor is tasked with managing conversation between lotto manager and coder workers using an OpenAI function for delegation', 'Creating agent supervisor to determine multiple agent personalities such as lotto manager and coder to handle specific tasks like generating lotto numbers and making a plot']}, {'end': 2340.259, 'segs': [{'end': 2057.591, 'src': 'embed', 'start': 1972.008, 'weight': 0, 'content': [{'end': 1976.33, 'text': "But anyway, we've got those and then we've got this basically setting up the node here.", 'start': 1972.008, 'duration': 4.322}, {'end': 1978.392, 'text': "and so we've got our lotto node.", 'start': 1976.77, 'duration': 1.622}, {'end': 1980.154, 'text': "we've got our code node.", 'start': 1978.392, 'duration': 1.762}, {'end': 1984.499, 'text': 'we can then basically pass these in as we go through this.', 'start': 1980.154, 'duration': 4.345}, {'end': 1985.72, 'text': 'we need some edges.', 'start': 1984.499, 'duration': 1.221}, {'end': 1994.73, 'text': "so the edges we've actually got a lot more edges because we've got a lot more nodes now and you can see that they're just using a for loop to make these edges.", 'start': 1985.72, 'duration': 9.01}, {'end': 2004.518, 'text': "so from every agent or persona, whether it's the lotto manager, whether it's the coder, always goes back to the supervisor.", 'start': 1994.73, 'duration': 9.788}, {'end': 2009.081, 'text': "so even if we had 10 different agents because here we've got two,", 'start': 2004.518, 'duration': 4.563}, {'end': 2018.408, 'text': "being lotto manager and coder it will go back to the supervisor at the end of that and then we've got conditional ones where it will just determine.", 'start': 2009.081, 'duration': 9.327}, {'end': 2025.612, 'text': 'this is sort of setting up a conditional map for the conditional edge of being the supervisor going to what.', 'start': 2018.408, 'duration': 7.204}, {'end': 2032.636, 'text': "So this conditional map, in fact, maybe in the future example, I will just hard code this out so people can sort of see what's going on here.", 'start': 2025.853, 'duration': 6.783}, {'end': 2035.577, 'text': "But basically, it's just making a dictionary in here.", 'start': 2033.096, 'duration': 2.481}, {'end': 2041.581, 'text': "It's adding in the finish node in there as well that it can basically use as a condition.", 'start': 2036.158, 'duration': 5.423}, {'end': 2048.364, 'text': 'And we can see that we can go from supervisor to any of those on the conditional map which is going to be our members,', 'start': 2042.021, 'duration': 6.343}, {'end': 2049.804, 'text': "and it's going to be finish in there.", 'start': 2048.364, 'duration': 1.44}, {'end': 2052.266, 'text': 'Finally, we set up the entry point.', 'start': 2050.364, 'duration': 1.902}, {'end': 2057.591, 'text': 'So the entry point is going to be the supervisor, compile our graph, and then we can use the graph.', 'start': 2052.286, 'duration': 5.305}], 'summary': 'Setting up nodes and edges for a graph with conditional map and entry point', 'duration': 85.583, 'max_score': 1972.008, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw1972008.jpg'}, {'end': 2230.005, 'src': 'embed', 'start': 2205.648, 'weight': 4, 'content': [{'end': 2212.315, 'text': 'The sysgram has been plotted for the following numbers, passing in the numbers with new line characters, et cetera, as we go through it.', 'start': 2205.648, 'duration': 6.667}, {'end': 2220.8, 'text': 'okay. so this shows you the sort of basics of building a supervisor agent that can direct multiple agents in here.', 'start': 2212.916, 'duration': 7.884}, {'end': 2230.005, 'text': "so in some future videos i think we'll look at how to actually go through this more in depth and actually do some more real world agent things with this,", 'start': 2220.8, 'duration': 9.205}], 'summary': 'The transcript discusses plotting sysgram for multiple numbers and building a supervisor agent for directing multiple agents.', 'duration': 24.357, 'max_score': 2205.648, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw2205648.jpg'}, {'end': 2266.229, 'src': 'embed', 'start': 2240.211, 'weight': 6, 'content': [{'end': 2248.597, 'text': 'But hopefully this gives you a sort of crash course in what Landgraf actually does and what some of the key components are for it.', 'start': 2240.211, 'duration': 8.386}, {'end': 2253.92, 'text': 'If you just think of it as being a state machine, this is fundamentally how I think about it.', 'start': 2249.017, 'duration': 4.903}, {'end': 2258.984, 'text': "If you've ever done any sort of programming for games and stuff, you often use state machines there.", 'start': 2254.06, 'duration': 4.924}, {'end': 2266.229, 'text': 'A lot of sort of coding will often have some kind of state machine and the state machine is basically just directing things around this.', 'start': 2259.004, 'duration': 7.225}], 'summary': 'Landgraf is a state machine with key components, similar to programming for games.', 'duration': 26.018, 'max_score': 2240.211, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw2240211.jpg'}, {'end': 2324.369, 'src': 'embed', 'start': 2296.905, 'weight': 7, 'content': [{'end': 2304.893, 'text': "to actually build agents is something that i've been interested in with uh langchain for over a year or so and i'm really curious to see, okay,", 'start': 2296.905, 'duration': 7.988}, {'end': 2306.535, 'text': 'what kind of agents you want.', 'start': 2304.893, 'duration': 1.642}, {'end': 2308.937, 'text': 'we can make some different examples of these.', 'start': 2306.535, 'duration': 2.402}, {'end': 2315.784, 'text': "in the description i'm going to put a google form of just basically asking you a little bit about what agents you're interested to see and stuff like that.", 'start': 2308.937, 'duration': 6.847}, {'end': 2324.369, 'text': 'if you are interested to find out more about this, fill out the form and then that will help work out what, what things to go with going forward.', 'start': 2316.284, 'duration': 8.085}], 'summary': 'Interested in building agents with langchain, seeking input via google form.', 'duration': 27.464, 'max_score': 2296.905, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw2296905.jpg'}], 'start': 1972.008, 'title': 'Setting up graph and agent supervision', 'summary': 'Outlines the process of setting up a graph for node communication, including creating nodes and edges, establishing conditional maps, and defining entry points. it also demonstrates creating a supervisor agent in landgraf, directing multiple agents and plotting 10 random lotto numbers on a histogram.', 'chapters': [{'end': 2057.591, 'start': 1972.008, 'title': 'Graph setup for node communication', 'summary': 'Outlines the process of setting up a graph for node communication, including creating nodes and edges, establishing conditional maps, and defining entry points.', 'duration': 85.583, 'highlights': ['The process involves creating nodes for lotto, code, and supervisor, and establishing edges using a for loop to connect the nodes.', 'All agents or personas, such as lotto manager and coder, ultimately connect back to the supervisor, ensuring a centralized communication flow.', "Conditional maps are set up to define the supervisor's conditional edges, with the potential to hard code these for clarity in future examples.", 'An entry point is established at the supervisor, allowing for the compilation and utilization of the graph.']}, {'end': 2340.259, 'start': 2058.13, 'title': 'Landgraf agent supervision', 'summary': 'Demonstrates the process of creating a supervisor agent in landgraf, directing multiple agents and plotting 10 random lotto numbers on a histogram.', 'duration': 282.129, 'highlights': ['Creating a supervisor agent to direct multiple agents in Landgraf, showcasing the process of building a state machine for agent supervision and the ability to plot 10 random lotto numbers on a histogram.', 'Utilizing different components in Landgraf, such as routers, prompt passing, and decision-making processes, to direct the flow of the agent operations.', 'Discussing the potential of building various types of agents with Langchain and seeking feedback on the types of agents that viewers are interested in, using a Google form for input.']}], 'duration': 368.251, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/PqS1kib7RTw/pics/PqS1kib7RTw1972008.jpg', 'highlights': ['Creating nodes for lotto, code, and supervisor, and establishing edges using a for loop.', 'All agents connect back to the supervisor, ensuring centralized communication flow.', "Establishing conditional maps to define the supervisor's conditional edges.", 'An entry point is established at the supervisor for graph compilation and utilization.', 'Creating a supervisor agent to direct multiple agents in Landgraf.', 'Showcasing the process of building a state machine for agent supervision.', 'Utilizing different components in Landgraf to direct the flow of agent operations.', 'Discussing the potential of building various types of agents with Langchain.']}], 'highlights': ['LandGraph is compatible with LangChain ecosystem, designed for custom agents and state machines.', 'Creating agent supervisor to route user inputs to different agents, including tools and language models like GPT-4, and creating agent nodes and a supervisor for multiple agent personalities and responses', 'The chapter covers creating custom tools in Langchain and agent tool execution workflow', 'The process involves passing an input to generate a random number, converting it to words, and making it lowercase.', 'The system uses a chat model and a list of messages to bind functions to an open AI model, allowing it to handle tool calls and return responses.']}