ag2 0.4.1__py3-none-any.whl → 0.4.2b1__py3-none-any.whl

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 (161) hide show
  1. ag2-0.4.2b1.dist-info/METADATA +19 -0
  2. ag2-0.4.2b1.dist-info/RECORD +6 -0
  3. ag2-0.4.2b1.dist-info/top_level.txt +1 -0
  4. ag2-0.4.1.dist-info/METADATA +0 -500
  5. ag2-0.4.1.dist-info/RECORD +0 -158
  6. ag2-0.4.1.dist-info/top_level.txt +0 -1
  7. autogen/__init__.py +0 -17
  8. autogen/_pydantic.py +0 -116
  9. autogen/agentchat/__init__.py +0 -42
  10. autogen/agentchat/agent.py +0 -142
  11. autogen/agentchat/assistant_agent.py +0 -85
  12. autogen/agentchat/chat.py +0 -306
  13. autogen/agentchat/contrib/__init__.py +0 -0
  14. autogen/agentchat/contrib/agent_builder.py +0 -788
  15. autogen/agentchat/contrib/agent_eval/agent_eval.py +0 -107
  16. autogen/agentchat/contrib/agent_eval/criterion.py +0 -47
  17. autogen/agentchat/contrib/agent_eval/critic_agent.py +0 -47
  18. autogen/agentchat/contrib/agent_eval/quantifier_agent.py +0 -42
  19. autogen/agentchat/contrib/agent_eval/subcritic_agent.py +0 -48
  20. autogen/agentchat/contrib/agent_eval/task.py +0 -43
  21. autogen/agentchat/contrib/agent_optimizer.py +0 -450
  22. autogen/agentchat/contrib/capabilities/__init__.py +0 -0
  23. autogen/agentchat/contrib/capabilities/agent_capability.py +0 -21
  24. autogen/agentchat/contrib/capabilities/generate_images.py +0 -297
  25. autogen/agentchat/contrib/capabilities/teachability.py +0 -406
  26. autogen/agentchat/contrib/capabilities/text_compressors.py +0 -72
  27. autogen/agentchat/contrib/capabilities/transform_messages.py +0 -92
  28. autogen/agentchat/contrib/capabilities/transforms.py +0 -565
  29. autogen/agentchat/contrib/capabilities/transforms_util.py +0 -120
  30. autogen/agentchat/contrib/capabilities/vision_capability.py +0 -217
  31. autogen/agentchat/contrib/captainagent/tools/__init__.py +0 -0
  32. autogen/agentchat/contrib/captainagent/tools/data_analysis/calculate_correlation.py +0 -41
  33. autogen/agentchat/contrib/captainagent/tools/data_analysis/calculate_skewness_and_kurtosis.py +0 -29
  34. autogen/agentchat/contrib/captainagent/tools/data_analysis/detect_outlier_iqr.py +0 -29
  35. autogen/agentchat/contrib/captainagent/tools/data_analysis/detect_outlier_zscore.py +0 -29
  36. autogen/agentchat/contrib/captainagent/tools/data_analysis/explore_csv.py +0 -22
  37. autogen/agentchat/contrib/captainagent/tools/data_analysis/shapiro_wilk_test.py +0 -31
  38. autogen/agentchat/contrib/captainagent/tools/information_retrieval/arxiv_download.py +0 -26
  39. autogen/agentchat/contrib/captainagent/tools/information_retrieval/arxiv_search.py +0 -55
  40. autogen/agentchat/contrib/captainagent/tools/information_retrieval/extract_pdf_image.py +0 -54
  41. autogen/agentchat/contrib/captainagent/tools/information_retrieval/extract_pdf_text.py +0 -39
  42. autogen/agentchat/contrib/captainagent/tools/information_retrieval/get_wikipedia_text.py +0 -22
  43. autogen/agentchat/contrib/captainagent/tools/information_retrieval/get_youtube_caption.py +0 -35
  44. autogen/agentchat/contrib/captainagent/tools/information_retrieval/image_qa.py +0 -61
  45. autogen/agentchat/contrib/captainagent/tools/information_retrieval/optical_character_recognition.py +0 -62
  46. autogen/agentchat/contrib/captainagent/tools/information_retrieval/perform_web_search.py +0 -48
  47. autogen/agentchat/contrib/captainagent/tools/information_retrieval/scrape_wikipedia_tables.py +0 -34
  48. autogen/agentchat/contrib/captainagent/tools/information_retrieval/transcribe_audio_file.py +0 -22
  49. autogen/agentchat/contrib/captainagent/tools/information_retrieval/youtube_download.py +0 -36
  50. autogen/agentchat/contrib/captainagent/tools/math/calculate_circle_area_from_diameter.py +0 -22
  51. autogen/agentchat/contrib/captainagent/tools/math/calculate_day_of_the_week.py +0 -19
  52. autogen/agentchat/contrib/captainagent/tools/math/calculate_fraction_sum.py +0 -29
  53. autogen/agentchat/contrib/captainagent/tools/math/calculate_matrix_power.py +0 -32
  54. autogen/agentchat/contrib/captainagent/tools/math/calculate_reflected_point.py +0 -17
  55. autogen/agentchat/contrib/captainagent/tools/math/complex_numbers_product.py +0 -26
  56. autogen/agentchat/contrib/captainagent/tools/math/compute_currency_conversion.py +0 -24
  57. autogen/agentchat/contrib/captainagent/tools/math/count_distinct_permutations.py +0 -28
  58. autogen/agentchat/contrib/captainagent/tools/math/evaluate_expression.py +0 -29
  59. autogen/agentchat/contrib/captainagent/tools/math/find_continuity_point.py +0 -35
  60. autogen/agentchat/contrib/captainagent/tools/math/fraction_to_mixed_numbers.py +0 -40
  61. autogen/agentchat/contrib/captainagent/tools/math/modular_inverse_sum.py +0 -23
  62. autogen/agentchat/contrib/captainagent/tools/math/simplify_mixed_numbers.py +0 -37
  63. autogen/agentchat/contrib/captainagent/tools/math/sum_of_digit_factorials.py +0 -16
  64. autogen/agentchat/contrib/captainagent/tools/math/sum_of_primes_below.py +0 -16
  65. autogen/agentchat/contrib/captainagent/tools/requirements.txt +0 -10
  66. autogen/agentchat/contrib/captainagent/tools/tool_description.tsv +0 -34
  67. autogen/agentchat/contrib/captainagent.py +0 -490
  68. autogen/agentchat/contrib/gpt_assistant_agent.py +0 -545
  69. autogen/agentchat/contrib/graph_rag/__init__.py +0 -0
  70. autogen/agentchat/contrib/graph_rag/document.py +0 -30
  71. autogen/agentchat/contrib/graph_rag/falkor_graph_query_engine.py +0 -111
  72. autogen/agentchat/contrib/graph_rag/falkor_graph_rag_capability.py +0 -81
  73. autogen/agentchat/contrib/graph_rag/graph_query_engine.py +0 -56
  74. autogen/agentchat/contrib/graph_rag/graph_rag_capability.py +0 -64
  75. autogen/agentchat/contrib/img_utils.py +0 -390
  76. autogen/agentchat/contrib/llamaindex_conversable_agent.py +0 -123
  77. autogen/agentchat/contrib/llava_agent.py +0 -176
  78. autogen/agentchat/contrib/math_user_proxy_agent.py +0 -471
  79. autogen/agentchat/contrib/multimodal_conversable_agent.py +0 -128
  80. autogen/agentchat/contrib/qdrant_retrieve_user_proxy_agent.py +0 -325
  81. autogen/agentchat/contrib/retrieve_assistant_agent.py +0 -56
  82. autogen/agentchat/contrib/retrieve_user_proxy_agent.py +0 -705
  83. autogen/agentchat/contrib/society_of_mind_agent.py +0 -203
  84. autogen/agentchat/contrib/swarm_agent.py +0 -463
  85. autogen/agentchat/contrib/text_analyzer_agent.py +0 -76
  86. autogen/agentchat/contrib/tool_retriever.py +0 -120
  87. autogen/agentchat/contrib/vectordb/__init__.py +0 -0
  88. autogen/agentchat/contrib/vectordb/base.py +0 -243
  89. autogen/agentchat/contrib/vectordb/chromadb.py +0 -326
  90. autogen/agentchat/contrib/vectordb/mongodb.py +0 -559
  91. autogen/agentchat/contrib/vectordb/pgvectordb.py +0 -958
  92. autogen/agentchat/contrib/vectordb/qdrant.py +0 -334
  93. autogen/agentchat/contrib/vectordb/utils.py +0 -126
  94. autogen/agentchat/contrib/web_surfer.py +0 -305
  95. autogen/agentchat/conversable_agent.py +0 -2908
  96. autogen/agentchat/groupchat.py +0 -1668
  97. autogen/agentchat/user_proxy_agent.py +0 -109
  98. autogen/agentchat/utils.py +0 -207
  99. autogen/browser_utils.py +0 -291
  100. autogen/cache/__init__.py +0 -10
  101. autogen/cache/abstract_cache_base.py +0 -78
  102. autogen/cache/cache.py +0 -182
  103. autogen/cache/cache_factory.py +0 -85
  104. autogen/cache/cosmos_db_cache.py +0 -150
  105. autogen/cache/disk_cache.py +0 -109
  106. autogen/cache/in_memory_cache.py +0 -61
  107. autogen/cache/redis_cache.py +0 -128
  108. autogen/code_utils.py +0 -745
  109. autogen/coding/__init__.py +0 -22
  110. autogen/coding/base.py +0 -113
  111. autogen/coding/docker_commandline_code_executor.py +0 -262
  112. autogen/coding/factory.py +0 -45
  113. autogen/coding/func_with_reqs.py +0 -203
  114. autogen/coding/jupyter/__init__.py +0 -22
  115. autogen/coding/jupyter/base.py +0 -32
  116. autogen/coding/jupyter/docker_jupyter_server.py +0 -164
  117. autogen/coding/jupyter/embedded_ipython_code_executor.py +0 -182
  118. autogen/coding/jupyter/jupyter_client.py +0 -224
  119. autogen/coding/jupyter/jupyter_code_executor.py +0 -161
  120. autogen/coding/jupyter/local_jupyter_server.py +0 -168
  121. autogen/coding/local_commandline_code_executor.py +0 -410
  122. autogen/coding/markdown_code_extractor.py +0 -44
  123. autogen/coding/utils.py +0 -57
  124. autogen/exception_utils.py +0 -46
  125. autogen/extensions/__init__.py +0 -0
  126. autogen/formatting_utils.py +0 -76
  127. autogen/function_utils.py +0 -362
  128. autogen/graph_utils.py +0 -148
  129. autogen/io/__init__.py +0 -15
  130. autogen/io/base.py +0 -105
  131. autogen/io/console.py +0 -43
  132. autogen/io/websockets.py +0 -213
  133. autogen/logger/__init__.py +0 -11
  134. autogen/logger/base_logger.py +0 -140
  135. autogen/logger/file_logger.py +0 -287
  136. autogen/logger/logger_factory.py +0 -29
  137. autogen/logger/logger_utils.py +0 -42
  138. autogen/logger/sqlite_logger.py +0 -459
  139. autogen/math_utils.py +0 -356
  140. autogen/oai/__init__.py +0 -33
  141. autogen/oai/anthropic.py +0 -428
  142. autogen/oai/bedrock.py +0 -606
  143. autogen/oai/cerebras.py +0 -270
  144. autogen/oai/client.py +0 -1148
  145. autogen/oai/client_utils.py +0 -167
  146. autogen/oai/cohere.py +0 -453
  147. autogen/oai/completion.py +0 -1216
  148. autogen/oai/gemini.py +0 -469
  149. autogen/oai/groq.py +0 -281
  150. autogen/oai/mistral.py +0 -279
  151. autogen/oai/ollama.py +0 -582
  152. autogen/oai/openai_utils.py +0 -811
  153. autogen/oai/together.py +0 -343
  154. autogen/retrieve_utils.py +0 -487
  155. autogen/runtime_logging.py +0 -163
  156. autogen/token_count_utils.py +0 -259
  157. autogen/types.py +0 -20
  158. autogen/version.py +0 -7
  159. {ag2-0.4.1.dist-info → ag2-0.4.2b1.dist-info}/LICENSE +0 -0
  160. {ag2-0.4.1.dist-info → ag2-0.4.2b1.dist-info}/NOTICE.md +0 -0
  161. {ag2-0.4.1.dist-info → ag2-0.4.2b1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.1
2
+ Name: ag2
3
+ Version: 0.4.2b1
4
+ Summary: Alias package for pyautogen
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.14
14
+ License-File: LICENSE
15
+ License-File: NOTICE.md
16
+ Requires-Dist: pyautogen (==0.4.2b1)
17
+
18
+ UNKNOWN
19
+
@@ -0,0 +1,6 @@
1
+ ag2-0.4.2b1.dist-info/LICENSE,sha256=GEFQVNayAR-S_rQD5l8hPdgvgyktVdy4Bx5-v90IfRI,11384
2
+ ag2-0.4.2b1.dist-info/METADATA,sha256=WVQ5IY0bekHLc_YQGFnRHhs2iIAcRwsMsiw9O67UDxI,520
3
+ ag2-0.4.2b1.dist-info/NOTICE.md,sha256=ucvou1bE6i2s40qyuU9RL0TeIVG01VhXoQ59EngtEz4,1317
4
+ ag2-0.4.2b1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
5
+ ag2-0.4.2b1.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
6
+ ag2-0.4.2b1.dist-info/RECORD,,
@@ -0,0 +1 @@
1
+
@@ -1,500 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: ag2
3
- Version: 0.4.1
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.14
14
- Description-Content-Type: text/markdown
15
- License-File: LICENSE
16
- License-File: NOTICE.md
17
- Requires-Dist: diskcache
18
- Requires-Dist: docker
19
- Requires-Dist: flaml
20
- Requires-Dist: openai (>=1.3)
21
- Requires-Dist: packaging
22
- Requires-Dist: pydantic (!=2.6.0,<3,>=1.10)
23
- Requires-Dist: python-dotenv
24
- Requires-Dist: termcolor
25
- Requires-Dist: tiktoken
26
- Requires-Dist: numpy (<2.0.0,>=1.24.0) ; python_version < "3.13"
27
- Requires-Dist: numpy (>=2.1) ; python_version >= "3.13"
28
- Provides-Extra: anthropic
29
- Requires-Dist: anthropic (>=0.23.1) ; extra == 'anthropic'
30
- Provides-Extra: autobuild
31
- Requires-Dist: chromadb ; extra == 'autobuild'
32
- Requires-Dist: huggingface-hub ; extra == 'autobuild'
33
- Requires-Dist: pysqlite3-binary ; extra == 'autobuild'
34
- Requires-Dist: sentence-transformers ; extra == 'autobuild'
35
- Provides-Extra: bedrock
36
- Requires-Dist: boto3 (>=1.34.149) ; extra == 'bedrock'
37
- Provides-Extra: blendsearch
38
- Requires-Dist: flaml[blendsearch] ; extra == 'blendsearch'
39
- Provides-Extra: captainagent
40
- Requires-Dist: chromadb ; extra == 'captainagent'
41
- Requires-Dist: huggingface-hub ; extra == 'captainagent'
42
- Requires-Dist: pandas ; extra == 'captainagent'
43
- Requires-Dist: pysqlite3-binary ; extra == 'captainagent'
44
- Requires-Dist: sentence-transformers ; extra == 'captainagent'
45
- Provides-Extra: cerebras
46
- Requires-Dist: cerebras-cloud-sdk (>=1.0.0) ; extra == 'cerebras'
47
- Provides-Extra: cohere
48
- Requires-Dist: cohere (>=5.5.8) ; extra == 'cohere'
49
- Provides-Extra: cosmosdb
50
- Requires-Dist: azure-cosmos (>=4.2.0) ; extra == 'cosmosdb'
51
- Provides-Extra: gemini
52
- Requires-Dist: google-auth ; extra == 'gemini'
53
- Requires-Dist: google-cloud-aiplatform ; extra == 'gemini'
54
- Requires-Dist: google-generativeai (<1,>=0.5) ; extra == 'gemini'
55
- Requires-Dist: pillow ; extra == 'gemini'
56
- Requires-Dist: pydantic ; extra == 'gemini'
57
- Provides-Extra: graph
58
- Requires-Dist: matplotlib ; extra == 'graph'
59
- Requires-Dist: networkx ; extra == 'graph'
60
- Provides-Extra: graph_rag_falkor_db
61
- Requires-Dist: graphrag-sdk (==0.3.3) ; extra == 'graph_rag_falkor_db'
62
- Provides-Extra: groq
63
- Requires-Dist: groq (>=0.9.0) ; extra == 'groq'
64
- Provides-Extra: jupyter-executor
65
- Requires-Dist: ipykernel (>=6.29.0) ; extra == 'jupyter-executor'
66
- Requires-Dist: jupyter-client (>=8.6.0) ; extra == 'jupyter-executor'
67
- Requires-Dist: jupyter-kernel-gateway ; extra == 'jupyter-executor'
68
- Requires-Dist: requests ; extra == 'jupyter-executor'
69
- Requires-Dist: websocket-client ; extra == 'jupyter-executor'
70
- Provides-Extra: lmm
71
- Requires-Dist: pillow ; extra == 'lmm'
72
- Requires-Dist: replicate ; extra == 'lmm'
73
- Provides-Extra: long-context
74
- Requires-Dist: llmlingua (<0.3) ; extra == 'long-context'
75
- Provides-Extra: mathchat
76
- Requires-Dist: pydantic (==1.10.9) ; extra == 'mathchat'
77
- Requires-Dist: sympy ; extra == 'mathchat'
78
- Requires-Dist: wolframalpha ; extra == 'mathchat'
79
- Provides-Extra: mistral
80
- Requires-Dist: mistralai (>=1.0.1) ; extra == 'mistral'
81
- Provides-Extra: ollama
82
- Requires-Dist: fix-busted-json (>=0.0.18) ; extra == 'ollama'
83
- Requires-Dist: ollama (>=0.3.3) ; extra == 'ollama'
84
- Provides-Extra: redis
85
- Requires-Dist: redis ; extra == 'redis'
86
- Provides-Extra: retrievechat
87
- Requires-Dist: beautifulsoup4 ; extra == 'retrievechat'
88
- Requires-Dist: chromadb (==0.5.3) ; extra == 'retrievechat'
89
- Requires-Dist: ipython ; extra == 'retrievechat'
90
- Requires-Dist: markdownify ; extra == 'retrievechat'
91
- Requires-Dist: protobuf (==4.25.3) ; extra == 'retrievechat'
92
- Requires-Dist: pypdf ; extra == 'retrievechat'
93
- Requires-Dist: sentence-transformers ; extra == 'retrievechat'
94
- Provides-Extra: retrievechat-mongodb
95
- Requires-Dist: beautifulsoup4 ; extra == 'retrievechat-mongodb'
96
- Requires-Dist: chromadb (==0.5.3) ; extra == 'retrievechat-mongodb'
97
- Requires-Dist: ipython ; extra == 'retrievechat-mongodb'
98
- Requires-Dist: markdownify ; extra == 'retrievechat-mongodb'
99
- Requires-Dist: protobuf (==4.25.3) ; extra == 'retrievechat-mongodb'
100
- Requires-Dist: pymongo (>=4.0.0) ; extra == 'retrievechat-mongodb'
101
- Requires-Dist: pypdf ; extra == 'retrievechat-mongodb'
102
- Requires-Dist: sentence-transformers ; extra == 'retrievechat-mongodb'
103
- Provides-Extra: retrievechat-pgvector
104
- Requires-Dist: beautifulsoup4 ; extra == 'retrievechat-pgvector'
105
- Requires-Dist: chromadb (==0.5.3) ; extra == 'retrievechat-pgvector'
106
- Requires-Dist: ipython ; extra == 'retrievechat-pgvector'
107
- Requires-Dist: markdownify ; extra == 'retrievechat-pgvector'
108
- Requires-Dist: pgvector (>=0.2.5) ; extra == 'retrievechat-pgvector'
109
- Requires-Dist: protobuf (==4.25.3) ; extra == 'retrievechat-pgvector'
110
- Requires-Dist: psycopg (>=3.1.18) ; extra == 'retrievechat-pgvector'
111
- Requires-Dist: pypdf ; extra == 'retrievechat-pgvector'
112
- Requires-Dist: sentence-transformers ; extra == 'retrievechat-pgvector'
113
- Provides-Extra: retrievechat-qdrant
114
- Requires-Dist: beautifulsoup4 ; extra == 'retrievechat-qdrant'
115
- Requires-Dist: chromadb (==0.5.3) ; extra == 'retrievechat-qdrant'
116
- Requires-Dist: fastembed (>=0.3.1) ; extra == 'retrievechat-qdrant'
117
- Requires-Dist: ipython ; extra == 'retrievechat-qdrant'
118
- Requires-Dist: markdownify ; extra == 'retrievechat-qdrant'
119
- Requires-Dist: protobuf (==4.25.3) ; extra == 'retrievechat-qdrant'
120
- Requires-Dist: pypdf ; extra == 'retrievechat-qdrant'
121
- Requires-Dist: qdrant-client ; extra == 'retrievechat-qdrant'
122
- Requires-Dist: sentence-transformers ; extra == 'retrievechat-qdrant'
123
- Provides-Extra: teachable
124
- Requires-Dist: chromadb ; extra == 'teachable'
125
- Provides-Extra: test
126
- Requires-Dist: ipykernel ; extra == 'test'
127
- Requires-Dist: nbconvert ; extra == 'test'
128
- Requires-Dist: nbformat ; extra == 'test'
129
- Requires-Dist: pandas ; extra == 'test'
130
- Requires-Dist: pre-commit ; extra == 'test'
131
- Requires-Dist: pytest-asyncio ; extra == 'test'
132
- Requires-Dist: pytest-cov (>=5) ; extra == 'test'
133
- Requires-Dist: pytest (<8,>=6.1.1) ; extra == 'test'
134
- Provides-Extra: together
135
- Requires-Dist: together (>=1.2) ; extra == 'together'
136
- Provides-Extra: types
137
- Requires-Dist: ipykernel (>=6.29.0) ; extra == 'types'
138
- Requires-Dist: jupyter-client (>=8.6.0) ; extra == 'types'
139
- Requires-Dist: jupyter-kernel-gateway ; extra == 'types'
140
- Requires-Dist: mypy (==1.9.0) ; extra == 'types'
141
- Requires-Dist: pytest (<8,>=6.1.1) ; extra == 'types'
142
- Requires-Dist: requests ; extra == 'types'
143
- Requires-Dist: websocket-client ; extra == 'types'
144
- Provides-Extra: websockets
145
- Requires-Dist: websockets (<13,>=12.0) ; extra == 'websockets'
146
- Provides-Extra: websurfer
147
- Requires-Dist: beautifulsoup4 ; extra == 'websurfer'
148
- Requires-Dist: markdownify ; extra == 'websurfer'
149
- Requires-Dist: pathvalidate ; extra == 'websurfer'
150
- Requires-Dist: pdfminer.six ; extra == 'websurfer'
151
-
152
- <a name="readme-top"></a>
153
-
154
- ![Pypi Downloads](https://img.shields.io/pypi/dm/pyautogen?label=PyPI%20downloads)
155
- [![PyPI version](https://badge.fury.io/py/autogen.svg)](https://badge.fury.io/py/autogen)
156
- [![Build](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml/badge.svg)](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml)
157
- ![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)
158
- [![Discord](https://img.shields.io/discord/1153072414184452236?logo=discord&style=flat)](https://discord.gg/pAbnFJrkgZ)
159
- [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40ag2ai)](https://x.com/ag2ai)
160
-
161
- <!-- [![NuGet version](https://badge.fury.io/nu/AutoGen.Core.svg)](https://badge.fury.io/nu/AutoGen.Core) -->
162
-
163
- # [AG2](https://github.com/ag2ai/ag2)
164
-
165
- [📚 Cite paper](#related-papers).
166
- <!-- <p align="center">
167
- <img src="https://github.com/ag2ai/ag2/blob/main/website/static/img/flaml.svg" width=200>
168
- <br>
169
- </p> -->
170
-
171
- > **:tada: IMPORTANT**
172
- >
173
- > :fire: :tada: **Nov 11, 2024:** We are evolving AutoGen into **AG2**!
174
- > 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/).
175
- >
176
- > We invite collaborators from all organizations and individuals to join the development.
177
-
178
-
179
- :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:
180
- ```
181
- pip install ag2
182
- ```
183
- or
184
- ```
185
- pip install pyautogen
186
- ```
187
- or
188
- ```
189
- pip install autogen
190
- ```
191
-
192
-
193
- 📄 **License:**
194
- 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.
195
-
196
-
197
- :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).
198
-
199
- :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).
200
-
201
- :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).
202
-
203
- :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/).
204
-
205
- <!-- :tada: Apr 26, 2024: [AutoGen.NET](https://ag2ai.github.io/ag2-for-net/) is available for .NET developers! -->
206
-
207
- :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).
208
-
209
- :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).
210
-
211
- <!-- :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. -->
212
-
213
- <!-- :tada: Jan 30, 2024: AutoGen is highlighted by Peter Lee in Microsoft Research Forum [Keynote](https://t.co/nUBSjPDjqD). -->
214
-
215
- :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).
216
-
217
- <!-- :fire: 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://ag2ai.github.io/ag2/docs/Installation#python). -->
218
-
219
- <!-- :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. -->
220
-
221
- :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).
222
-
223
- <!-- :tada: Nov 6, 2023: AutoGen is mentioned by Satya Nadella in a [fireside chat](https://youtu.be/0pLBvgYtv6U). -->
224
-
225
- <!-- :tada: Nov 1, 2023: AutoGen is the top trending repo on GitHub in October 2023. -->
226
-
227
- <!-- :tada: Oct 03, 2023: AutoGen spins off from [FLAML](https://github.com/microsoft/FLAML) on GitHub. -->
228
-
229
- <!-- :tada: Aug 16: Paper about AutoGen on [arxiv](https://arxiv.org/abs/2308.08155). -->
230
-
231
- :tada: Mar 29, 2023: AutoGen is first created in [FLAML](https://github.com/microsoft/FLAML).
232
-
233
- <!--
234
- :fire: FLAML is highlighted in OpenAI's [cookbook](https://github.com/openai/openai-cookbook#related-resources-from-around-the-web).
235
-
236
- :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).
237
-
238
- :fire: FLAML supports Code-First AutoML & Tuning – Private Preview in [Microsoft Fabric Data Science](https://learn.microsoft.com/en-us/fabric/data-science/). -->
239
-
240
- ## What is AG2
241
-
242
- AG2 (formerly 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.
243
-
244
- **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.
245
-
246
- 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.
247
-
248
-
249
- ![AutoGen Overview](https://media.githubusercontent.com/media/ag2ai/ag2/refs/heads/main/website/static/img/autogen_agentchat.png)
250
-
251
-
252
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
253
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
254
- ↑ Back to Top ↑
255
- </a>
256
- </p>
257
-
258
- <!--
259
- ## Roadmaps
260
- -->
261
-
262
- ## Quickstart
263
- The easiest way to start playing is
264
- 1. Click below to use the GitHub Codespace
265
-
266
- [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/ag2ai/ag2?quickstart=1)
267
-
268
- 2. Copy OAI_CONFIG_LIST_sample to ./notebook folder, name to OAI_CONFIG_LIST, and set the correct configuration.
269
- 3. Start playing with the notebooks!
270
-
271
- *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.
272
-
273
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
274
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
275
- ↑ Back to Top ↑
276
- </a>
277
- </p>
278
-
279
- ## [Installation](https://ag2ai.github.io/ag2/docs/Installation)
280
-
281
- ### Option 1. Install and Run AG2 in Docker
282
-
283
- 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).
284
-
285
- ### Option 2. Install AG2 Locally
286
-
287
- AG2 requires **Python version >= 3.8, < 3.14**. It can be installed from pip:
288
-
289
- ```bash
290
- pip install ag2
291
- ```
292
-
293
- Minimal dependencies are installed without extra options. You can install extra options based on the feature you need.
294
-
295
- <!-- 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.
296
- ```bash
297
- pip install "autogen[blendsearch]"
298
- ``` -->
299
-
300
- Find more options in [Installation](https://ag2ai.github.io/ag2/docs/Installation#option-2-install-autogen-locally-using-virtual-environment).
301
-
302
- <!-- Each of the [`notebook examples`](https://github.com/ag2ai/ag2/tree/main/notebook) may require a specific option to be installed. -->
303
-
304
- 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)).
305
-
306
- For LLM inference configurations, check the [FAQs](https://ag2ai.github.io/ag2/docs/FAQ#set-your-api-endpoints).
307
-
308
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
309
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
310
- ↑ Back to Top ↑
311
- </a>
312
- </p>
313
-
314
- ## Multi-Agent Conversation Framework
315
-
316
- 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.
317
- 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.
318
-
319
- Features of this use case include:
320
-
321
- - **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.
322
- - **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.
323
- - **Human participation**: AG2 seamlessly allows human participation. This means that humans can provide input and feedback to the agents as needed.
324
-
325
- For [example](https://github.com/ag2ai/ag2/blob/main/test/twoagent.py),
326
-
327
- ```python
328
- from autogen import AssistantAgent, UserProxyAgent, config_list_from_json
329
- # Load LLM inference endpoints from an env variable or a file
330
- # See https://ag2ai.github.io/ag2/docs/FAQ#set-your-api-endpoints
331
- # and OAI_CONFIG_LIST_sample
332
- config_list = config_list_from_json(env_or_file="OAI_CONFIG_LIST")
333
- # You can also set config_list directly as a list, for example, config_list = [{'model': 'gpt-4o', 'api_key': '<your OpenAI API key here>'},]
334
- assistant = AssistantAgent("assistant", llm_config={"config_list": config_list})
335
- user_proxy = UserProxyAgent("user_proxy", code_execution_config={"work_dir": "coding", "use_docker": False}) # IMPORTANT: set to True to run code in docker, recommended
336
- user_proxy.initiate_chat(assistant, message="Plot a chart of NVDA and TESLA stock price change YTD.")
337
- # This initiates an automated chat between the two agents to solve the task
338
- ```
339
-
340
- This example can be run with
341
-
342
- ```python
343
- python test/twoagent.py
344
- ```
345
-
346
- After the repo is cloned.
347
- The figure below shows an example conversation flow with AG2.
348
-
349
- ![Agent Chat Example](https://media.githubusercontent.com/media/ag2ai/ag2/refs/heads/main/website/static/img/chat_example.png)
350
-
351
-
352
- 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.
353
- Please find more [code examples](https://ag2ai.github.io/ag2/docs/Examples#automated-multi-agent-chat) for this feature.
354
-
355
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
356
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
357
- ↑ Back to Top ↑
358
- </a>
359
- </p>
360
-
361
- ## Enhanced LLM Inferences
362
-
363
- 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.
364
-
365
- <!-- For example, you can optimize generations by LLM with your own tuning data, success metrics, and budgets.
366
-
367
- ```python
368
- # perform tuning for openai<1
369
- config, analysis = autogen.Completion.tune(
370
- data=tune_data,
371
- metric="success",
372
- mode="max",
373
- eval_func=eval_func,
374
- inference_budget=0.05,
375
- optimization_budget=3,
376
- num_samples=-1,
377
- )
378
- # perform inference for a test instance
379
- response = autogen.Completion.create(context=test_instance, **config)
380
- ```
381
-
382
- Please find more [code examples](https://ag2ai.github.io/ag2/docs/Examples#tune-gpt-models) for this feature. -->
383
-
384
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
385
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
386
- ↑ Back to Top ↑
387
- </a>
388
- </p>
389
-
390
- ## Documentation
391
-
392
- You can find detailed documentation about AG2 [here](https://ag2ai.github.io/ag2/).
393
-
394
- In addition, you can find:
395
-
396
- - [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)
397
-
398
- - [Discord](https://discord.gg/pAbnFJrkgZ)
399
-
400
- - [Contributing guide](https://ag2ai.github.io/ag2/docs/Contribute)
401
-
402
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
403
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
404
- ↑ Back to Top ↑
405
- </a>
406
- </p>
407
-
408
- ## CookBook
409
-
410
- Explore detailed implementations with sample code and applications to help you get started with AG2.
411
- [Cookbook](https://github.com/ag2ai/build-with-ag2)
412
-
413
-
414
- ## Related Papers
415
-
416
- [AutoGen](https://arxiv.org/abs/2308.08155)
417
-
418
- ```
419
- @inproceedings{wu2023autogen,
420
- title={AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework},
421
- 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},
422
- year={2023},
423
- eprint={2308.08155},
424
- archivePrefix={arXiv},
425
- primaryClass={cs.AI}
426
- }
427
- ```
428
-
429
- [EcoOptiGen](https://arxiv.org/abs/2303.04673)
430
-
431
- ```
432
- @inproceedings{wang2023EcoOptiGen,
433
- title={Cost-Effective Hyperparameter Optimization for Large Language Model Generation Inference},
434
- author={Chi Wang and Susan Xueqing Liu and Ahmed H. Awadallah},
435
- year={2023},
436
- booktitle={AutoML'23},
437
- }
438
- ```
439
-
440
- [MathChat](https://arxiv.org/abs/2306.01337)
441
-
442
- ```
443
- @inproceedings{wu2023empirical,
444
- title={An Empirical Study on Challenging Math Problem Solving with GPT-4},
445
- 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},
446
- year={2023},
447
- booktitle={ArXiv preprint arXiv:2306.01337},
448
- }
449
- ```
450
-
451
- [AgentOptimizer](https://arxiv.org/pdf/2402.11359)
452
-
453
- ```
454
- @article{zhang2024training,
455
- title={Training Language Model Agents without Modifying Language Models},
456
- author={Zhang, Shaokun and Zhang, Jieyu and Liu, Jiale and Song, Linxin and Wang, Chi and Krishna, Ranjay and Wu, Qingyun},
457
- journal={ICML'24},
458
- year={2024}
459
- }
460
- ```
461
-
462
- [StateFlow](https://arxiv.org/abs/2403.11322)
463
- ```
464
- @article{wu2024stateflow,
465
- title={StateFlow: Enhancing LLM Task-Solving through State-Driven Workflows},
466
- author={Wu, Yiran and Yue, Tianwei and Zhang, Shaokun and Wang, Chi and Wu, Qingyun},
467
- journal={arXiv preprint arXiv:2403.11322},
468
- year={2024}
469
- }
470
- ```
471
-
472
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
473
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
474
- ↑ Back to Top ↑
475
- </a>
476
- </p>
477
-
478
- ## Contributors Wall
479
- <a href="https://github.com/ag2ai/ag2/graphs/contributors">
480
- <img src="https://contrib.rocks/image?repo=ag2ai/ag2&max=204" />
481
- </a>
482
-
483
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
484
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
485
- ↑ Back to Top ↑
486
- </a>
487
- </p>
488
-
489
- ## License
490
- This project is licensed under the [Apache License, Version 2.0 (Apache-2.0)](./LICENSE).
491
-
492
- This project is a spin-off of [AutoGen](https://github.com/microsoft/autogen) and contains code under two licenses:
493
-
494
- - 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.
495
-
496
- - 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.
497
-
498
- 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.
499
-
500
-