From the course: OpenAI API and MCP Development
Building and orchestrating agents
From the course: OpenAI API and MCP Development
Building and orchestrating agents
As a software engineer, your role is to implement and integrate multiple solutions at a very fast pace. Your team often faces a heavy workload with tons of requests. And to save time and resources, you want to set up a team of AI agents to automate the same steps usually handled by developers. I mean by actual human developers. Instead, you want to build a team of AI agents powered by the capabilities of language models. And the goal is to design a multi-agent workflow that can handle simple coding tasks from start to finish, from code requests to code approval. And so for the next example, we want to use AgentChat, which is a very high-level API that we use to build multi-agent applications. So it is built on top of the AutoGen core package, And this allows to orchestrate a multi-agent systems where agents can collaborate autonomously in a very independent fashion to process user queries, fetch data from APIs, for example, until the final outputs to generate responses. So they're gonna interact between each other until the final output. So everything is gonna be done in an automatic way based on the user requests with little to no supervision from human interaction. So the AutoGen ecosystem provides everything that you need to create teams of AI agents. And it is usually recommended as a starting point for beginner users. So this is very easy to use. This is a very high-level API. So here we can see that Agent Chat provides a set of preset agents, like this one, Assistance Agent. And it comes with the following attributes and methods. So you can provide with a name, a description, And even tools, you can actually enable tool calling to allow the AI agents to interface with external systems or APIs in order to expand their capabilities and generate extended responses. And then you have also methods here, for example, to run the agent and stream the messages to the console. And here, the question is to ask about the weather in New York. So this is one example that we have seen previously. So we know that the language models don't have real-time awareness. So they are limited with knowledge. So they don't have an extended knowledge. And here in this example, what we do is to enable function calling with one function, which is in charge of then interacting with whichever API to then provide with current and specific data. So this is one good example to build a one agent system in this instance to then run. And it's going to be run in an automatic way, meaning that the agents will know what tasks to complete and how to complete it until the final output. So in the next example, I want to teach you how to build a collaborative team of AI agents to run a team of developers. So to process a code request, a code task until the final outputs. And it's going to be more than one agent. So just like in real life, the workflow that we want to design is to complete a task end-to-end, from request to code approval, in order to save time and resources. We want to set up a team of AI agents to automate the steps, which are typically handled by a team of developers, by human developers, I mean. Each agent will have a specific role and will be connected to a language model to guide the response. We're going to provide with a prompt with instructions as to how to behave, and what is expected as a result and they're going to work together to bring the final response which is expected. So up next let's see together how to put together a multi-agent workflow.