Go to file
James Woffinden-Luey ca66289a5a fixing precommit issues 2024-09-26 11:52:59 -07:00
.devcontainer changed CRLF to LF (#2935) 2024-06-13 16:44:11 +00:00
.github Amazon Bedrock Client for AutoGen (#3232) 2024-08-26 07:28:53 +00:00
autogen fixing precommit issues 2024-09-26 11:52:59 -07:00
dotnet [.Net] release v0.2.0 (#3483) 2024-09-05 21:23:52 +00:00
notebook Integrate Mem0 for providing long-term memory for AI Agents (#3389) 2024-09-06 00:07:06 +00:00
samples fixing precommit issues 2024-09-26 11:52:59 -07:00
scripts mypy in pre-commit fixed (#2117) 2024-03-21 18:54:39 +00:00
test [Graph RAG] Init Commit with GraphRag interfaces (#3388) 2024-09-04 16:11:02 +00:00
website Integrate Mem0 for providing long-term memory for AI Agents (#3389) 2024-09-06 00:07:06 +00:00
.coveragerc Sample Web Application Built with AutoGen (#695) 2023-11-20 18:40:30 +00:00
.gitattributes PGVector Support for Custom Connection Object (#2566) 2024-05-24 17:58:56 +00:00
.gitignore Update the auto_feedback_from_code_execution notebook to use code executor (#2366) 2024-04-18 07:53:19 +00:00
.pre-commit-config.yaml pre-commit version update and a few spelling fixes (#2913) 2024-06-12 06:26:22 +00:00
CITATION.cff Update CITATION.cff (#3427) 2024-08-27 07:02:18 +00:00
CODE_OF_CONDUCT.md CODE_OF_CONDUCT.md committed 2023-08-18 04:43:48 -07:00
CONTRIBUTORS.md Add missing contributors (#3426) 2024-08-27 17:31:22 +00:00
LICENSE cleanup 2023-09-19 12:38:26 +00:00
LICENSE-CODE LICENSE-CODE committed 2023-08-18 04:43:49 -07:00
OAI_CONFIG_LIST_sample change specified api-version (#2955) 2024-06-18 05:37:38 +00:00
README.md Update readme (#3485) 2024-09-07 05:53:05 +00:00
SECURITY.md cleanup 2023-09-19 12:38:26 +00:00
TRANSPARENCY_FAQS.md Add details about GAIA benchmark evaluation (#3433) 2024-08-27 17:10:57 +00:00
azure-pipelines.yml Add policheck to azure pipeline (#1371) 2024-01-23 16:00:23 +00:00
pyproject.toml fix notebook (#3093) 2024-07-11 23:45:05 +00:00
setup.py Amazon Bedrock Client for AutoGen (#3232) 2024-08-26 07:28:53 +00:00

README.md

AutoGen Logo

PyPI version Build Python Version Downloads

NuGet version

Discord Twitter

AutoGen

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.

[!IMPORTANT] Note for contributors and users: microsoft/autogen is the official repository of AutoGen project and it is under active development and maintenance under MIT license. We welcome 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. We acknowledge the invaluable contributions from our existing contributors, as listed in contributors.md. Whether you are an individual contributor or represent an organization, we invite you to join us in shaping the future of this project. For further information please also see Microsoft open-source contributing guidelines.

-Maintainers (Sept 6th, 2024)

AutoGen Overview

  • 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 was created out of collaborative research from Microsoft, Penn State University, and the University of Washington.

↑ Back to Top ↑

News

Expand

🔥 June 6, 2024: WIRED publishes a new article on AutoGen: Chatbot Teamwork Makes the AI Dream Work based on interview with Adam Fourney.

🔥 June 4th, 2024: Microsoft Research Forum publishes new update and video on AutoGen and Complex Tasks presented by Adam Fourney.

🔥 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 26, 2024: AutoGen.NET is available for .NET developers! Thanks XiaoYun Zhang

🔥 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.

🔥 Mar 1, 2024: the first AutoGen multi-agent experiment on the challenging GAIA benchmark achieved the No. 1 accuracy in all the three levels.

🎉 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.

Roadmaps

To see what we are working on and what we plan to work on, please check our Roadmap Issues.

↑ Back to Top ↑

Quickstart

The easiest way to start playing is

  1. Click below to use the GitHub Codespace

    Open in GitHub Codespaces

  2. Copy OAI_CONFIG_LIST_sample to ./notebook folder, name to OAI_CONFIG_LIST, and set the correct configuration.

  3. 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.

↑ Back to Top ↑

Installation

Option 1. Install and Run AutoGen in Docker

Find detailed instructions for users here, and for developers here.

Option 2. Install AutoGen Locally

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

pip install pyautogen

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.

↑ Back to Top ↑

Multi-Agent Conversation Framework

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://microsoft.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. Agent Chat Example

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.

↑ Back to Top ↑

Enhanced LLM Inferences

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.

↑ Back to Top ↑

Documentation

You can find detailed documentation about AutoGen here.

In addition, you can find:

↑ Back to Top ↑

AutoGen Studio

@inproceedings{dibia2024studio,
      title={AutoGen Studio: A No-Code Developer Tool for Building and Debugging Multi-Agent Systems},
      author={Victor Dibia and Jingya Chen and Gagan Bansal and Suff Syed and Adam Fourney and Erkang (Eric) Zhu and Chi Wang and Saleema Amershi},
      year={2024},
      booktitle={Pre-Print}
}

AutoGen

@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={2024},
      booktitle={COLM},
}

EcoOptiGen

@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},
}

MathChat

@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},
}

AgentOptimizer

@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}
}

StateFlow

@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}
}

↑ Back to Top ↑

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

If you are new to GitHub, here is a detailed help source on getting involved with development on GitHub.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

↑ Back to Top ↑

Contributors Wall

↑ Back to Top ↑

Legal Notices

Microsoft and any contributors grant you a license to the Microsoft documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.

Microsoft, Windows, Microsoft Azure, and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.

Privacy information can be found at https://go.microsoft.com/fwlink/?LinkId=521839

Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel, or otherwise.

↑ Back to Top ↑