ag2 0.7.2b1__tar.gz → 0.7.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ag2 might be problematic. Click here for more details.
- {ag2-0.7.2b1 → ag2-0.7.4}/NOTICE.md +1 -1
- {ag2-0.7.2b1/ag2.egg-info → ag2-0.7.4}/PKG-INFO +64 -44
- {ag2-0.7.2b1 → ag2-0.7.4}/README.md +57 -43
- {ag2-0.7.2b1 → ag2-0.7.4/ag2.egg-info}/PKG-INFO +64 -44
- {ag2-0.7.2b1 → ag2-0.7.4}/ag2.egg-info/SOURCES.txt +0 -1
- ag2-0.7.4/ag2.egg-info/requires.txt +136 -0
- {ag2-0.7.2b1 → ag2-0.7.4}/pyproject.toml +69 -26
- {ag2-0.7.2b1 → ag2-0.7.4}/setup_ag2.py +7 -1
- {ag2-0.7.2b1 → ag2-0.7.4}/test/test_browser_utils.py +7 -15
- {ag2-0.7.2b1 → ag2-0.7.4}/test/test_code_utils.py +5 -11
- ag2-0.7.4/test/test_conftest.py +74 -0
- {ag2-0.7.2b1 → ag2-0.7.4}/test/test_graph_utils.py +1 -1
- {ag2-0.7.2b1 → ag2-0.7.4}/test/test_import.py +1 -1
- {ag2-0.7.2b1 → ag2-0.7.4}/test/test_import_utils.py +1 -1
- {ag2-0.7.2b1 → ag2-0.7.4}/test/test_logging.py +4 -4
- {ag2-0.7.2b1 → ag2-0.7.4}/test/test_notebook.py +33 -29
- {ag2-0.7.2b1 → ag2-0.7.4}/test/test_retrieve_utils.py +9 -23
- {ag2-0.7.2b1 → ag2-0.7.4}/test/test_token_count.py +4 -11
- ag2-0.7.2b1/ag2.egg-info/requires.txt +0 -118
- ag2-0.7.2b1/test/test_conftest.py +0 -34
- ag2-0.7.2b1/test/test_pydantic.py +0 -46
- {ag2-0.7.2b1 → ag2-0.7.4}/LICENSE +0 -0
- {ag2-0.7.2b1 → ag2-0.7.4}/ag2.egg-info/dependency_links.txt +0 -0
- {ag2-0.7.2b1 → ag2-0.7.4}/ag2.egg-info/top_level.txt +0 -0
- {ag2-0.7.2b1 → ag2-0.7.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ag2
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.4
|
|
4
4
|
Summary: Alias package for pyautogen
|
|
5
5
|
Home-page: https://github.com/ag2ai/ag2
|
|
6
6
|
Author: Chi Wang & Qingyun Wu
|
|
@@ -19,6 +19,9 @@ Provides-Extra: retrievechat-pgvector
|
|
|
19
19
|
Provides-Extra: retrievechat-mongodb
|
|
20
20
|
Provides-Extra: retrievechat-qdrant
|
|
21
21
|
Provides-Extra: graph-rag-falkor-db
|
|
22
|
+
Provides-Extra: rag
|
|
23
|
+
Provides-Extra: crawl4ai
|
|
24
|
+
Provides-Extra: browser-use
|
|
22
25
|
Provides-Extra: neo4j
|
|
23
26
|
Provides-Extra: twilio
|
|
24
27
|
Provides-Extra: interop-crewai
|
|
@@ -46,6 +49,9 @@ Provides-Extra: groq
|
|
|
46
49
|
Provides-Extra: cohere
|
|
47
50
|
Provides-Extra: ollama
|
|
48
51
|
Provides-Extra: bedrock
|
|
52
|
+
Provides-Extra: commsagent-discord
|
|
53
|
+
Provides-Extra: commsagent-slack
|
|
54
|
+
Provides-Extra: commsagent-telegram
|
|
49
55
|
Provides-Extra: test
|
|
50
56
|
Provides-Extra: docs
|
|
51
57
|
Provides-Extra: types
|
|
@@ -59,29 +65,39 @@ License-File: NOTICE.md
|
|
|
59
65
|

|
|
60
66
|
[](https://badge.fury.io/py/autogen)
|
|
61
67
|
[](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml)
|
|
62
|
-

|
|
63
69
|
[](https://discord.gg/pAbnFJrkgZ)
|
|
64
|
-
[](https://x.com/ag2oss)
|
|
65
71
|
|
|
66
72
|
<!-- [](https://badge.fury.io/nu/AutoGen.Core) -->
|
|
67
73
|
|
|
68
74
|
# [AG2](https://github.com/ag2ai/ag2)
|
|
69
75
|
|
|
76
|
+
## Key Features
|
|
77
|
+
- 🤖 Multi-Agent Framework - Build and orchestrate AI agent interactions
|
|
78
|
+
- 🔧 Flexible Integration - Support for various LLMs (OpenAI, Anthropic, Gemini, etc.)
|
|
79
|
+
- 🛠 Tool Usage - Agents can use external tools and execute code
|
|
80
|
+
- 👥 Human-in-the-Loop - Seamless human participation when needed
|
|
81
|
+
- 🔄 Rich Orchestration Patterns - Agents can be organized in any form you like
|
|
82
|
+
- 🎯 Future-Oriented - Designed for solving difficult problems and harnessing latest and future technology
|
|
83
|
+
|
|
84
|
+
[📚 Documentation](https://docs.ag2.ai/) | [💡 Examples](https://github.com/ag2ai/build-with-ag2) | [🤝 Contributing](https://docs.ag2.ai/docs/contributor-guide/contributing)
|
|
85
|
+
|
|
70
86
|
[📚 Cite paper](#related-papers).
|
|
87
|
+
|
|
71
88
|
<!-- <p align="center">
|
|
72
89
|
<img src="https://github.com/ag2ai/ag2/blob/main/website/static/img/flaml.svg" width=200>
|
|
73
90
|
<br>
|
|
74
91
|
</p> -->
|
|
75
92
|
|
|
76
|
-
>
|
|
93
|
+
> **🎉 IMPORTANT**
|
|
77
94
|
>
|
|
78
|
-
>
|
|
95
|
+
> 🔥 🎉 **Nov 11, 2024:** We are evolving AutoGen into **AG2**!
|
|
79
96
|
> A new organization [AG2AI](https://github.com/ag2ai) is created to host the development of AG2 and related projects with open governance. Check [AG2's new look](https://ag2.ai/).
|
|
80
97
|
>
|
|
81
98
|
> We invite collaborators from all organizations and individuals to join the development.
|
|
82
99
|
|
|
83
|
-
|
|
84
|
-
:fire: :tada: AG2 is available via `pyautogen` (or its alias `autogen` or `ag2`) on PyPI!
|
|
100
|
+
🔥 🎉 AG2 is available via `pyautogen` (or its alias `autogen` or `ag2`) on PyPI!
|
|
85
101
|
|
|
86
102
|
```
|
|
87
103
|
pip install pyautogen
|
|
@@ -90,62 +106,63 @@ pip install pyautogen
|
|
|
90
106
|
📄 **License:**
|
|
91
107
|
We adopt the Apache 2.0 license from v0.3. This enhances our commitment to open-source collaboration while providing additional protections for contributors and users alike.
|
|
92
108
|
|
|
109
|
+
🎉 May 29, 2024: DeepLearning.ai launched a new short course [AI Agentic Design Patterns with AutoGen](https://www.deeplearning.ai/short-courses/ai-agentic-design-patterns-with-autogen), made in collaboration with Microsoft and Penn State University, and taught by AutoGen creators [Chi Wang](https://github.com/sonichi) and [Qingyun Wu](https://github.com/qingyun-wu).
|
|
93
110
|
|
|
94
|
-
|
|
111
|
+
🎉 May 24, 2024: Foundation Capital published an article on [Forbes: The Promise of Multi-Agent AI](https://www.forbes.com/sites/joannechen/2024/05/24/the-promise-of-multi-agent-ai/?sh=2c1e4f454d97) and a video [AI in the Real World Episode 2: Exploring Multi-Agent AI and AutoGen with Chi Wang](https://www.youtube.com/watch?v=RLwyXRVvlNk).
|
|
95
112
|
|
|
96
|
-
|
|
113
|
+
🎉 May 13, 2024: [The Economist](https://www.economist.com/science-and-technology/2024/05/13/todays-ai-models-are-impressive-teams-of-them-will-be-formidable) published an article about multi-agent systems (MAS) following a January 2024 interview with [Chi Wang](https://github.com/sonichi).
|
|
97
114
|
|
|
98
|
-
|
|
115
|
+
🎉 May 11, 2024: [AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation](https://openreview.net/pdf?id=uAjxFFing2) received the best paper award at the [ICLR 2024 LLM Agents Workshop](https://llmagents.github.io/).
|
|
99
116
|
|
|
100
|
-
|
|
117
|
+
<!-- 🎉 Apr 26, 2024: [AutoGen.NET](https://docs.ag2.ai/ag2-for-net/) is available for .NET developers! -->
|
|
101
118
|
|
|
102
|
-
|
|
119
|
+
🎉 Apr 17, 2024: Andrew Ng cited AutoGen in [The Batch newsletter](https://www.deeplearning.ai/the-batch/issue-245/) and [What's next for AI agentic workflows](https://youtu.be/sal78ACtGTc?si=JduUzN_1kDnMq0vF) at Sequoia Capital's AI Ascent (Mar 26).
|
|
103
120
|
|
|
104
|
-
|
|
121
|
+
🎉 Mar 3, 2024: What's new in AutoGen? 📰[Blog](https://docs.ag2.ai/blog/2024-03-03-AutoGen-Update); 📺[Youtube](https://www.youtube.com/watch?v=j_mtwQiaLGU).
|
|
105
122
|
|
|
106
|
-
|
|
123
|
+
<!-- 🎉 Mar 1, 2024: the first AutoGen multi-agent experiment on the challenging [GAIA](https://huggingface.co/spaces/gaia-benchmark/leaderboard) benchmark achieved the No. 1 accuracy in all the three levels. -->
|
|
107
124
|
|
|
108
|
-
<!--
|
|
125
|
+
<!-- 🎉 Jan 30, 2024: AutoGen is highlighted by Peter Lee in Microsoft Research Forum [Keynote](https://t.co/nUBSjPDjqD). -->
|
|
109
126
|
|
|
110
|
-
|
|
127
|
+
🎉 Dec 31, 2023: [AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework](https://arxiv.org/abs/2308.08155) is selected by [TheSequence: My Five Favorite AI Papers of 2023](https://thesequence.substack.com/p/my-five-favorite-ai-papers-of-2023).
|
|
111
128
|
|
|
112
|
-
|
|
129
|
+
<!-- 🔥 Nov 24: pyautogen [v0.2](https://github.com/ag2ai/ag2/releases/tag/v0.2.0) is released with many updates and new features compared to v0.1.1. It switches to using openai-python v1. Please read the [migration guide](https://docs.ag2.ai/docs/installation/Installation). -->
|
|
113
130
|
|
|
114
|
-
<!--
|
|
131
|
+
<!-- 🔥 Nov 11: OpenAI's Assistants are available in AutoGen and interoperatable with other AutoGen agents! Checkout our [blogpost](https://docs.ag2.ai/blog/2023-11-13-OAI-assistants) for details and examples. -->
|
|
115
132
|
|
|
116
|
-
|
|
133
|
+
🎉 Nov 8, 2023: AutoGen is selected into [Open100: Top 100 Open Source achievements](https://www.benchcouncil.org/evaluation/opencs/annual.html) 35 days after spinoff from [FLAML](https://github.com/microsoft/FLAML).
|
|
117
134
|
|
|
118
|
-
|
|
135
|
+
<!-- 🎉 Nov 6, 2023: AutoGen is mentioned by Satya Nadella in a [fireside chat](https://youtu.be/0pLBvgYtv6U). -->
|
|
119
136
|
|
|
120
|
-
<!--
|
|
137
|
+
<!-- 🎉 Nov 1, 2023: AutoGen is the top trending repo on GitHub in October 2023. -->
|
|
121
138
|
|
|
122
|
-
<!--
|
|
139
|
+
<!-- 🎉 Oct 03, 2023: AutoGen spins off from [FLAML](https://github.com/microsoft/FLAML) on GitHub. -->
|
|
123
140
|
|
|
124
|
-
<!--
|
|
141
|
+
<!-- 🎉 Aug 16: Paper about AutoGen on [arxiv](https://arxiv.org/abs/2308.08155). -->
|
|
125
142
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
:tada: Mar 29, 2023: AutoGen is first created in [FLAML](https://github.com/microsoft/FLAML).
|
|
143
|
+
🎉 Mar 29, 2023: AutoGen is first created in [FLAML](https://github.com/microsoft/FLAML).
|
|
129
144
|
|
|
130
145
|
<!--
|
|
131
|
-
|
|
146
|
+
🔥 FLAML is highlighted in OpenAI's [cookbook](https://github.com/openai/openai-cookbook#related-resources-from-around-the-web).
|
|
132
147
|
|
|
133
|
-
|
|
148
|
+
🔥 [autogen](https://docs.ag2.ai/) is released with support for ChatGPT and GPT-4, based on [Cost-Effective Hyperparameter Optimization for Large Language Model Generation Inference](https://arxiv.org/abs/2303.04673).
|
|
134
149
|
|
|
135
|
-
|
|
150
|
+
🔥 FLAML supports Code-First AutoML & Tuning – Private Preview in [Microsoft Fabric Data Science](https://learn.microsoft.com/en-us/fabric/data-science/). -->
|
|
136
151
|
|
|
137
152
|
## What is AG2
|
|
138
153
|
|
|
139
|
-
AG2 (formerly AutoGen) is an open-source
|
|
154
|
+
AG2 (formerly AutoGen) is an open-source AgentOS for building AI agents and facilitating cooperation among multiple agents to solve tasks. AG2 provides fundamental building blocks needed to create, deploy, and manage AI agents that can work together to solve complex problems.
|
|
155
|
+
|
|
156
|
+
### Core Concepts
|
|
157
|
+
- **Agents**: Stateful entities that can send messages, receive messages, and generate replies using underlying capabilities powered by LLMs, non-LLM tools, or human inputs. Depending on the underlying capability, an agent may reason, plan, execute tasks or involve other agents before generating a reply.
|
|
158
|
+
- **Conversations**: Structured communication patterns between agents.
|
|
140
159
|
|
|
141
160
|
**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.
|
|
142
161
|
|
|
143
162
|
The project is currently maintained by a [dynamic group of volunteers](MAINTAINERS.md) from several organizations. Contact project administrators Chi Wang and Qingyun Wu via [support@ag2.ai](mailto:support@ag2.ai) if you are interested in becoming a maintainer.
|
|
144
163
|
|
|
145
|
-
|
|
146
164
|

|
|
147
165
|
|
|
148
|
-
|
|
149
166
|
<p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
|
|
150
167
|
<a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
|
|
151
168
|
↑ Back to Top ↑
|
|
@@ -157,15 +174,17 @@ The project is currently maintained by a [dynamic group of volunteers](MAINTAINE
|
|
|
157
174
|
-->
|
|
158
175
|
|
|
159
176
|
## Quickstart
|
|
177
|
+
|
|
160
178
|
The easiest way to start playing is
|
|
179
|
+
|
|
161
180
|
1. Click below to use the GitHub Codespace
|
|
162
181
|
|
|
163
|
-
|
|
182
|
+
[](https://codespaces.new/ag2ai/ag2?quickstart=1)
|
|
164
183
|
|
|
165
|
-
|
|
166
|
-
|
|
184
|
+
2. Copy OAI_CONFIG_LIST_sample to ./notebook folder, name to OAI_CONFIG_LIST, and set the correct configuration.
|
|
185
|
+
3. Start playing with the notebooks!
|
|
167
186
|
|
|
168
|
-
|
|
187
|
+
_NOTE_: OAI_CONFIG_LIST_sample lists gpt-4o as the default model. If you use a different model, you may need to revise various system prompts (especially if using weaker models like gpt-4o-mini). Proceed with caution when updating this default and be aware of additional risks related to alignment and safety.
|
|
169
188
|
|
|
170
189
|
<p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
|
|
171
190
|
<a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
|
|
@@ -177,7 +196,7 @@ The easiest way to start playing is
|
|
|
177
196
|
|
|
178
197
|
### Option 1. Install and Run AG2 in Docker
|
|
179
198
|
|
|
180
|
-
Find detailed instructions for users [here](https://docs.ag2.ai/docs/installation/Docker#step-1-install-docker), and for developers [here](https://docs.ag2.ai/docs/contributor-guide/
|
|
199
|
+
Find detailed instructions for users [here](https://docs.ag2.ai/docs/installation/Docker#step-1-install-docker), and for developers [here](https://docs.ag2.ai/docs/contributor-guide/setup-development-environment).
|
|
181
200
|
|
|
182
201
|
### Option 2. Install AG2 Locally
|
|
183
202
|
|
|
@@ -200,7 +219,7 @@ Find more options in [Installation](https://docs.ag2.ai/docs/Installation#option
|
|
|
200
219
|
|
|
201
220
|
Even if you are installing and running AG2 locally outside of docker, the recommendation and default behavior of agents is to perform [code execution](https://docs.ag2.ai/docs/FAQ#if-you-want-to-run-code-execution-in-docker) in docker. Find more instructions and how to change the default behaviour [here](https://docs.ag2.ai/docs/FAQ#if-you-want-to-run-code-execution-locally).
|
|
202
221
|
|
|
203
|
-
For LLM inference configurations, check the [FAQs](https://docs.ag2.ai/docs/
|
|
222
|
+
For LLM inference configurations, check the [FAQs](https://docs.ag2.ai/docs/user-guide/advanced-concepts/llm-configuration-deep-dive#llm-configuration).
|
|
204
223
|
|
|
205
224
|
<p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
|
|
206
225
|
<a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
|
|
@@ -224,7 +243,7 @@ For [example](https://github.com/ag2ai/ag2/blob/main/test/twoagent.py),
|
|
|
224
243
|
```python
|
|
225
244
|
from autogen import AssistantAgent, UserProxyAgent, config_list_from_json
|
|
226
245
|
# Load LLM inference endpoints from an env variable or a file
|
|
227
|
-
# See https://docs.ag2.ai/docs/
|
|
246
|
+
# See https://docs.ag2.ai/docs/user-guide/advanced-concepts/llm-configuration-deep-dive#llm-configuration
|
|
228
247
|
# and OAI_CONFIG_LIST_sample
|
|
229
248
|
config_list = config_list_from_json(env_or_file="OAI_CONFIG_LIST")
|
|
230
249
|
# You can also set config_list directly as a list, for example, config_list = [{'model': 'gpt-4o', 'api_key': '<your OpenAI API key here>'},]
|
|
@@ -245,7 +264,6 @@ The figure below shows an example conversation flow with AG2.
|
|
|
245
264
|
|
|
246
265
|

|
|
247
266
|
|
|
248
|
-
|
|
249
267
|
Alternatively, the [sample code](https://github.com/ag2ai/build-with-ag2/blob/main/samples/simple_chat.py) here allows a user to chat with an AG2 agent in ChatGPT style.
|
|
250
268
|
Please find more [code examples](https://docs.ag2.ai/docs/Examples#automated-multi-agent-chat) for this feature.
|
|
251
269
|
|
|
@@ -257,7 +275,7 @@ Please find more [code examples](https://docs.ag2.ai/docs/Examples#automated-mul
|
|
|
257
275
|
|
|
258
276
|
## Enhanced LLM Inferences
|
|
259
277
|
|
|
260
|
-
AG2 also helps maximize the utility out of the expensive LLMs such as gpt-4o. It offers
|
|
278
|
+
AG2 also helps maximize the utility out of the expensive LLMs such as gpt-4o. It offers enhanced LLM inference with powerful functionalities like caching, error handling, multi-config inference and templating.
|
|
261
279
|
|
|
262
280
|
<!-- For example, you can optimize generations by LLM with your own tuning data, success metrics, and budgets.
|
|
263
281
|
|
|
@@ -307,7 +325,6 @@ In addition, you can find:
|
|
|
307
325
|
Explore detailed implementations with sample code and applications to help you get started with AG2.
|
|
308
326
|
[Cookbook](https://github.com/ag2ai/build-with-ag2)
|
|
309
327
|
|
|
310
|
-
|
|
311
328
|
## Related Papers
|
|
312
329
|
|
|
313
330
|
[AutoGen](https://arxiv.org/abs/2308.08155)
|
|
@@ -357,6 +374,7 @@ Explore detailed implementations with sample code and applications to help you g
|
|
|
357
374
|
```
|
|
358
375
|
|
|
359
376
|
[StateFlow](https://arxiv.org/abs/2403.11322)
|
|
377
|
+
|
|
360
378
|
```
|
|
361
379
|
@article{wu2024stateflow,
|
|
362
380
|
title={StateFlow: Enhancing LLM Task-Solving through State-Driven Workflows},
|
|
@@ -373,6 +391,7 @@ Explore detailed implementations with sample code and applications to help you g
|
|
|
373
391
|
</p>
|
|
374
392
|
|
|
375
393
|
## Contributors Wall
|
|
394
|
+
|
|
376
395
|
<a href="https://github.com/ag2ai/ag2/graphs/contributors">
|
|
377
396
|
<img src="https://contrib.rocks/image?repo=ag2ai/ag2&max=204" />
|
|
378
397
|
</a>
|
|
@@ -384,13 +403,14 @@ Explore detailed implementations with sample code and applications to help you g
|
|
|
384
403
|
</p>
|
|
385
404
|
|
|
386
405
|
## License
|
|
406
|
+
|
|
387
407
|
This project is licensed under the [Apache License, Version 2.0 (Apache-2.0)](./LICENSE).
|
|
388
408
|
|
|
389
409
|
This project is a spin-off of [AutoGen](https://github.com/microsoft/autogen) and contains code under two licenses:
|
|
390
410
|
|
|
391
|
-
- The original code from https://github.com/microsoft/autogen is licensed under the MIT License.
|
|
411
|
+
- The original code from https://github.com/microsoft/autogen is licensed under the MIT License. See the [LICENSE_original_MIT](./license_original/LICENSE_original_MIT) file for details.
|
|
392
412
|
|
|
393
|
-
- Modifications and additions made in this fork are licensed under the Apache License, Version 2.0. See the
|
|
413
|
+
- Modifications and additions made in this fork are licensed under the Apache License, Version 2.0. See the [LICENSE](./LICENSE) file for the full license text.
|
|
394
414
|
|
|
395
415
|
We have documented these changes for clarity and to ensure transparency with our user and contributor community. For more details, please see the [NOTICE](./NOTICE.md) file.
|
|
396
416
|
|
|
@@ -3,29 +3,39 @@
|
|
|
3
3
|

|
|
4
4
|
[](https://badge.fury.io/py/autogen)
|
|
5
5
|
[](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml)
|
|
6
|
-

|
|
7
7
|
[](https://discord.gg/pAbnFJrkgZ)
|
|
8
|
-
[](https://x.com/ag2oss)
|
|
9
9
|
|
|
10
10
|
<!-- [](https://badge.fury.io/nu/AutoGen.Core) -->
|
|
11
11
|
|
|
12
12
|
# [AG2](https://github.com/ag2ai/ag2)
|
|
13
13
|
|
|
14
|
+
## Key Features
|
|
15
|
+
- 🤖 Multi-Agent Framework - Build and orchestrate AI agent interactions
|
|
16
|
+
- 🔧 Flexible Integration - Support for various LLMs (OpenAI, Anthropic, Gemini, etc.)
|
|
17
|
+
- 🛠 Tool Usage - Agents can use external tools and execute code
|
|
18
|
+
- 👥 Human-in-the-Loop - Seamless human participation when needed
|
|
19
|
+
- 🔄 Rich Orchestration Patterns - Agents can be organized in any form you like
|
|
20
|
+
- 🎯 Future-Oriented - Designed for solving difficult problems and harnessing latest and future technology
|
|
21
|
+
|
|
22
|
+
[📚 Documentation](https://docs.ag2.ai/) | [💡 Examples](https://github.com/ag2ai/build-with-ag2) | [🤝 Contributing](https://docs.ag2.ai/docs/contributor-guide/contributing)
|
|
23
|
+
|
|
14
24
|
[📚 Cite paper](#related-papers).
|
|
25
|
+
|
|
15
26
|
<!-- <p align="center">
|
|
16
27
|
<img src="https://github.com/ag2ai/ag2/blob/main/website/static/img/flaml.svg" width=200>
|
|
17
28
|
<br>
|
|
18
29
|
</p> -->
|
|
19
30
|
|
|
20
|
-
>
|
|
31
|
+
> **🎉 IMPORTANT**
|
|
21
32
|
>
|
|
22
|
-
>
|
|
33
|
+
> 🔥 🎉 **Nov 11, 2024:** We are evolving AutoGen into **AG2**!
|
|
23
34
|
> A new organization [AG2AI](https://github.com/ag2ai) is created to host the development of AG2 and related projects with open governance. Check [AG2's new look](https://ag2.ai/).
|
|
24
35
|
>
|
|
25
36
|
> We invite collaborators from all organizations and individuals to join the development.
|
|
26
37
|
|
|
27
|
-
|
|
28
|
-
:fire: :tada: AG2 is available via `pyautogen` (or its alias `autogen` or `ag2`) on PyPI!
|
|
38
|
+
🔥 🎉 AG2 is available via `pyautogen` (or its alias `autogen` or `ag2`) on PyPI!
|
|
29
39
|
|
|
30
40
|
```
|
|
31
41
|
pip install pyautogen
|
|
@@ -34,62 +44,63 @@ pip install pyautogen
|
|
|
34
44
|
📄 **License:**
|
|
35
45
|
We adopt the Apache 2.0 license from v0.3. This enhances our commitment to open-source collaboration while providing additional protections for contributors and users alike.
|
|
36
46
|
|
|
47
|
+
🎉 May 29, 2024: DeepLearning.ai launched a new short course [AI Agentic Design Patterns with AutoGen](https://www.deeplearning.ai/short-courses/ai-agentic-design-patterns-with-autogen), made in collaboration with Microsoft and Penn State University, and taught by AutoGen creators [Chi Wang](https://github.com/sonichi) and [Qingyun Wu](https://github.com/qingyun-wu).
|
|
37
48
|
|
|
38
|
-
|
|
49
|
+
🎉 May 24, 2024: Foundation Capital published an article on [Forbes: The Promise of Multi-Agent AI](https://www.forbes.com/sites/joannechen/2024/05/24/the-promise-of-multi-agent-ai/?sh=2c1e4f454d97) and a video [AI in the Real World Episode 2: Exploring Multi-Agent AI and AutoGen with Chi Wang](https://www.youtube.com/watch?v=RLwyXRVvlNk).
|
|
39
50
|
|
|
40
|
-
|
|
51
|
+
🎉 May 13, 2024: [The Economist](https://www.economist.com/science-and-technology/2024/05/13/todays-ai-models-are-impressive-teams-of-them-will-be-formidable) published an article about multi-agent systems (MAS) following a January 2024 interview with [Chi Wang](https://github.com/sonichi).
|
|
41
52
|
|
|
42
|
-
|
|
53
|
+
🎉 May 11, 2024: [AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation](https://openreview.net/pdf?id=uAjxFFing2) received the best paper award at the [ICLR 2024 LLM Agents Workshop](https://llmagents.github.io/).
|
|
43
54
|
|
|
44
|
-
|
|
55
|
+
<!-- 🎉 Apr 26, 2024: [AutoGen.NET](https://docs.ag2.ai/ag2-for-net/) is available for .NET developers! -->
|
|
45
56
|
|
|
46
|
-
|
|
57
|
+
🎉 Apr 17, 2024: Andrew Ng cited AutoGen in [The Batch newsletter](https://www.deeplearning.ai/the-batch/issue-245/) and [What's next for AI agentic workflows](https://youtu.be/sal78ACtGTc?si=JduUzN_1kDnMq0vF) at Sequoia Capital's AI Ascent (Mar 26).
|
|
47
58
|
|
|
48
|
-
|
|
59
|
+
🎉 Mar 3, 2024: What's new in AutoGen? 📰[Blog](https://docs.ag2.ai/blog/2024-03-03-AutoGen-Update); 📺[Youtube](https://www.youtube.com/watch?v=j_mtwQiaLGU).
|
|
49
60
|
|
|
50
|
-
|
|
61
|
+
<!-- 🎉 Mar 1, 2024: the first AutoGen multi-agent experiment on the challenging [GAIA](https://huggingface.co/spaces/gaia-benchmark/leaderboard) benchmark achieved the No. 1 accuracy in all the three levels. -->
|
|
51
62
|
|
|
52
|
-
<!--
|
|
63
|
+
<!-- 🎉 Jan 30, 2024: AutoGen is highlighted by Peter Lee in Microsoft Research Forum [Keynote](https://t.co/nUBSjPDjqD). -->
|
|
53
64
|
|
|
54
|
-
|
|
65
|
+
🎉 Dec 31, 2023: [AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework](https://arxiv.org/abs/2308.08155) is selected by [TheSequence: My Five Favorite AI Papers of 2023](https://thesequence.substack.com/p/my-five-favorite-ai-papers-of-2023).
|
|
55
66
|
|
|
56
|
-
|
|
67
|
+
<!-- 🔥 Nov 24: pyautogen [v0.2](https://github.com/ag2ai/ag2/releases/tag/v0.2.0) is released with many updates and new features compared to v0.1.1. It switches to using openai-python v1. Please read the [migration guide](https://docs.ag2.ai/docs/installation/Installation). -->
|
|
57
68
|
|
|
58
|
-
<!--
|
|
69
|
+
<!-- 🔥 Nov 11: OpenAI's Assistants are available in AutoGen and interoperatable with other AutoGen agents! Checkout our [blogpost](https://docs.ag2.ai/blog/2023-11-13-OAI-assistants) for details and examples. -->
|
|
59
70
|
|
|
60
|
-
|
|
71
|
+
🎉 Nov 8, 2023: AutoGen is selected into [Open100: Top 100 Open Source achievements](https://www.benchcouncil.org/evaluation/opencs/annual.html) 35 days after spinoff from [FLAML](https://github.com/microsoft/FLAML).
|
|
61
72
|
|
|
62
|
-
|
|
73
|
+
<!-- 🎉 Nov 6, 2023: AutoGen is mentioned by Satya Nadella in a [fireside chat](https://youtu.be/0pLBvgYtv6U). -->
|
|
63
74
|
|
|
64
|
-
<!--
|
|
75
|
+
<!-- 🎉 Nov 1, 2023: AutoGen is the top trending repo on GitHub in October 2023. -->
|
|
65
76
|
|
|
66
|
-
<!--
|
|
77
|
+
<!-- 🎉 Oct 03, 2023: AutoGen spins off from [FLAML](https://github.com/microsoft/FLAML) on GitHub. -->
|
|
67
78
|
|
|
68
|
-
<!--
|
|
79
|
+
<!-- 🎉 Aug 16: Paper about AutoGen on [arxiv](https://arxiv.org/abs/2308.08155). -->
|
|
69
80
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
:tada: Mar 29, 2023: AutoGen is first created in [FLAML](https://github.com/microsoft/FLAML).
|
|
81
|
+
🎉 Mar 29, 2023: AutoGen is first created in [FLAML](https://github.com/microsoft/FLAML).
|
|
73
82
|
|
|
74
83
|
<!--
|
|
75
|
-
|
|
84
|
+
🔥 FLAML is highlighted in OpenAI's [cookbook](https://github.com/openai/openai-cookbook#related-resources-from-around-the-web).
|
|
76
85
|
|
|
77
|
-
|
|
86
|
+
🔥 [autogen](https://docs.ag2.ai/) is released with support for ChatGPT and GPT-4, based on [Cost-Effective Hyperparameter Optimization for Large Language Model Generation Inference](https://arxiv.org/abs/2303.04673).
|
|
78
87
|
|
|
79
|
-
|
|
88
|
+
🔥 FLAML supports Code-First AutoML & Tuning – Private Preview in [Microsoft Fabric Data Science](https://learn.microsoft.com/en-us/fabric/data-science/). -->
|
|
80
89
|
|
|
81
90
|
## What is AG2
|
|
82
91
|
|
|
83
|
-
AG2 (formerly AutoGen) is an open-source
|
|
92
|
+
AG2 (formerly AutoGen) is an open-source AgentOS for building AI agents and facilitating cooperation among multiple agents to solve tasks. AG2 provides fundamental building blocks needed to create, deploy, and manage AI agents that can work together to solve complex problems.
|
|
93
|
+
|
|
94
|
+
### Core Concepts
|
|
95
|
+
- **Agents**: Stateful entities that can send messages, receive messages, and generate replies using underlying capabilities powered by LLMs, non-LLM tools, or human inputs. Depending on the underlying capability, an agent may reason, plan, execute tasks or involve other agents before generating a reply.
|
|
96
|
+
- **Conversations**: Structured communication patterns between agents.
|
|
84
97
|
|
|
85
98
|
**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.
|
|
86
99
|
|
|
87
100
|
The project is currently maintained by a [dynamic group of volunteers](MAINTAINERS.md) from several organizations. Contact project administrators Chi Wang and Qingyun Wu via [support@ag2.ai](mailto:support@ag2.ai) if you are interested in becoming a maintainer.
|
|
88
101
|
|
|
89
|
-
|
|
90
102
|

|
|
91
103
|
|
|
92
|
-
|
|
93
104
|
<p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
|
|
94
105
|
<a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
|
|
95
106
|
↑ Back to Top ↑
|
|
@@ -101,15 +112,17 @@ The project is currently maintained by a [dynamic group of volunteers](MAINTAINE
|
|
|
101
112
|
-->
|
|
102
113
|
|
|
103
114
|
## Quickstart
|
|
115
|
+
|
|
104
116
|
The easiest way to start playing is
|
|
117
|
+
|
|
105
118
|
1. Click below to use the GitHub Codespace
|
|
106
119
|
|
|
107
|
-
|
|
120
|
+
[](https://codespaces.new/ag2ai/ag2?quickstart=1)
|
|
108
121
|
|
|
109
|
-
|
|
110
|
-
|
|
122
|
+
2. Copy OAI_CONFIG_LIST_sample to ./notebook folder, name to OAI_CONFIG_LIST, and set the correct configuration.
|
|
123
|
+
3. Start playing with the notebooks!
|
|
111
124
|
|
|
112
|
-
|
|
125
|
+
_NOTE_: OAI_CONFIG_LIST_sample lists gpt-4o as the default model. If you use a different model, you may need to revise various system prompts (especially if using weaker models like gpt-4o-mini). Proceed with caution when updating this default and be aware of additional risks related to alignment and safety.
|
|
113
126
|
|
|
114
127
|
<p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
|
|
115
128
|
<a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
|
|
@@ -121,7 +134,7 @@ The easiest way to start playing is
|
|
|
121
134
|
|
|
122
135
|
### Option 1. Install and Run AG2 in Docker
|
|
123
136
|
|
|
124
|
-
Find detailed instructions for users [here](https://docs.ag2.ai/docs/installation/Docker#step-1-install-docker), and for developers [here](https://docs.ag2.ai/docs/contributor-guide/
|
|
137
|
+
Find detailed instructions for users [here](https://docs.ag2.ai/docs/installation/Docker#step-1-install-docker), and for developers [here](https://docs.ag2.ai/docs/contributor-guide/setup-development-environment).
|
|
125
138
|
|
|
126
139
|
### Option 2. Install AG2 Locally
|
|
127
140
|
|
|
@@ -144,7 +157,7 @@ Find more options in [Installation](https://docs.ag2.ai/docs/Installation#option
|
|
|
144
157
|
|
|
145
158
|
Even if you are installing and running AG2 locally outside of docker, the recommendation and default behavior of agents is to perform [code execution](https://docs.ag2.ai/docs/FAQ#if-you-want-to-run-code-execution-in-docker) in docker. Find more instructions and how to change the default behaviour [here](https://docs.ag2.ai/docs/FAQ#if-you-want-to-run-code-execution-locally).
|
|
146
159
|
|
|
147
|
-
For LLM inference configurations, check the [FAQs](https://docs.ag2.ai/docs/
|
|
160
|
+
For LLM inference configurations, check the [FAQs](https://docs.ag2.ai/docs/user-guide/advanced-concepts/llm-configuration-deep-dive#llm-configuration).
|
|
148
161
|
|
|
149
162
|
<p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
|
|
150
163
|
<a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
|
|
@@ -168,7 +181,7 @@ For [example](https://github.com/ag2ai/ag2/blob/main/test/twoagent.py),
|
|
|
168
181
|
```python
|
|
169
182
|
from autogen import AssistantAgent, UserProxyAgent, config_list_from_json
|
|
170
183
|
# Load LLM inference endpoints from an env variable or a file
|
|
171
|
-
# See https://docs.ag2.ai/docs/
|
|
184
|
+
# See https://docs.ag2.ai/docs/user-guide/advanced-concepts/llm-configuration-deep-dive#llm-configuration
|
|
172
185
|
# and OAI_CONFIG_LIST_sample
|
|
173
186
|
config_list = config_list_from_json(env_or_file="OAI_CONFIG_LIST")
|
|
174
187
|
# You can also set config_list directly as a list, for example, config_list = [{'model': 'gpt-4o', 'api_key': '<your OpenAI API key here>'},]
|
|
@@ -189,7 +202,6 @@ The figure below shows an example conversation flow with AG2.
|
|
|
189
202
|
|
|
190
203
|

|
|
191
204
|
|
|
192
|
-
|
|
193
205
|
Alternatively, the [sample code](https://github.com/ag2ai/build-with-ag2/blob/main/samples/simple_chat.py) here allows a user to chat with an AG2 agent in ChatGPT style.
|
|
194
206
|
Please find more [code examples](https://docs.ag2.ai/docs/Examples#automated-multi-agent-chat) for this feature.
|
|
195
207
|
|
|
@@ -201,7 +213,7 @@ Please find more [code examples](https://docs.ag2.ai/docs/Examples#automated-mul
|
|
|
201
213
|
|
|
202
214
|
## Enhanced LLM Inferences
|
|
203
215
|
|
|
204
|
-
AG2 also helps maximize the utility out of the expensive LLMs such as gpt-4o. It offers
|
|
216
|
+
AG2 also helps maximize the utility out of the expensive LLMs such as gpt-4o. It offers enhanced LLM inference with powerful functionalities like caching, error handling, multi-config inference and templating.
|
|
205
217
|
|
|
206
218
|
<!-- For example, you can optimize generations by LLM with your own tuning data, success metrics, and budgets.
|
|
207
219
|
|
|
@@ -251,7 +263,6 @@ In addition, you can find:
|
|
|
251
263
|
Explore detailed implementations with sample code and applications to help you get started with AG2.
|
|
252
264
|
[Cookbook](https://github.com/ag2ai/build-with-ag2)
|
|
253
265
|
|
|
254
|
-
|
|
255
266
|
## Related Papers
|
|
256
267
|
|
|
257
268
|
[AutoGen](https://arxiv.org/abs/2308.08155)
|
|
@@ -301,6 +312,7 @@ Explore detailed implementations with sample code and applications to help you g
|
|
|
301
312
|
```
|
|
302
313
|
|
|
303
314
|
[StateFlow](https://arxiv.org/abs/2403.11322)
|
|
315
|
+
|
|
304
316
|
```
|
|
305
317
|
@article{wu2024stateflow,
|
|
306
318
|
title={StateFlow: Enhancing LLM Task-Solving through State-Driven Workflows},
|
|
@@ -317,6 +329,7 @@ Explore detailed implementations with sample code and applications to help you g
|
|
|
317
329
|
</p>
|
|
318
330
|
|
|
319
331
|
## Contributors Wall
|
|
332
|
+
|
|
320
333
|
<a href="https://github.com/ag2ai/ag2/graphs/contributors">
|
|
321
334
|
<img src="https://contrib.rocks/image?repo=ag2ai/ag2&max=204" />
|
|
322
335
|
</a>
|
|
@@ -328,12 +341,13 @@ Explore detailed implementations with sample code and applications to help you g
|
|
|
328
341
|
</p>
|
|
329
342
|
|
|
330
343
|
## License
|
|
344
|
+
|
|
331
345
|
This project is licensed under the [Apache License, Version 2.0 (Apache-2.0)](./LICENSE).
|
|
332
346
|
|
|
333
347
|
This project is a spin-off of [AutoGen](https://github.com/microsoft/autogen) and contains code under two licenses:
|
|
334
348
|
|
|
335
|
-
- The original code from https://github.com/microsoft/autogen is licensed under the MIT License.
|
|
349
|
+
- The original code from https://github.com/microsoft/autogen is licensed under the MIT License. See the [LICENSE_original_MIT](./license_original/LICENSE_original_MIT) file for details.
|
|
336
350
|
|
|
337
|
-
- Modifications and additions made in this fork are licensed under the Apache License, Version 2.0. See the
|
|
351
|
+
- Modifications and additions made in this fork are licensed under the Apache License, Version 2.0. See the [LICENSE](./LICENSE) file for the full license text.
|
|
338
352
|
|
|
339
353
|
We have documented these changes for clarity and to ensure transparency with our user and contributor community. For more details, please see the [NOTICE](./NOTICE.md) file.
|