now this is really interesting with just eight simple copypaste steps you can create an autonomous and effortless AI agent system that can create AI agents as it needs to complete a task that you will assign to the system let's check this out now I run the python script and as instructed to find all the gp4 papers it creates the necessary agents the user proxy has asked the chat manager to get all the papers chat manager at this point knows mov what all agent that it has created and it ask the software developer to create the
code now software developer has created the code to get all the four paper it returned it back to the chat manager chat manager has returned it back to the user agent and now user agent have got all the paper that it asked for now if all this seems new and confusing to you don't worry because I'm going to break it down all for you my name is AIT you are watching not together where I try to simplify new techn technology and Innovations for your future and your business let's get [Music] started welcome back in this
video we are going to create eight easy to follow steps to create a really intelligent agent swarm type system using autogen agent Builder framework if you are in really Advanced a user please skip this first sections where I try to explain a little bit about AI agents and autogen framework for the user users who are very new to AI click the timeline below and go straight to the next section where we have started to build the system now those of you who have just started paying around AI different tools like chat gbt you really need
to up your game and learn more about autonomous AI agents because that is where AI starts to show some intelligent Behavior like humans think of AI agent as an AI employee it can do a very complex job autonomously for example think of a stock market analyst you can make it as an AI agent and you can also think of another software developer and make it as another AI agent now imagine if these two AI agent can talk to each other and understand each other then you could certainly have a very intelligent autonomous system which can
analyze stocks and it can make trade for you automatically and like a human this is just one example there could be thousands of such example of AI autonomous system that could do a lot of the work autonomously for you so in a high level a agent would have four components one the profile that defines who they are or what their role is to memory both shortterm and long long term in the longterm memory it should know the domain knowledge like in our example like stock market knowledge and in the short-term memory it should remember what
it has done recent or what has happened recent three most important planning so when the agent would be given a task it should use the large language model like CH gbt to break the complex task into a set of smaller subset of task and then four actions that defines subset of tools for example an API or a browser to complet those subset of task now this framework is discussed in a deta detail in this paper I'll put a link down in the description of this paper so if you want to read more on this you
can do that over the time this framework has been used in many different projects projects like camel chadd or very recently released autogen use the same Concepts the concept here is to create multiple agent who are very good at doing a specific role and then make conversation between those agents to build a very complex AI agent system who will deliver a very complex task this is called multi-agent work one of the limitation or constraint which has limited all these projects to become completely autonomous was either we humans have to define the different agents and their
roles or projects such as Chad de comes with predefined agents which you can use to complete a complex task but that was only up until recently on 26 November Microsoft team have published this article about agent autobuild system what this system does it creates the agent that it needs to complete the complex task autonomously and then those agent talks with them yourself and complete the task here in this video we will use autobuild and create this system using very easy eight steps let's now proceed on building the system to start I have open vs studio
and let me create a folder in PD Auto build demo now you can see the folder is created and let me create a python environment now uh I will use anakonda or cond if you use any other program feel free to use it like virtual en so contact minus n Auto build demo python 3.11 there you go you can optionally install VM and fast chat module this is only to support um open source large language models now that it is installed I have created a file called oi config list and I'm just going to specify
gp4 model here because that's the model I'm going to use for this demo this file contains the models that you are going to use for the agent just a small note here this Json file may contain multiple models like if you want to use multiple open source models for specific task you can actually Define all your models in this J file now let's create the final python script where we will define the eight easy to follow steps so let's build the file agent builder dopy in the first section we will import all the necessary modules
we will only need autogen and this agent Builder next we will Define all the necessary configs we have ear created oi config list oration which contains our llm configurations and we also set temperature to zero want our agent to come up with creative outputs next we will initiate our agent builder for that we'll Define agent Builder and then we'll provide our config P you can actually Define what model you want to use for the Builder agent and what model you want to use for your agent model and now here because I'm using GPT 4 only
I have specified both but the Builder model and agent model parameter is completely optional next we will Define the task for the autobuilder now this is not the task that you want as outcome this is more sort of a general task or an idea of the task task that the builder needs to know to be able to create all the agent it needs to create building task should be generic and it should also have an example for better understanding by the llm step five where we will help the Builder to build the agents so basically
we are defining the agent list with the agent config and we are also defining coding equal to True which in essence tells the Builder that you might need to create an agent who is capable of making code or doing code the step six will create a group chat so this will enable all the agents intercommunicate between themselves and finally we are creating a manager for the group chat now that our group chat manager is created we have created all the components necessary for this system now let's initiate the chat and give it a task to
complete let's give it a go oh I have forgot to specify the open a API key so let me go back to the open a console create the API key and don't worry I'm going to revoke the API key before I publish the video now I run the python script and as instructed to find all the gp4 papers it creates the necessary agents the software developer agent the data scientist agent and then the domain expert agent which is I believe experts in cyber security field now it starts working the user proxy has asked the chat
manager to get all the papers chat manager at this point knows what all agent that it has created and it ask the software developer to create the code now software developer has created the code to get all the four paper it returned it back to the chat manager chat manager has returned it back to the user agent and now user agent have got all the paper that it asked for at this stage I have stopped the workflow to check the cost of my apis but I think if I would have left it to run it
would have used the data scientist and the cyber security domain expert agent to read all the papers and then come up with a detailed research based on these papers now when I check the cost to run this demo I found it only costed me like 25 cents but the key thing here if you want to try it this note that this is not free to try and that brings a whole new idea of running this system with open source large language model which essentially you can run locally and then build the system on top of
your large language model I already have published a video about how to run large language model locally in your system using AMA please check out the video the link should be somewhere in the right I'm definitely going to try running this system with open source Lou language model locally to run this system entirely free and build some really cool AI agent system that will be for some future video so don't forget to subscribe to the channel and write down in the comments if you have any questions or confusion if you are not from a software
development background but if you still want to run the school AI agents you can still run it using user interface my next video will be on running this kind of system using user interface so stay tuned take care and I'll see you in the next one [Music] bye