π₯ π Sep 06, 2024: AutoGen now available as autogen
on PyPI! We're excited to announce a more convenient package name for AutoGen: Starting with version 0.3.0, you can now install AutoGen using:
pip install autogen
We extend our sincere gratitude to the original owner of autogen
pypi package for generously transferring it to us.
Note: The previous package name pyautogen
will remain valid for a transitional period. However, we encourage users to switch to the new, more intuitive autogen
package name, as pyautogen
will eventually be deprecated.
π License Change: With this new release and package name, we are officially switching to the Apache 2.0 license. This enhances our commitment to open-source collaboration while providing additional protections for contributors and users alike.
π₯ Aug, 2024: A new organization autogenhub is created to host the development of AutoGen and related projects with open governance. We invite collaborators from all organizations and individuals.
π May 29, 2024: DeepLearning.ai launched a new short course AI Agentic Design Patterns with AutoGen, made in collaboration with Microsoft and Penn State University, and taught by AutoGen creators Chi Wang and Qingyun Wu.
π May 24, 2024: Foundation Capital published an article on Forbes: The Promise of Multi-Agent AI and a video AI in the Real World Episode 2: Exploring Multi-Agent AI and AutoGen with Chi Wang.
π May 13, 2024: The Economist published an article about multi-agent systems (MAS) following a January 2024 interview with Chi Wang.
π May 11, 2024: AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation received the best paper award at the ICLR 2024 LLM Agents Workshop.
π Apr 17, 2024: Andrew Ng cited AutoGen in The Batch newsletter and What's next for AI agentic workflows at Sequoia Capital's AI Ascent (Mar 26).
π Mar 3, 2024: What's new in AutoGen? π°Blog; πΊYoutube.
π Dec 31, 2023: AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework is selected by TheSequence: My Five Favorite AI Papers of 2023.
π Nov 8, 2023: AutoGen is selected into Open100: Top 100 Open Source achievements 35 days after spinoff from FLAML.
π Mar 29, 2023: AutoGen is first created in FLAML.
AutoGen is an open-source programming framework for building AI agents and facilitating cooperation among multiple agents to solve tasks. AutoGen aims to streamline the development and research of agentic AI, much like PyTorch does for Deep Learning. It offers features such as agents capable of interacting with each other, facilitates the use of various large language models (LLMs) and tool use support, autonomous and human-in-the-loop workflows, and multi-agent conversation patterns.
Open Source Statement: The project welcomes contributions from developers and organizations worldwide. Our goal is to foster a collaborative and inclusive community where diverse perspectives and expertise can drive innovation and enhance the project's capabilities. Whether you are an individual contributor or represent an organization, we invite you to join us in shaping the future of this project. Together, we can build something truly remarkable.
The project is currently maintained by a dynamic group of volunteers from several organizations. Contact project administrators Chi Wang and Qingyun Wu via auto-gen@outlook.com if you are interested in becoming a maintainer.
AutoGen is created out of collaborative research from Microsoft, Penn State University, and the University of Washington.
The easiest way to start playing is
-
Click below to use the GitHub Codespace
-
Copy OAI_CONFIG_LIST_sample to ./notebook folder, name to OAI_CONFIG_LIST, and set the correct configuration.
-
Start playing with the notebooks!
NOTE: OAI_CONFIG_LIST_sample lists GPT-4 as the default model, as this represents our current recommendation, and is known to work well with AutoGen. If you use a model other than GPT-4, you may need to revise various system prompts (especially if using weaker models like GPT-3.5-turbo). Moreover, if you use models other than those hosted by OpenAI or Azure, you may incur additional risks related to alignment and safety. Proceed with caution if updating this default.
Find detailed instructions for users here, and for developers here.
AutoGen requires Python version >= 3.8, < 3.13. It can be installed from pip:
pip install autogen
Minimal dependencies are installed without extra options. You can install extra options based on the feature you need.
Find more options in Installation.
Even if you are installing and running AutoGen locally outside of docker, the recommendation and default behavior of agents is to perform code execution in docker. Find more instructions and how to change the default behaviour here.
For LLM inference configurations, check the FAQs.
Autogen enables the next-gen LLM applications with a generic multi-agent conversation framework. It offers customizable and conversable agents that integrate LLMs, tools, and humans. By automating chat among multiple capable agents, one can easily make them collectively perform tasks autonomously or with human feedback, including tasks that require using tools via code.
Features of this use case include:
- Multi-agent conversations: AutoGen agents can communicate with each other to solve tasks. This allows for more complex and sophisticated applications than would be possible with a single LLM.
- Customization: AutoGen agents can be customized to meet the specific needs of an application. This includes the ability to choose the LLMs to use, the types of human input to allow, and the tools to employ.
- Human participation: AutoGen seamlessly allows human participation. This means that humans can provide input and feedback to the agents as needed.
For example,
from autogen import AssistantAgent, UserProxyAgent, config_list_from_json
# Load LLM inference endpoints from an env variable or a file
# See https://autogenhub.github.io/autogen/docs/FAQ#set-your-api-endpoints
# and OAI_CONFIG_LIST_sample
config_list = config_list_from_json(env_or_file="OAI_CONFIG_LIST")
# You can also set config_list directly as a list, for example, config_list = [{'model': 'gpt-4', 'api_key': '<your OpenAI API key here>'},]
assistant = AssistantAgent("assistant", llm_config={"config_list": config_list})
user_proxy = UserProxyAgent("user_proxy", code_execution_config={"work_dir": "coding", "use_docker": False}) # IMPORTANT: set to True to run code in docker, recommended
user_proxy.initiate_chat(assistant, message="Plot a chart of NVDA and TESLA stock price change YTD.")
# This initiates an automated chat between the two agents to solve the task
This example can be run with
python test/twoagent.py
After the repo is cloned. The figure below shows an example conversation flow with AutoGen.
Alternatively, the sample code here allows a user to chat with an AutoGen agent in ChatGPT style. Please find more code examples for this feature.
Autogen also helps maximize the utility out of the expensive LLMs such as ChatGPT and GPT-4. It offers enhanced LLM inference with powerful functionalities like caching, error handling, multi-config inference and templating.
You can find detailed documentation about AutoGen here.
In addition, you can find:
-
Research, blogposts around AutoGen, and Transparency FAQs
Explore detailed implementations with sample code and applications to help you get started with AutoGen. Cookbook
@inproceedings{wu2023autogen,
title={AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework},
author={Qingyun Wu and Gagan Bansal and Jieyu Zhang and Yiran Wu and Beibin Li and Erkang Zhu and Li Jiang and Xiaoyun Zhang and Shaokun Zhang and Jiale Liu and Ahmed Hassan Awadallah and Ryen W White and Doug Burger and Chi Wang},
year={2023},
eprint={2308.08155},
archivePrefix={arXiv},
primaryClass={cs.AI}
}
@inproceedings{wang2023EcoOptiGen,
title={Cost-Effective Hyperparameter Optimization for Large Language Model Generation Inference},
author={Chi Wang and Susan Xueqing Liu and Ahmed H. Awadallah},
year={2023},
booktitle={AutoML'23},
}
@inproceedings{wu2023empirical,
title={An Empirical Study on Challenging Math Problem Solving with GPT-4},
author={Yiran Wu and Feiran Jia and Shaokun Zhang and Hangyu Li and Erkang Zhu and Yue Wang and Yin Tat Lee and Richard Peng and Qingyun Wu and Chi Wang},
year={2023},
booktitle={ArXiv preprint arXiv:2306.01337},
}
@article{zhang2024training,
title={Training Language Model Agents without Modifying Language Models},
author={Zhang, Shaokun and Zhang, Jieyu and Liu, Jiale and Song, Linxin and Wang, Chi and Krishna, Ranjay and Wu, Qingyun},
journal={ICML'24},
year={2024}
}
@article{wu2024stateflow,
title={StateFlow: Enhancing LLM Task-Solving through State-Driven Workflows},
author={Wu, Yiran and Yue, Tianwei and Zhang, Shaokun and Wang, Chi and Wu, Qingyun},
journal={arXiv preprint arXiv:2403.11322},
year={2024}
}
This project is licensed under the Apache License, Version 2.0 (Apache-2.0).
This project is a fork of https://github.com/microsoft/autogen and contains code under two licenses:
-
The original code from https://github.com/microsoft/autogen is licensed under the MIT License. See the LICENSE_original_MIT file for details.
-
Modifications and additions made in this fork are licensed under the Apache License, Version 2.0. See the LICENSE file for the full license text.
We have documented these changes for clarity and to ensure transparency with our user and contributor community. For more details, please see the NOTICE file.