NEW: Find your perfect tool with our matching quiz

Take a quiz

Table of Content

Microsoft AutoGen: Creating Complex Agent Workflows

Generative AI
|
Rokas Jurkėnas

As AI advances every day, we are seeing more advanced AI tools. More tools have been released that allow you to create an AI agent and workflow configurations that can perform multiple tasks at the same time while communicating with each other.

Microsoft autogen

We will take a look at what AutoGen is, how it can help you create multiple agents, and whether it is worth using.

What is Microsoft AutoGen?

AutoGen is an open-source project focused on simplifying the development of applications that rely on large language models (LLMs). It offers a framework for creating multi-agent conversations where these LLM agents can work together to achieve a task.

What is the purpose of AutoGen?

The main purpose of AutoGen is to allow developers to create applications that use large language models (LLMs) for complex tasks through multiple AutoGen agent collaboration and agent interactions.

What are the benefits of AutoGen?

AutoGen, like other AI agent workflow applications, offers similar benefits and key features, including:

  • Easy to set up: AutoGen allows you to build next-generation LLM applications based on multi-agent conversations with minimal effort. It simplifies the process of organizing, automating, and optimizing a complex LLM workflow.
  • Customizable: It supports multiple conversation patterns for complex workflows. With customizable and conversational agents, developers can use AutoGen to create a wide range of conversation patterns and modify agent configurations directly.
  • Library: Provides a collection of working systems of varying complexity. These systems cover a wide range of applications from different domains and complexities.
  • Human participation: AutoGen allows for smooth human participation. This means that humans can provide input and feedback to the agents as needed.
  • Other features: AutoGen provides advanced LLM capabilities. It offers utilities such as API standardization and caching, and advanced usage patterns such as error handling, multi-config inference, context programming, and more.
Illustration of ai agents

And if you are unfamiliar with programming, you can also use AutoGen Studio to create AI agent workflows in a more user-friendly virtual environment.

How to Install AutoGen?

Person talking with ai

There are a few ways to get started with agent workflows, here are some of the official installations you can do:

Option 1: Quickstart

The easiest way to start with agent workflow configuration:

  1. Click here to use the GitHub Codespace
  2. Copy OAI_CONFIG_LIST_sample to ./notebook folder, name to OAI_CONFIG_LIST, and set the correct configuration.
  3. You are done.

Option 2: Install AutoGen Locally

AutoGen requires Python version >= 3.8, < 3.13. It can be installed using pip:

pip install pyautogen

Minimal dependencies are installed without additional options. You can install extra options depending on the feature you need.

Even if you install and run AutoGen locally outside of Docker, the recommended and default behavior of the agents is to perform code execution in Docker.

Option 3: Install and Run AutoGen in Docker

You can find detailed instructions on how to install AutoGen here.

AutoGen Example: Managing a patient population with Autogen

AutoGen can be used for a variety of work areas to create multiple agents. It can be used to create a marketing team that can do research, analysis, and campaign execution, or a sales team that can find potential customers and more.

An article published by Mick Lynch details the development and implementation of “HospitalGPT”, a project using a multi-agent system based on AutoGen.

Lynch sees a need for healthcare organizations to engage in proactive outreach as they move towards value-based care models. The aim is to reduce downstream costs of care by implementing outreach programs for high-risk patient groups.

The solution

The solution involves a multi-skilled team working together. The process starts with a human user defining a high-level goal, such as sending outreach emails for colonoscopy screenings. This goal is further detailed by various AI agents: a planner, a critic, an epidemiologist, a data analyst, an executor, and an outreach agent.

Workflow visualization of ai agents

These agents work together to identify the target patient population, retrieve data, and create personalized outreach emails. You can see the output example yourself in this link.

Autogen, a Microsoft framework, is used to build the project. It includes two models: GPT-4 from OpenAI for high-level logic tasks and the Mixtral 8x7B model from Mistral.AI for less complex tasks, such as email generation. This implementation choice balances performance and cost.

This is one of the most impressive and useful uses of AutoGen that I have found. Although if you would browse the forums a bit more and see peoples thoughts about the tool it seems as though it is not perfect and not a 100 percent reliable yet.

Final thoughts

AutoGen and CrewAI are useful tools for multiple agent configurations to work together on a task. These agents can communicate and even establish a hierarchy of interactions.

illustration of many ai agents

Both tools are open-source and relatively new, so we can expect significant improvements in the near future. It will be exciting to see the real-world applications that will become possible.

AutoGen has an AutoGen studio that allows even those without coding experience to try it out. The studio is designed for people who are not familiar with coding environments.

Author

Avatar photo
Rokas Jurkėnas

Need some help with No-code?

For several years, I have been developing various products and systems using the No Code tools.

References

Read more