ag2 0.3.2b2__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.

Files changed (127) hide show
  1. ag2-0.3.2b2/LICENSE +201 -0
  2. ag2-0.3.2b2/NOTICE.md +19 -0
  3. ag2-0.3.2b2/PKG-INFO +391 -0
  4. ag2-0.3.2b2/README.md +344 -0
  5. ag2-0.3.2b2/ag2.egg-info/PKG-INFO +391 -0
  6. ag2-0.3.2b2/ag2.egg-info/SOURCES.txt +125 -0
  7. ag2-0.3.2b2/ag2.egg-info/dependency_links.txt +1 -0
  8. ag2-0.3.2b2/ag2.egg-info/requires.txt +155 -0
  9. ag2-0.3.2b2/ag2.egg-info/top_level.txt +1 -0
  10. ag2-0.3.2b2/autogen/__init__.py +17 -0
  11. ag2-0.3.2b2/autogen/_pydantic.py +116 -0
  12. ag2-0.3.2b2/autogen/agentchat/__init__.py +26 -0
  13. ag2-0.3.2b2/autogen/agentchat/agent.py +142 -0
  14. ag2-0.3.2b2/autogen/agentchat/assistant_agent.py +85 -0
  15. ag2-0.3.2b2/autogen/agentchat/chat.py +306 -0
  16. ag2-0.3.2b2/autogen/agentchat/contrib/__init__.py +0 -0
  17. ag2-0.3.2b2/autogen/agentchat/contrib/agent_builder.py +785 -0
  18. ag2-0.3.2b2/autogen/agentchat/contrib/agent_optimizer.py +450 -0
  19. ag2-0.3.2b2/autogen/agentchat/contrib/capabilities/__init__.py +0 -0
  20. ag2-0.3.2b2/autogen/agentchat/contrib/capabilities/agent_capability.py +21 -0
  21. ag2-0.3.2b2/autogen/agentchat/contrib/capabilities/generate_images.py +297 -0
  22. ag2-0.3.2b2/autogen/agentchat/contrib/capabilities/teachability.py +406 -0
  23. ag2-0.3.2b2/autogen/agentchat/contrib/capabilities/text_compressors.py +72 -0
  24. ag2-0.3.2b2/autogen/agentchat/contrib/capabilities/transform_messages.py +92 -0
  25. ag2-0.3.2b2/autogen/agentchat/contrib/capabilities/transforms.py +565 -0
  26. ag2-0.3.2b2/autogen/agentchat/contrib/capabilities/transforms_util.py +120 -0
  27. ag2-0.3.2b2/autogen/agentchat/contrib/capabilities/vision_capability.py +217 -0
  28. ag2-0.3.2b2/autogen/agentchat/contrib/gpt_assistant_agent.py +545 -0
  29. ag2-0.3.2b2/autogen/agentchat/contrib/graph_rag/__init__.py +0 -0
  30. ag2-0.3.2b2/autogen/agentchat/contrib/graph_rag/document.py +24 -0
  31. ag2-0.3.2b2/autogen/agentchat/contrib/graph_rag/falkor_graph_query_engine.py +76 -0
  32. ag2-0.3.2b2/autogen/agentchat/contrib/graph_rag/graph_query_engine.py +50 -0
  33. ag2-0.3.2b2/autogen/agentchat/contrib/graph_rag/graph_rag_capability.py +56 -0
  34. ag2-0.3.2b2/autogen/agentchat/contrib/img_utils.py +390 -0
  35. ag2-0.3.2b2/autogen/agentchat/contrib/llamaindex_conversable_agent.py +114 -0
  36. ag2-0.3.2b2/autogen/agentchat/contrib/llava_agent.py +176 -0
  37. ag2-0.3.2b2/autogen/agentchat/contrib/math_user_proxy_agent.py +471 -0
  38. ag2-0.3.2b2/autogen/agentchat/contrib/multimodal_conversable_agent.py +128 -0
  39. ag2-0.3.2b2/autogen/agentchat/contrib/qdrant_retrieve_user_proxy_agent.py +325 -0
  40. ag2-0.3.2b2/autogen/agentchat/contrib/retrieve_assistant_agent.py +56 -0
  41. ag2-0.3.2b2/autogen/agentchat/contrib/retrieve_user_proxy_agent.py +701 -0
  42. ag2-0.3.2b2/autogen/agentchat/contrib/society_of_mind_agent.py +203 -0
  43. ag2-0.3.2b2/autogen/agentchat/contrib/text_analyzer_agent.py +76 -0
  44. ag2-0.3.2b2/autogen/agentchat/contrib/vectordb/__init__.py +0 -0
  45. ag2-0.3.2b2/autogen/agentchat/contrib/vectordb/base.py +243 -0
  46. ag2-0.3.2b2/autogen/agentchat/contrib/vectordb/chromadb.py +326 -0
  47. ag2-0.3.2b2/autogen/agentchat/contrib/vectordb/mongodb.py +559 -0
  48. ag2-0.3.2b2/autogen/agentchat/contrib/vectordb/pgvectordb.py +958 -0
  49. ag2-0.3.2b2/autogen/agentchat/contrib/vectordb/qdrant.py +334 -0
  50. ag2-0.3.2b2/autogen/agentchat/contrib/vectordb/utils.py +126 -0
  51. ag2-0.3.2b2/autogen/agentchat/contrib/web_surfer.py +305 -0
  52. ag2-0.3.2b2/autogen/agentchat/conversable_agent.py +2904 -0
  53. ag2-0.3.2b2/autogen/agentchat/groupchat.py +1666 -0
  54. ag2-0.3.2b2/autogen/agentchat/user_proxy_agent.py +109 -0
  55. ag2-0.3.2b2/autogen/agentchat/utils.py +207 -0
  56. ag2-0.3.2b2/autogen/browser_utils.py +291 -0
  57. ag2-0.3.2b2/autogen/cache/__init__.py +10 -0
  58. ag2-0.3.2b2/autogen/cache/abstract_cache_base.py +78 -0
  59. ag2-0.3.2b2/autogen/cache/cache.py +182 -0
  60. ag2-0.3.2b2/autogen/cache/cache_factory.py +85 -0
  61. ag2-0.3.2b2/autogen/cache/cosmos_db_cache.py +150 -0
  62. ag2-0.3.2b2/autogen/cache/disk_cache.py +109 -0
  63. ag2-0.3.2b2/autogen/cache/in_memory_cache.py +61 -0
  64. ag2-0.3.2b2/autogen/cache/redis_cache.py +128 -0
  65. ag2-0.3.2b2/autogen/code_utils.py +745 -0
  66. ag2-0.3.2b2/autogen/coding/__init__.py +22 -0
  67. ag2-0.3.2b2/autogen/coding/base.py +113 -0
  68. ag2-0.3.2b2/autogen/coding/docker_commandline_code_executor.py +262 -0
  69. ag2-0.3.2b2/autogen/coding/factory.py +45 -0
  70. ag2-0.3.2b2/autogen/coding/func_with_reqs.py +203 -0
  71. ag2-0.3.2b2/autogen/coding/jupyter/__init__.py +22 -0
  72. ag2-0.3.2b2/autogen/coding/jupyter/base.py +32 -0
  73. ag2-0.3.2b2/autogen/coding/jupyter/docker_jupyter_server.py +164 -0
  74. ag2-0.3.2b2/autogen/coding/jupyter/embedded_ipython_code_executor.py +182 -0
  75. ag2-0.3.2b2/autogen/coding/jupyter/jupyter_client.py +224 -0
  76. ag2-0.3.2b2/autogen/coding/jupyter/jupyter_code_executor.py +161 -0
  77. ag2-0.3.2b2/autogen/coding/jupyter/local_jupyter_server.py +168 -0
  78. ag2-0.3.2b2/autogen/coding/local_commandline_code_executor.py +410 -0
  79. ag2-0.3.2b2/autogen/coding/markdown_code_extractor.py +44 -0
  80. ag2-0.3.2b2/autogen/coding/utils.py +57 -0
  81. ag2-0.3.2b2/autogen/exception_utils.py +46 -0
  82. ag2-0.3.2b2/autogen/extensions/__init__.py +0 -0
  83. ag2-0.3.2b2/autogen/formatting_utils.py +76 -0
  84. ag2-0.3.2b2/autogen/function_utils.py +362 -0
  85. ag2-0.3.2b2/autogen/graph_utils.py +148 -0
  86. ag2-0.3.2b2/autogen/io/__init__.py +15 -0
  87. ag2-0.3.2b2/autogen/io/base.py +105 -0
  88. ag2-0.3.2b2/autogen/io/console.py +43 -0
  89. ag2-0.3.2b2/autogen/io/websockets.py +213 -0
  90. ag2-0.3.2b2/autogen/logger/__init__.py +11 -0
  91. ag2-0.3.2b2/autogen/logger/base_logger.py +140 -0
  92. ag2-0.3.2b2/autogen/logger/file_logger.py +287 -0
  93. ag2-0.3.2b2/autogen/logger/logger_factory.py +29 -0
  94. ag2-0.3.2b2/autogen/logger/logger_utils.py +42 -0
  95. ag2-0.3.2b2/autogen/logger/sqlite_logger.py +459 -0
  96. ag2-0.3.2b2/autogen/math_utils.py +356 -0
  97. ag2-0.3.2b2/autogen/oai/__init__.py +33 -0
  98. ag2-0.3.2b2/autogen/oai/anthropic.py +428 -0
  99. ag2-0.3.2b2/autogen/oai/bedrock.py +600 -0
  100. ag2-0.3.2b2/autogen/oai/cerebras.py +264 -0
  101. ag2-0.3.2b2/autogen/oai/client.py +1148 -0
  102. ag2-0.3.2b2/autogen/oai/client_utils.py +167 -0
  103. ag2-0.3.2b2/autogen/oai/cohere.py +453 -0
  104. ag2-0.3.2b2/autogen/oai/completion.py +1216 -0
  105. ag2-0.3.2b2/autogen/oai/gemini.py +469 -0
  106. ag2-0.3.2b2/autogen/oai/groq.py +281 -0
  107. ag2-0.3.2b2/autogen/oai/mistral.py +279 -0
  108. ag2-0.3.2b2/autogen/oai/ollama.py +576 -0
  109. ag2-0.3.2b2/autogen/oai/openai_utils.py +810 -0
  110. ag2-0.3.2b2/autogen/oai/together.py +343 -0
  111. ag2-0.3.2b2/autogen/retrieve_utils.py +487 -0
  112. ag2-0.3.2b2/autogen/runtime_logging.py +163 -0
  113. ag2-0.3.2b2/autogen/token_count_utils.py +257 -0
  114. ag2-0.3.2b2/autogen/types.py +20 -0
  115. ag2-0.3.2b2/autogen/version.py +7 -0
  116. ag2-0.3.2b2/pyproject.toml +95 -0
  117. ag2-0.3.2b2/setup.cfg +4 -0
  118. ag2-0.3.2b2/setup.py +139 -0
  119. ag2-0.3.2b2/test/test_browser_utils.py +182 -0
  120. ag2-0.3.2b2/test/test_code_utils.py +619 -0
  121. ag2-0.3.2b2/test/test_function_utils.py +415 -0
  122. ag2-0.3.2b2/test/test_graph_utils.py +172 -0
  123. ag2-0.3.2b2/test/test_logging.py +303 -0
  124. ag2-0.3.2b2/test/test_notebook.py +143 -0
  125. ag2-0.3.2b2/test/test_pydantic.py +47 -0
  126. ag2-0.3.2b2/test/test_retrieve_utils.py +285 -0
  127. ag2-0.3.2b2/test/test_token_count.py +149 -0
ag2-0.3.2b2/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright ag2ai organization, i.e., https://github.com/ag2ai, owners.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
ag2-0.3.2b2/NOTICE.md ADDED
@@ -0,0 +1,19 @@
1
+ ## NOTICE
2
+
3
+ Copyright (c) 2023-2024, Owners of https://github.com/ag2ai
4
+
5
+ This project is a fork of https://github.com/microsoft/autogen.
6
+
7
+ The [original project](https://github.com/microsoft/autogen) is licensed under the MIT License as detailed in [LICENSE_original_MIT](./license_original/LICENSE_original_MIT). The fork was created from version v0.2.35 of the original project.
8
+
9
+
10
+ This project, i.e., https://github.com/ag2ai/ag2, is licensed under the Apache License, Version 2.0 as detailed in [LICENSE](./LICENSE)
11
+
12
+
13
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
14
+
15
+ Ongoing MIT-licensed contributions:
16
+ This project regularly incorporates code merged from the [original repository](https://github.com/microsoft/autogen) after the initial fork. This merged code remains under the original MIT license. For specific details on merged commits, please refer to the project's commit history.
17
+ The MIT license applies to portions of code originating from the [original repository](https://github.com/microsoft/autogen) as described above.
18
+
19
+ Last updated: 08/25/2024
ag2-0.3.2b2/PKG-INFO ADDED
@@ -0,0 +1,391 @@
1
+ Metadata-Version: 2.1
2
+ Name: ag2
3
+ Version: 0.3.2b2
4
+ Summary: A programming framework for agentic AI
5
+ Home-page: https://github.com/ag2ai/ag2
6
+ Author: Chi Wang & Qingyun Wu
7
+ Author-email: support@ag2.ai
8
+ License: Apache Software License 2.0
9
+ Platform: UNKNOWN
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: Apache Software License
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.8,<3.13
14
+ Description-Content-Type: text/markdown
15
+ Provides-Extra: anthropic
16
+ Provides-Extra: autobuild
17
+ Provides-Extra: bedrock
18
+ Provides-Extra: blendsearch
19
+ Provides-Extra: cerebras
20
+ Provides-Extra: cohere
21
+ Provides-Extra: cosmosdb
22
+ Provides-Extra: gemini
23
+ Provides-Extra: graph
24
+ Provides-Extra: graph_rag_falkor_db
25
+ Provides-Extra: groq
26
+ Provides-Extra: jupyter-executor
27
+ Provides-Extra: lmm
28
+ Provides-Extra: long-context
29
+ Provides-Extra: mathchat
30
+ Provides-Extra: mistral
31
+ Provides-Extra: ollama
32
+ Provides-Extra: redis
33
+ Provides-Extra: retrievechat
34
+ Provides-Extra: retrievechat-mongodb
35
+ Provides-Extra: retrievechat-pgvector
36
+ Provides-Extra: retrievechat-qdrant
37
+ Provides-Extra: teachable
38
+ Provides-Extra: test
39
+ Provides-Extra: together
40
+ Provides-Extra: types
41
+ Provides-Extra: websockets
42
+ Provides-Extra: websurfer
43
+ License-File: LICENSE
44
+ License-File: NOTICE.md
45
+
46
+ <a name="readme-top"></a>
47
+
48
+ [![PyPI version](https://badge.fury.io/py/autogen.svg)](https://badge.fury.io/py/autogen)
49
+ [![Build](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml/badge.svg)](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml)
50
+ ![Python Version](https://img.shields.io/badge/3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue)
51
+ [![Discord](https://img.shields.io/discord/1153072414184452236?logo=discord&style=flat)](https://discord.gg/pAbnFJrkgZ)
52
+ [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40ag2ai)](https://x.com/ag2ai)
53
+
54
+ <!-- [![NuGet version](https://badge.fury.io/nu/AutoGen.Core.svg)](https://badge.fury.io/nu/AutoGen.Core) -->
55
+
56
+ # [AG2](https://github.com/ag2ai/ag2)
57
+
58
+ [📚 Cite paper](#related-papers).
59
+ <!-- <p align="center">
60
+ <img src="https://github.com/ag2ai/ag2/blob/main/website/static/img/flaml.svg" width=200>
61
+ <br>
62
+ </p> -->
63
+
64
+ > [!IMPORTANT]
65
+ >
66
+ > :fire: :tada: Nov 11, 2024: We are evolving AutoGen into AG2! A new organization [ag2ai](https://github.com/ag2ai) is created to host the development of AG2 and related projects with open governance. We invite collaborators from all organizations and individuals to join the development.
67
+
68
+
69
+ :fire: :tada: AG2 is available via `ag2` (or its alias `autogen` or `pyautogen`) on PyPI! Starting with version 0.3.2, you can now install AG2 using:
70
+ ```
71
+ pip install ag2
72
+ ```
73
+ or
74
+ ```
75
+ pip install pyautogen
76
+ ```
77
+ or
78
+ ```
79
+ pip install autogen
80
+ ```
81
+
82
+
83
+ 📄 **License:**
84
+ 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.
85
+
86
+
87
+ :tada: 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).
88
+
89
+ :tada: 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).
90
+
91
+ :tada: 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).
92
+
93
+ :tada: 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/).
94
+
95
+ <!-- :tada: Apr 26, 2024: [AutoGen.NET](https://ag2ai.github.io/ag2-for-net/) is available for .NET developers! -->
96
+
97
+ :tada: 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).
98
+
99
+ :tada: Mar 3, 2024: What's new in AutoGen? 📰[Blog](https://ag2ai.github.io/ag2/blog/2024/03/03/AutoGen-Update); 📺[Youtube](https://www.youtube.com/watch?v=j_mtwQiaLGU).
100
+
101
+ <!-- :tada: 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. -->
102
+
103
+ <!-- :tada: Jan 30, 2024: AutoGen is highlighted by Peter Lee in Microsoft Research Forum [Keynote](https://t.co/nUBSjPDjqD). -->
104
+
105
+ :tada: 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).
106
+
107
+ <!-- :fire: Nov 24: pyautogen [v0.2](https://github.com/microsoft/autogen/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://ag2ai.github.io/ag2/docs/Installation#python). -->
108
+
109
+ <!-- :fire: Nov 11: OpenAI's Assistants are available in AutoGen and interoperatable with other AutoGen agents! Checkout our [blogpost](https://ag2ai.github.io/ag2/blog/2023/11/13/OAI-assistants) for details and examples. -->
110
+
111
+ :tada: 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).
112
+
113
+ <!-- :tada: Nov 6, 2023: AutoGen is mentioned by Satya Nadella in a [fireside chat](https://youtu.be/0pLBvgYtv6U). -->
114
+
115
+ <!-- :tada: Nov 1, 2023: AutoGen is the top trending repo on GitHub in October 2023. -->
116
+
117
+ <!-- :tada: Oct 03, 2023: AutoGen spins off from [FLAML](https://github.com/microsoft/FLAML) on GitHub. -->
118
+
119
+ <!-- :tada: Aug 16: Paper about AutoGen on [arxiv](https://arxiv.org/abs/2308.08155). -->
120
+
121
+ :tada: Mar 29, 2023: AutoGen is first created in [FLAML](https://github.com/microsoft/FLAML).
122
+
123
+ <!--
124
+ :fire: FLAML is highlighted in OpenAI's [cookbook](https://github.com/openai/openai-cookbook#related-resources-from-around-the-web).
125
+
126
+ :fire: [autogen](https://ag2ai.github.io/ag2/) 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).
127
+
128
+ :fire: FLAML supports Code-First AutoML & Tuning – Private Preview in [Microsoft Fabric Data Science](https://learn.microsoft.com/en-us/fabric/data-science/). -->
129
+
130
+ ## What is AG2
131
+
132
+ AG2 (formally AutoGen) is an open-source programming framework for building AI agents and facilitating cooperation among multiple agents to solve tasks. AG2 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.
133
+
134
+ **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.
135
+
136
+ 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.
137
+
138
+
139
+ ![AutoGen Overview](./website/static/img/autogen_agentchat.png)
140
+
141
+
142
+
143
+ <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
144
+ <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
145
+ ↑ Back to Top ↑
146
+ </a>
147
+ </p>
148
+
149
+ <!--
150
+ ## Roadmaps
151
+ -->
152
+
153
+ ## Quickstart
154
+ The easiest way to start playing is
155
+ 1. Click below to use the GitHub Codespace
156
+
157
+ [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/ag2ai/ag2?quickstart=1)
158
+
159
+ 2. Copy OAI_CONFIG_LIST_sample to ./notebook folder, name to OAI_CONFIG_LIST, and set the correct configuration.
160
+ 3. Start playing with the notebooks!
161
+
162
+ *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.
163
+
164
+ <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
165
+ <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
166
+ ↑ Back to Top ↑
167
+ </a>
168
+ </p>
169
+
170
+ ## [Installation](https://ag2ai.github.io/ag2/docs/Installation)
171
+
172
+ ### Option 1. Install and Run AG2 in Docker
173
+
174
+ Find detailed instructions for users [here](https://ag2ai.github.io/ag2/docs/installation/Docker#step-1-install-docker), and for developers [here](https://ag2ai.github.io/ag2/docs/Contribute#docker-for-development).
175
+
176
+ ### Option 2. Install AG2 Locally
177
+
178
+ AG2 requires **Python version >= 3.8, < 3.13**. It can be installed from pip:
179
+
180
+ ```bash
181
+ pip install ag2
182
+ ```
183
+
184
+ Minimal dependencies are installed without extra options. You can install extra options based on the feature you need.
185
+
186
+ <!-- For example, use the following to install the dependencies needed by the [`blendsearch`](https://microsoft.github.io/FLAML/docs/Use-Cases/Tune-User-Defined-Function#blendsearch-economical-hyperparameter-optimization-with-blended-search-strategy) option.
187
+ ```bash
188
+ pip install "autogen[blendsearch]"
189
+ ``` -->
190
+
191
+ Find more options in [Installation](https://ag2ai.github.io/ag2/docs/Installation#option-2-install-autogen-locally-using-virtual-environment).
192
+
193
+ <!-- Each of the [`notebook examples`](https://github.com/ag2ai/ag2/tree/main/notebook) may require a specific option to be installed. -->
194
+
195
+ 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://ag2ai.github.io/ag2/docs/FAQ/#code-execution) in docker. Find more instructions and how to change the default behaviour [here](https://ag2ai.github.io/ag2/docs/Installation#code-execution-with-docker-(default)).
196
+
197
+ For LLM inference configurations, check the [FAQs](https://ag2ai.github.io/ag2/docs/FAQ#set-your-api-endpoints).
198
+
199
+ <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
200
+ <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
201
+ ↑ Back to Top ↑
202
+ </a>
203
+ </p>
204
+
205
+ ## Multi-Agent Conversation Framework
206
+
207
+ AG2 enables the next-gen LLM applications with a generic [multi-agent conversation](https://ag2ai.github.io/ag2/docs/Use-Cases/agent_chat) framework. It offers customizable and conversable agents that integrate LLMs, tools, and humans.
208
+ 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.
209
+
210
+ Features of this use case include:
211
+
212
+ - **Multi-agent conversations**: AG2 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.
213
+ - **Customization**: AG2 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.
214
+ - **Human participation**: AG2 seamlessly allows human participation. This means that humans can provide input and feedback to the agents as needed.
215
+
216
+ For [example](https://github.com/ag2ai/ag2/blob/main/test/twoagent.py),
217
+
218
+ ```python
219
+ from autogen import AssistantAgent, UserProxyAgent, config_list_from_json
220
+ # Load LLM inference endpoints from an env variable or a file
221
+ # See https://ag2ai.github.io/ag2/docs/FAQ#set-your-api-endpoints
222
+ # and OAI_CONFIG_LIST_sample
223
+ config_list = config_list_from_json(env_or_file="OAI_CONFIG_LIST")
224
+ # You can also set config_list directly as a list, for example, config_list = [{'model': 'gpt-4o', 'api_key': '<your OpenAI API key here>'},]
225
+ assistant = AssistantAgent("assistant", llm_config={"config_list": config_list})
226
+ user_proxy = UserProxyAgent("user_proxy", code_execution_config={"work_dir": "coding", "use_docker": False}) # IMPORTANT: set to True to run code in docker, recommended
227
+ user_proxy.initiate_chat(assistant, message="Plot a chart of NVDA and TESLA stock price change YTD.")
228
+ # This initiates an automated chat between the two agents to solve the task
229
+ ```
230
+
231
+ This example can be run with
232
+
233
+ ```python
234
+ python test/twoagent.py
235
+ ```
236
+
237
+ After the repo is cloned.
238
+ The figure below shows an example conversation flow with AG2.
239
+
240
+ ![Agent Chat Example](./website/static/img/chat_example.png)
241
+
242
+
243
+ Alternatively, the [sample code](https://github.com/ag2ai/build-with-autogen/blob/main/samples/simple_chat.py) here allows a user to chat with an AG2 agent in ChatGPT style.
244
+ Please find more [code examples](https://ag2ai.github.io/ag2/docs/Examples#automated-multi-agent-chat) for this feature.
245
+
246
+ <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
247
+ <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
248
+ ↑ Back to Top ↑
249
+ </a>
250
+ </p>
251
+
252
+ ## Enhanced LLM Inferences
253
+
254
+ AG2 also helps maximize the utility out of the expensive LLMs such as gpt-4o. It offers [enhanced LLM inference](https://ag2ai.github.io/ag2/docs/Use-Cases/enhanced_inference#api-unification) with powerful functionalities like caching, error handling, multi-config inference and templating.
255
+
256
+ <!-- For example, you can optimize generations by LLM with your own tuning data, success metrics, and budgets.
257
+
258
+ ```python
259
+ # perform tuning for openai<1
260
+ config, analysis = autogen.Completion.tune(
261
+ data=tune_data,
262
+ metric="success",
263
+ mode="max",
264
+ eval_func=eval_func,
265
+ inference_budget=0.05,
266
+ optimization_budget=3,
267
+ num_samples=-1,
268
+ )
269
+ # perform inference for a test instance
270
+ response = autogen.Completion.create(context=test_instance, **config)
271
+ ```
272
+
273
+ Please find more [code examples](https://ag2ai.github.io/ag2/docs/Examples#tune-gpt-models) for this feature. -->
274
+
275
+ <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
276
+ <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
277
+ ↑ Back to Top ↑
278
+ </a>
279
+ </p>
280
+
281
+ ## Documentation
282
+
283
+ You can find detailed documentation about AG2 [here](https://ag2ai.github.io/ag2/).
284
+
285
+ In addition, you can find:
286
+
287
+ - [Research](https://ag2ai.github.io/ag2/docs/Research), [blogposts](https://ag2ai.github.io/ag2/blog) around AG2, and [Transparency FAQs](https://github.com/ag2ai/ag2/blob/main/TRANSPARENCY_FAQS.md)
288
+
289
+ - [Discord](https://discord.gg/pAbnFJrkgZ)
290
+
291
+ - [Contributing guide](https://ag2ai.github.io/ag2/docs/Contribute)
292
+
293
+ <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
294
+ <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
295
+ ↑ Back to Top ↑
296
+ </a>
297
+ </p>
298
+
299
+ ## CookBook
300
+
301
+ Explore detailed implementations with sample code and applications to help you get started with AG2.
302
+ [Cookbook](https://github.com/ag2ai/build-with-autogen)
303
+
304
+
305
+ ## Related Papers
306
+
307
+ [AG2](https://arxiv.org/abs/2308.08155)
308
+
309
+ ```
310
+ @inproceedings{wu2023autogen,
311
+ title={AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework},
312
+ 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},
313
+ year={2023},
314
+ eprint={2308.08155},
315
+ archivePrefix={arXiv},
316
+ primaryClass={cs.AI}
317
+ }
318
+ ```
319
+
320
+ [EcoOptiGen](https://arxiv.org/abs/2303.04673)
321
+
322
+ ```
323
+ @inproceedings{wang2023EcoOptiGen,
324
+ title={Cost-Effective Hyperparameter Optimization for Large Language Model Generation Inference},
325
+ author={Chi Wang and Susan Xueqing Liu and Ahmed H. Awadallah},
326
+ year={2023},
327
+ booktitle={AutoML'23},
328
+ }
329
+ ```
330
+
331
+ [MathChat](https://arxiv.org/abs/2306.01337)
332
+
333
+ ```
334
+ @inproceedings{wu2023empirical,
335
+ title={An Empirical Study on Challenging Math Problem Solving with GPT-4},
336
+ 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},
337
+ year={2023},
338
+ booktitle={ArXiv preprint arXiv:2306.01337},
339
+ }
340
+ ```
341
+
342
+ [AgentOptimizer](https://arxiv.org/pdf/2402.11359)
343
+
344
+ ```
345
+ @article{zhang2024training,
346
+ title={Training Language Model Agents without Modifying Language Models},
347
+ author={Zhang, Shaokun and Zhang, Jieyu and Liu, Jiale and Song, Linxin and Wang, Chi and Krishna, Ranjay and Wu, Qingyun},
348
+ journal={ICML'24},
349
+ year={2024}
350
+ }
351
+ ```
352
+
353
+ [StateFlow](https://arxiv.org/abs/2403.11322)
354
+ ```
355
+ @article{wu2024stateflow,
356
+ title={StateFlow: Enhancing LLM Task-Solving through State-Driven Workflows},
357
+ author={Wu, Yiran and Yue, Tianwei and Zhang, Shaokun and Wang, Chi and Wu, Qingyun},
358
+ journal={arXiv preprint arXiv:2403.11322},
359
+ year={2024}
360
+ }
361
+ ```
362
+
363
+ <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
364
+ <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
365
+ ↑ Back to Top ↑
366
+ </a>
367
+ </p>
368
+
369
+ ## Contributors Wall
370
+ <a href="https://github.com/ag2ai/ag2/graphs/contributors">
371
+ <img src="https://contrib.rocks/image?repo=ag2ai/ag2&max=204" />
372
+ </a>
373
+
374
+ <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
375
+ <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
376
+ ↑ Back to Top ↑
377
+ </a>
378
+ </p>
379
+
380
+ ## License
381
+ This project is licensed under the [Apache License, Version 2.0 (Apache-2.0)](./LICENSE).
382
+
383
+ This project is a spin-off of https://github.com/microsoft/autogen and contains code under two licenses:
384
+
385
+ - 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.
386
+
387
+ - 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.
388
+
389
+ 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.
390
+
391
+