Workshop 5: Build AutoGen Collaborative Autonomous Agents
What is AutoGen
AutoGen is a framework that enables the development of LLM applications using multiple agents that can converse with each other to solve tasks. AutoGen agents are customizable, conversable, and seamlessly allow human participation. They can operate in various modes that employ combinations of LLMs, human inputs, and tools.

AutoGen enables building next-gen LLM applications based on multi-agent conversations with minimal effort. It simplifies the orchestration, automation, and optimization of a complex LLM workflow. It maximizes the performance of LLM models and overcomes their weaknesses.
It supports diverse conversation patterns for complex workflows. With customizable and conversable agents, developers can use AutoGen to build a wide range of conversation patterns concerning conversation autonomy, the number of agents, and agent conversation topology.
It provides a collection of working systems with different complexities. These systems span a wide range of applications from various domains and complexities. This demonstrates how AutoGen can easily support diverse conversation patterns.
AutoGen provides enhanced LLM inference. It offers utilities like API unification and caching, and advanced usage patterns, such as error handling, multi-config inference, context programming, etc.
AutoGen is powered by collaborative research studies from Microsoft, Penn State University, and the University of Washington. AutoGen: Documentation, Github
Diverse Applications Implemented with AutoGen
The figure below shows six examples of applications built using AutoGen.

Find a list of examples in this page: Automated Agent Chat Examples
Building AutoGen Collaborative Autonomous Agents
Author: Madhav Arora https://medium.com/@madhavarora1988/autogen-driving-innovation-through-collaborative-autonomous-agents-28dfa9d9b0c5 Introduction
Microsoft released an open-source framework for creating configurable and customizable agents. These agents can engage with each other in meaningful conversations to collaborate on tasks or solve problems. In this article, we will explore what this framework provides and also walk through a custom use case to demonstrate the power of this framework.
What is an Agent?
An Agent is a programmatic construct, an entity powered by the underlying LLM model. AutoGen enables the creation of such Agents and provides an environment in which they can converse or interact with each other. An Agent has access to tools that allow it to perform web searches or execute code, like inside a Docker container. The basic idea is to have a team of Agents specialized in specific domains, each with access to special tools, and collaborating with each other to complete a task. Imagine a team consisting of a designer, programmer, manager, and product owner, each powered by a model or a human, working together toward a single goal.

What are different types of Agents?
There is an Agent type called ‘UserProxyAgent,’ which acts as a proxy for a user. It can be configured to be backed by a model or by a human (you) if you would like to provide constant direction to the team of Agents. Another type is the ‘AssistantAgent,’ which excels at writing code. You can create more agents by configuring them with specialized models, whether they run on the cloud or on your local machine (cost-saving, yay!).
What does a simple multi Agent Conversation look like ?
In the conversation below, a Human assigns a task, and then UserProxyAgent and AssistantAgent collaborate on it. There is a provision for the Human to become involved in the conversation to guide it in a specific direction.

Let’s solve a custom problem using this framework.
The Problem
Sometime back, I wrote an article that explains how to obtain API keys for Google and OpenWeather APIs. I would like my Agents to ‘retrieve the year-to-date stock performance for a publicly traded company mentioned in the article.’ As you can see, the request is straightforward, but the conversation becomes quite interesting and intuitive
Code Time
Step 0: Get the dependencies
Step 1: Create a file named “OAI_CONFIG_LIST”, this is for configuring your AI models API keys.
Step 2: Let’s use this file. As you can see, I am using GPT-4 in the file below. The reason for that is the not-so-great response from GPT-3.5 for this use case, at least
Step 3: Create your Agents
Step 4: Initiate the conversation by providing your prompt. As you can see, I have just provided the URL for my article and explained what I want
Step 5: I’ll paste the shortened response for the ask above
let me try to explain the interaction using a simple diagram

As you can see the conversation is akin to 2 individuals interacting with each other, each specialized in their domain.
Conclusion
This has great potential, considering how we all currently work and bring our strength, creativity our own persona to the table and how we as teams accomplish great things, I think AutoGen takes that Idea a step further and allows LLM agents to interact with each other and with us in real time. The future that I envision is having teams comprising of Humans and Agents, and there is a name for it: ‘Hybrid Multi-Team Systems’ (HMTS).
Last updated