ag2 0.4b1__tar.gz → 0.4.2b1__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 (136) hide show
  1. ag2-0.4.2b1/PKG-INFO +18 -0
  2. {ag2-0.4b1 → ag2-0.4.2b1}/README.md +10 -15
  3. ag2-0.4.2b1/ag2.egg-info/PKG-INFO +18 -0
  4. ag2-0.4.2b1/ag2.egg-info/SOURCES.txt +20 -0
  5. ag2-0.4.2b1/ag2.egg-info/requires.txt +1 -0
  6. ag2-0.4.2b1/ag2.egg-info/top_level.txt +1 -0
  7. {ag2-0.4b1 → ag2-0.4.2b1}/setup.py +19 -14
  8. ag2-0.4.2b1/setup_ag2.py +35 -0
  9. ag2-0.4b1/PKG-INFO +0 -392
  10. ag2-0.4b1/ag2.egg-info/PKG-INFO +0 -392
  11. ag2-0.4b1/ag2.egg-info/SOURCES.txt +0 -128
  12. ag2-0.4b1/ag2.egg-info/requires.txt +0 -166
  13. ag2-0.4b1/ag2.egg-info/top_level.txt +0 -1
  14. ag2-0.4b1/autogen/__init__.py +0 -17
  15. ag2-0.4b1/autogen/_pydantic.py +0 -116
  16. ag2-0.4b1/autogen/agentchat/__init__.py +0 -42
  17. ag2-0.4b1/autogen/agentchat/agent.py +0 -142
  18. ag2-0.4b1/autogen/agentchat/assistant_agent.py +0 -85
  19. ag2-0.4b1/autogen/agentchat/chat.py +0 -306
  20. ag2-0.4b1/autogen/agentchat/contrib/__init__.py +0 -0
  21. ag2-0.4b1/autogen/agentchat/contrib/agent_builder.py +0 -787
  22. ag2-0.4b1/autogen/agentchat/contrib/agent_optimizer.py +0 -450
  23. ag2-0.4b1/autogen/agentchat/contrib/capabilities/__init__.py +0 -0
  24. ag2-0.4b1/autogen/agentchat/contrib/capabilities/agent_capability.py +0 -21
  25. ag2-0.4b1/autogen/agentchat/contrib/capabilities/generate_images.py +0 -297
  26. ag2-0.4b1/autogen/agentchat/contrib/capabilities/teachability.py +0 -406
  27. ag2-0.4b1/autogen/agentchat/contrib/capabilities/text_compressors.py +0 -72
  28. ag2-0.4b1/autogen/agentchat/contrib/capabilities/transform_messages.py +0 -92
  29. ag2-0.4b1/autogen/agentchat/contrib/capabilities/transforms.py +0 -565
  30. ag2-0.4b1/autogen/agentchat/contrib/capabilities/transforms_util.py +0 -120
  31. ag2-0.4b1/autogen/agentchat/contrib/capabilities/vision_capability.py +0 -217
  32. ag2-0.4b1/autogen/agentchat/contrib/captainagent.py +0 -487
  33. ag2-0.4b1/autogen/agentchat/contrib/gpt_assistant_agent.py +0 -545
  34. ag2-0.4b1/autogen/agentchat/contrib/graph_rag/__init__.py +0 -0
  35. ag2-0.4b1/autogen/agentchat/contrib/graph_rag/document.py +0 -24
  36. ag2-0.4b1/autogen/agentchat/contrib/graph_rag/falkor_graph_query_engine.py +0 -76
  37. ag2-0.4b1/autogen/agentchat/contrib/graph_rag/graph_query_engine.py +0 -50
  38. ag2-0.4b1/autogen/agentchat/contrib/graph_rag/graph_rag_capability.py +0 -56
  39. ag2-0.4b1/autogen/agentchat/contrib/img_utils.py +0 -390
  40. ag2-0.4b1/autogen/agentchat/contrib/llamaindex_conversable_agent.py +0 -123
  41. ag2-0.4b1/autogen/agentchat/contrib/llava_agent.py +0 -176
  42. ag2-0.4b1/autogen/agentchat/contrib/math_user_proxy_agent.py +0 -471
  43. ag2-0.4b1/autogen/agentchat/contrib/multimodal_conversable_agent.py +0 -128
  44. ag2-0.4b1/autogen/agentchat/contrib/qdrant_retrieve_user_proxy_agent.py +0 -325
  45. ag2-0.4b1/autogen/agentchat/contrib/retrieve_assistant_agent.py +0 -56
  46. ag2-0.4b1/autogen/agentchat/contrib/retrieve_user_proxy_agent.py +0 -701
  47. ag2-0.4b1/autogen/agentchat/contrib/society_of_mind_agent.py +0 -203
  48. ag2-0.4b1/autogen/agentchat/contrib/swarm_agent.py +0 -414
  49. ag2-0.4b1/autogen/agentchat/contrib/text_analyzer_agent.py +0 -76
  50. ag2-0.4b1/autogen/agentchat/contrib/tool_retriever.py +0 -114
  51. ag2-0.4b1/autogen/agentchat/contrib/vectordb/__init__.py +0 -0
  52. ag2-0.4b1/autogen/agentchat/contrib/vectordb/base.py +0 -243
  53. ag2-0.4b1/autogen/agentchat/contrib/vectordb/chromadb.py +0 -326
  54. ag2-0.4b1/autogen/agentchat/contrib/vectordb/mongodb.py +0 -559
  55. ag2-0.4b1/autogen/agentchat/contrib/vectordb/pgvectordb.py +0 -958
  56. ag2-0.4b1/autogen/agentchat/contrib/vectordb/qdrant.py +0 -334
  57. ag2-0.4b1/autogen/agentchat/contrib/vectordb/utils.py +0 -126
  58. ag2-0.4b1/autogen/agentchat/contrib/web_surfer.py +0 -305
  59. ag2-0.4b1/autogen/agentchat/conversable_agent.py +0 -2908
  60. ag2-0.4b1/autogen/agentchat/groupchat.py +0 -1668
  61. ag2-0.4b1/autogen/agentchat/user_proxy_agent.py +0 -109
  62. ag2-0.4b1/autogen/agentchat/utils.py +0 -207
  63. ag2-0.4b1/autogen/browser_utils.py +0 -291
  64. ag2-0.4b1/autogen/cache/__init__.py +0 -10
  65. ag2-0.4b1/autogen/cache/abstract_cache_base.py +0 -78
  66. ag2-0.4b1/autogen/cache/cache.py +0 -182
  67. ag2-0.4b1/autogen/cache/cache_factory.py +0 -85
  68. ag2-0.4b1/autogen/cache/cosmos_db_cache.py +0 -150
  69. ag2-0.4b1/autogen/cache/disk_cache.py +0 -109
  70. ag2-0.4b1/autogen/cache/in_memory_cache.py +0 -61
  71. ag2-0.4b1/autogen/cache/redis_cache.py +0 -128
  72. ag2-0.4b1/autogen/code_utils.py +0 -745
  73. ag2-0.4b1/autogen/coding/__init__.py +0 -22
  74. ag2-0.4b1/autogen/coding/base.py +0 -113
  75. ag2-0.4b1/autogen/coding/docker_commandline_code_executor.py +0 -262
  76. ag2-0.4b1/autogen/coding/factory.py +0 -45
  77. ag2-0.4b1/autogen/coding/func_with_reqs.py +0 -203
  78. ag2-0.4b1/autogen/coding/jupyter/__init__.py +0 -22
  79. ag2-0.4b1/autogen/coding/jupyter/base.py +0 -32
  80. ag2-0.4b1/autogen/coding/jupyter/docker_jupyter_server.py +0 -164
  81. ag2-0.4b1/autogen/coding/jupyter/embedded_ipython_code_executor.py +0 -182
  82. ag2-0.4b1/autogen/coding/jupyter/jupyter_client.py +0 -224
  83. ag2-0.4b1/autogen/coding/jupyter/jupyter_code_executor.py +0 -161
  84. ag2-0.4b1/autogen/coding/jupyter/local_jupyter_server.py +0 -168
  85. ag2-0.4b1/autogen/coding/local_commandline_code_executor.py +0 -410
  86. ag2-0.4b1/autogen/coding/markdown_code_extractor.py +0 -44
  87. ag2-0.4b1/autogen/coding/utils.py +0 -57
  88. ag2-0.4b1/autogen/exception_utils.py +0 -46
  89. ag2-0.4b1/autogen/extensions/__init__.py +0 -0
  90. ag2-0.4b1/autogen/formatting_utils.py +0 -76
  91. ag2-0.4b1/autogen/function_utils.py +0 -362
  92. ag2-0.4b1/autogen/graph_utils.py +0 -148
  93. ag2-0.4b1/autogen/io/__init__.py +0 -15
  94. ag2-0.4b1/autogen/io/base.py +0 -105
  95. ag2-0.4b1/autogen/io/console.py +0 -43
  96. ag2-0.4b1/autogen/io/websockets.py +0 -213
  97. ag2-0.4b1/autogen/logger/__init__.py +0 -11
  98. ag2-0.4b1/autogen/logger/base_logger.py +0 -140
  99. ag2-0.4b1/autogen/logger/file_logger.py +0 -287
  100. ag2-0.4b1/autogen/logger/logger_factory.py +0 -29
  101. ag2-0.4b1/autogen/logger/logger_utils.py +0 -42
  102. ag2-0.4b1/autogen/logger/sqlite_logger.py +0 -459
  103. ag2-0.4b1/autogen/math_utils.py +0 -356
  104. ag2-0.4b1/autogen/oai/__init__.py +0 -33
  105. ag2-0.4b1/autogen/oai/anthropic.py +0 -428
  106. ag2-0.4b1/autogen/oai/bedrock.py +0 -600
  107. ag2-0.4b1/autogen/oai/cerebras.py +0 -264
  108. ag2-0.4b1/autogen/oai/client.py +0 -1148
  109. ag2-0.4b1/autogen/oai/client_utils.py +0 -167
  110. ag2-0.4b1/autogen/oai/cohere.py +0 -453
  111. ag2-0.4b1/autogen/oai/completion.py +0 -1216
  112. ag2-0.4b1/autogen/oai/gemini.py +0 -469
  113. ag2-0.4b1/autogen/oai/groq.py +0 -281
  114. ag2-0.4b1/autogen/oai/mistral.py +0 -279
  115. ag2-0.4b1/autogen/oai/ollama.py +0 -576
  116. ag2-0.4b1/autogen/oai/openai_utils.py +0 -810
  117. ag2-0.4b1/autogen/oai/together.py +0 -343
  118. ag2-0.4b1/autogen/retrieve_utils.py +0 -487
  119. ag2-0.4b1/autogen/runtime_logging.py +0 -163
  120. ag2-0.4b1/autogen/token_count_utils.py +0 -257
  121. ag2-0.4b1/autogen/types.py +0 -20
  122. ag2-0.4b1/autogen/version.py +0 -7
  123. {ag2-0.4b1 → ag2-0.4.2b1}/LICENSE +0 -0
  124. {ag2-0.4b1 → ag2-0.4.2b1}/NOTICE.md +0 -0
  125. {ag2-0.4b1 → ag2-0.4.2b1}/ag2.egg-info/dependency_links.txt +0 -0
  126. {ag2-0.4b1 → ag2-0.4.2b1}/pyproject.toml +0 -0
  127. {ag2-0.4b1 → ag2-0.4.2b1}/setup.cfg +0 -0
  128. {ag2-0.4b1 → ag2-0.4.2b1}/test/test_browser_utils.py +0 -0
  129. {ag2-0.4b1 → ag2-0.4.2b1}/test/test_code_utils.py +0 -0
  130. {ag2-0.4b1 → ag2-0.4.2b1}/test/test_function_utils.py +0 -0
  131. {ag2-0.4b1 → ag2-0.4.2b1}/test/test_graph_utils.py +0 -0
  132. {ag2-0.4b1 → ag2-0.4.2b1}/test/test_logging.py +0 -0
  133. {ag2-0.4b1 → ag2-0.4.2b1}/test/test_notebook.py +0 -0
  134. {ag2-0.4b1 → ag2-0.4.2b1}/test/test_pydantic.py +0 -0
  135. {ag2-0.4b1 → ag2-0.4.2b1}/test/test_retrieve_utils.py +0 -0
  136. {ag2-0.4b1 → ag2-0.4.2b1}/test/test_token_count.py +0 -0
ag2-0.4.2b1/PKG-INFO ADDED
@@ -0,0 +1,18 @@
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
+
17
+ UNKNOWN
18
+
@@ -1,5 +1,6 @@
1
1
  <a name="readme-top"></a>
2
2
 
3
+ ![Pypi Downloads](https://img.shields.io/pypi/dm/pyautogen?label=PyPI%20downloads)
3
4
  [![PyPI version](https://badge.fury.io/py/autogen.svg)](https://badge.fury.io/py/autogen)
4
5
  [![Build](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml/badge.svg)](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml)
5
6
  ![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)
@@ -16,24 +17,19 @@
16
17
  <br>
17
18
  </p> -->
18
19
 
19
- > [!IMPORTANT]
20
+ > **:tada: IMPORTANT**
20
21
  >
21
- > :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.
22
+ > :fire: :tada: **Nov 11, 2024:** We are evolving AutoGen into **AG2**!
23
+ > 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
+ >
25
+ > We invite collaborators from all organizations and individuals to join the development.
22
26
 
23
27
 
24
- :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:
25
- ```
26
- pip install ag2
27
- ```
28
- or
28
+ :fire: :tada: AG2 is available via `pyautogen` (or its alias `autogen` or `ag2`) on PyPI!
29
+
29
30
  ```
30
31
  pip install pyautogen
31
32
  ```
32
- or
33
- ```
34
- pip install autogen
35
- ```
36
-
37
33
 
38
34
  📄 **License:**
39
35
  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.
@@ -91,8 +87,7 @@ AG2 (formerly AutoGen) is an open-source programming framework for building AI a
91
87
  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.
92
88
 
93
89
 
94
- ![AutoGen Overview](./website/static/img/autogen_agentchat.png)
95
-
90
+ ![AutoGen Overview](https://media.githubusercontent.com/media/ag2ai/ag2/refs/heads/main/website/static/img/autogen_agentchat.png)
96
91
 
97
92
 
98
93
  <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
@@ -192,7 +187,7 @@ python test/twoagent.py
192
187
  After the repo is cloned.
193
188
  The figure below shows an example conversation flow with AG2.
194
189
 
195
- ![Agent Chat Example](./website/static/img/chat_example.png)
190
+ ![Agent Chat Example](https://media.githubusercontent.com/media/ag2ai/ag2/refs/heads/main/website/static/img/chat_example.png)
196
191
 
197
192
 
198
193
  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.
@@ -0,0 +1,18 @@
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
+
17
+ UNKNOWN
18
+
@@ -0,0 +1,20 @@
1
+ LICENSE
2
+ NOTICE.md
3
+ README.md
4
+ pyproject.toml
5
+ setup.py
6
+ setup_ag2.py
7
+ ag2.egg-info/PKG-INFO
8
+ ag2.egg-info/SOURCES.txt
9
+ ag2.egg-info/dependency_links.txt
10
+ ag2.egg-info/requires.txt
11
+ ag2.egg-info/top_level.txt
12
+ test/test_browser_utils.py
13
+ test/test_code_utils.py
14
+ test/test_function_utils.py
15
+ test/test_graph_utils.py
16
+ test/test_logging.py
17
+ test/test_notebook.py
18
+ test/test_pydantic.py
19
+ test/test_retrieve_utils.py
20
+ test/test_token_count.py
@@ -0,0 +1 @@
1
+ pyautogen==0.4.2b1
@@ -0,0 +1 @@
1
+
@@ -61,7 +61,7 @@ retrieve_chat = [
61
61
  retrieve_chat_pgvector = [*retrieve_chat, "pgvector>=0.2.5"]
62
62
 
63
63
  graph_rag_falkor_db = [
64
- "graphrag_sdk",
64
+ "graphrag_sdk==0.3.3",
65
65
  ]
66
66
 
67
67
  if current_os in ["Windows", "Darwin"]:
@@ -69,7 +69,8 @@ if current_os in ["Windows", "Darwin"]:
69
69
  elif current_os == "Linux":
70
70
  retrieve_chat_pgvector.extend(["psycopg>=3.1.18"])
71
71
 
72
- autobuild = ["chromadb", "sentence-transformers", "huggingface-hub", "pysqlite3"]
72
+ # pysqlite3-binary used so it doesn't need to compile pysqlite3
73
+ autobuild = ["chromadb", "sentence-transformers", "huggingface-hub", "pysqlite3-binary"]
73
74
 
74
75
  extra_require = {
75
76
  "test": [
@@ -90,7 +91,7 @@ extra_require = {
90
91
  "retrievechat-qdrant": [*retrieve_chat, "qdrant_client", "fastembed>=0.3.1"],
91
92
  "graph_rag_falkor_db": graph_rag_falkor_db,
92
93
  "autobuild": autobuild,
93
- "captainagent": autobuild,
94
+ "captainagent": autobuild + ["pandas"],
94
95
  "teachable": ["chromadb"],
95
96
  "lmm": ["replicate", "pillow"],
96
97
  "graph": ["networkx", "matplotlib"],
@@ -112,17 +113,8 @@ extra_require = {
112
113
  "bedrock": ["boto3>=1.34.149"],
113
114
  }
114
115
 
115
-
116
- if "--name" in sys.argv:
117
- index = sys.argv.index("--name")
118
- sys.argv.pop(index) # Removes --name
119
- package_name = sys.argv.pop(index) # Removes the value after --name
120
- else:
121
- package_name = "ag2"
122
-
123
-
124
116
  setuptools.setup(
125
- name=package_name,
117
+ name="pyautogen",
126
118
  version=__version__,
127
119
  author="Chi Wang & Qingyun Wu",
128
120
  author_email="support@ag2.ai",
@@ -130,7 +122,20 @@ setuptools.setup(
130
122
  long_description=long_description,
131
123
  long_description_content_type="text/markdown",
132
124
  url="https://github.com/ag2ai/ag2",
133
- packages=setuptools.find_packages(include=["autogen*"], exclude=["test"]),
125
+ packages=setuptools.find_namespace_packages(
126
+ include=[
127
+ "autogen*",
128
+ "autogen.agentchat.contrib.captainagent.tools*",
129
+ ],
130
+ exclude=["test"],
131
+ ),
132
+ package_data={
133
+ "autogen.agentchat.contrib.captainagent": [
134
+ "tools/tool_description.tsv",
135
+ "tools/requirements.txt",
136
+ ]
137
+ },
138
+ include_package_data=True,
134
139
  install_requires=install_requires,
135
140
  extras_require=extra_require,
136
141
  classifiers=[
@@ -0,0 +1,35 @@
1
+ # Copyright (c) 2023 - 2024, Owners of https://github.com/ag2ai
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ import os
6
+
7
+ import setuptools
8
+
9
+ here = os.path.abspath(os.path.dirname(__file__))
10
+
11
+ with open("README.md", "r", encoding="UTF-8") as fh:
12
+ long_description = fh.read()
13
+
14
+ # Get the code version
15
+ version = {}
16
+ with open(os.path.join(here, "autogen/version.py")) as fp:
17
+ exec(fp.read(), version)
18
+ __version__ = version["__version__"]
19
+
20
+ setuptools.setup(
21
+ name="ag2",
22
+ version=__version__,
23
+ description="Alias package for pyautogen",
24
+ install_requires=["pyautogen==" + __version__],
25
+ url="https://github.com/ag2ai/ag2",
26
+ author="Chi Wang & Qingyun Wu",
27
+ author_email="support@ag2.ai",
28
+ classifiers=[
29
+ "Programming Language :: Python :: 3",
30
+ "License :: OSI Approved :: Apache Software License",
31
+ "Operating System :: OS Independent",
32
+ ],
33
+ license="Apache Software License 2.0",
34
+ python_requires=">=3.8,<3.14",
35
+ )
ag2-0.4b1/PKG-INFO DELETED
@@ -1,392 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: ag2
3
- Version: 0.4b1
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
- Provides-Extra: anthropic
16
- Provides-Extra: autobuild
17
- Provides-Extra: bedrock
18
- Provides-Extra: blendsearch
19
- Provides-Extra: captainagent
20
- Provides-Extra: cerebras
21
- Provides-Extra: cohere
22
- Provides-Extra: cosmosdb
23
- Provides-Extra: gemini
24
- Provides-Extra: graph
25
- Provides-Extra: graph_rag_falkor_db
26
- Provides-Extra: groq
27
- Provides-Extra: jupyter-executor
28
- Provides-Extra: lmm
29
- Provides-Extra: long-context
30
- Provides-Extra: mathchat
31
- Provides-Extra: mistral
32
- Provides-Extra: ollama
33
- Provides-Extra: redis
34
- Provides-Extra: retrievechat
35
- Provides-Extra: retrievechat-mongodb
36
- Provides-Extra: retrievechat-pgvector
37
- Provides-Extra: retrievechat-qdrant
38
- Provides-Extra: teachable
39
- Provides-Extra: test
40
- Provides-Extra: together
41
- Provides-Extra: types
42
- Provides-Extra: websockets
43
- Provides-Extra: websurfer
44
- License-File: LICENSE
45
- License-File: NOTICE.md
46
-
47
- <a name="readme-top"></a>
48
-
49
- [![PyPI version](https://badge.fury.io/py/autogen.svg)](https://badge.fury.io/py/autogen)
50
- [![Build](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml/badge.svg)](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml)
51
- ![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)
52
- [![Discord](https://img.shields.io/discord/1153072414184452236?logo=discord&style=flat)](https://discord.gg/pAbnFJrkgZ)
53
- [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40ag2ai)](https://x.com/ag2ai)
54
-
55
- <!-- [![NuGet version](https://badge.fury.io/nu/AutoGen.Core.svg)](https://badge.fury.io/nu/AutoGen.Core) -->
56
-
57
- # [AG2](https://github.com/ag2ai/ag2)
58
-
59
- [📚 Cite paper](#related-papers).
60
- <!-- <p align="center">
61
- <img src="https://github.com/ag2ai/ag2/blob/main/website/static/img/flaml.svg" width=200>
62
- <br>
63
- </p> -->
64
-
65
- > [!IMPORTANT]
66
- >
67
- > :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.
68
-
69
-
70
- :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:
71
- ```
72
- pip install ag2
73
- ```
74
- or
75
- ```
76
- pip install pyautogen
77
- ```
78
- or
79
- ```
80
- pip install autogen
81
- ```
82
-
83
-
84
- 📄 **License:**
85
- 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.
86
-
87
-
88
- :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).
89
-
90
- :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).
91
-
92
- :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).
93
-
94
- :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/).
95
-
96
- <!-- :tada: Apr 26, 2024: [AutoGen.NET](https://ag2ai.github.io/ag2-for-net/) is available for .NET developers! -->
97
-
98
- :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).
99
-
100
- :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).
101
-
102
- <!-- :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. -->
103
-
104
- <!-- :tada: Jan 30, 2024: AutoGen is highlighted by Peter Lee in Microsoft Research Forum [Keynote](https://t.co/nUBSjPDjqD). -->
105
-
106
- :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).
107
-
108
- <!-- :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). -->
109
-
110
- <!-- :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. -->
111
-
112
- :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).
113
-
114
- <!-- :tada: Nov 6, 2023: AutoGen is mentioned by Satya Nadella in a [fireside chat](https://youtu.be/0pLBvgYtv6U). -->
115
-
116
- <!-- :tada: Nov 1, 2023: AutoGen is the top trending repo on GitHub in October 2023. -->
117
-
118
- <!-- :tada: Oct 03, 2023: AutoGen spins off from [FLAML](https://github.com/microsoft/FLAML) on GitHub. -->
119
-
120
- <!-- :tada: Aug 16: Paper about AutoGen on [arxiv](https://arxiv.org/abs/2308.08155). -->
121
-
122
- :tada: Mar 29, 2023: AutoGen is first created in [FLAML](https://github.com/microsoft/FLAML).
123
-
124
- <!--
125
- :fire: FLAML is highlighted in OpenAI's [cookbook](https://github.com/openai/openai-cookbook#related-resources-from-around-the-web).
126
-
127
- :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).
128
-
129
- :fire: FLAML supports Code-First AutoML & Tuning – Private Preview in [Microsoft Fabric Data Science](https://learn.microsoft.com/en-us/fabric/data-science/). -->
130
-
131
- ## What is AG2
132
-
133
- 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.
134
-
135
- **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.
136
-
137
- 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.
138
-
139
-
140
- ![AutoGen Overview](./website/static/img/autogen_agentchat.png)
141
-
142
-
143
-
144
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
145
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
146
- ↑ Back to Top ↑
147
- </a>
148
- </p>
149
-
150
- <!--
151
- ## Roadmaps
152
- -->
153
-
154
- ## Quickstart
155
- The easiest way to start playing is
156
- 1. Click below to use the GitHub Codespace
157
-
158
- [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/ag2ai/ag2?quickstart=1)
159
-
160
- 2. Copy OAI_CONFIG_LIST_sample to ./notebook folder, name to OAI_CONFIG_LIST, and set the correct configuration.
161
- 3. Start playing with the notebooks!
162
-
163
- *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.
164
-
165
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
166
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
167
- ↑ Back to Top ↑
168
- </a>
169
- </p>
170
-
171
- ## [Installation](https://ag2ai.github.io/ag2/docs/Installation)
172
-
173
- ### Option 1. Install and Run AG2 in Docker
174
-
175
- 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).
176
-
177
- ### Option 2. Install AG2 Locally
178
-
179
- AG2 requires **Python version >= 3.8, < 3.14**. It can be installed from pip:
180
-
181
- ```bash
182
- pip install ag2
183
- ```
184
-
185
- Minimal dependencies are installed without extra options. You can install extra options based on the feature you need.
186
-
187
- <!-- 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.
188
- ```bash
189
- pip install "autogen[blendsearch]"
190
- ``` -->
191
-
192
- Find more options in [Installation](https://ag2ai.github.io/ag2/docs/Installation#option-2-install-autogen-locally-using-virtual-environment).
193
-
194
- <!-- Each of the [`notebook examples`](https://github.com/ag2ai/ag2/tree/main/notebook) may require a specific option to be installed. -->
195
-
196
- 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)).
197
-
198
- For LLM inference configurations, check the [FAQs](https://ag2ai.github.io/ag2/docs/FAQ#set-your-api-endpoints).
199
-
200
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
201
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
202
- ↑ Back to Top ↑
203
- </a>
204
- </p>
205
-
206
- ## Multi-Agent Conversation Framework
207
-
208
- 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.
209
- 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.
210
-
211
- Features of this use case include:
212
-
213
- - **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.
214
- - **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.
215
- - **Human participation**: AG2 seamlessly allows human participation. This means that humans can provide input and feedback to the agents as needed.
216
-
217
- For [example](https://github.com/ag2ai/ag2/blob/main/test/twoagent.py),
218
-
219
- ```python
220
- from autogen import AssistantAgent, UserProxyAgent, config_list_from_json
221
- # Load LLM inference endpoints from an env variable or a file
222
- # See https://ag2ai.github.io/ag2/docs/FAQ#set-your-api-endpoints
223
- # and OAI_CONFIG_LIST_sample
224
- config_list = config_list_from_json(env_or_file="OAI_CONFIG_LIST")
225
- # You can also set config_list directly as a list, for example, config_list = [{'model': 'gpt-4o', 'api_key': '<your OpenAI API key here>'},]
226
- assistant = AssistantAgent("assistant", llm_config={"config_list": config_list})
227
- user_proxy = UserProxyAgent("user_proxy", code_execution_config={"work_dir": "coding", "use_docker": False}) # IMPORTANT: set to True to run code in docker, recommended
228
- user_proxy.initiate_chat(assistant, message="Plot a chart of NVDA and TESLA stock price change YTD.")
229
- # This initiates an automated chat between the two agents to solve the task
230
- ```
231
-
232
- This example can be run with
233
-
234
- ```python
235
- python test/twoagent.py
236
- ```
237
-
238
- After the repo is cloned.
239
- The figure below shows an example conversation flow with AG2.
240
-
241
- ![Agent Chat Example](./website/static/img/chat_example.png)
242
-
243
-
244
- 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.
245
- Please find more [code examples](https://ag2ai.github.io/ag2/docs/Examples#automated-multi-agent-chat) for this feature.
246
-
247
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
248
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
249
- ↑ Back to Top ↑
250
- </a>
251
- </p>
252
-
253
- ## Enhanced LLM Inferences
254
-
255
- 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.
256
-
257
- <!-- For example, you can optimize generations by LLM with your own tuning data, success metrics, and budgets.
258
-
259
- ```python
260
- # perform tuning for openai<1
261
- config, analysis = autogen.Completion.tune(
262
- data=tune_data,
263
- metric="success",
264
- mode="max",
265
- eval_func=eval_func,
266
- inference_budget=0.05,
267
- optimization_budget=3,
268
- num_samples=-1,
269
- )
270
- # perform inference for a test instance
271
- response = autogen.Completion.create(context=test_instance, **config)
272
- ```
273
-
274
- Please find more [code examples](https://ag2ai.github.io/ag2/docs/Examples#tune-gpt-models) for this feature. -->
275
-
276
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
277
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
278
- ↑ Back to Top ↑
279
- </a>
280
- </p>
281
-
282
- ## Documentation
283
-
284
- You can find detailed documentation about AG2 [here](https://ag2ai.github.io/ag2/).
285
-
286
- In addition, you can find:
287
-
288
- - [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)
289
-
290
- - [Discord](https://discord.gg/pAbnFJrkgZ)
291
-
292
- - [Contributing guide](https://ag2ai.github.io/ag2/docs/Contribute)
293
-
294
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
295
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
296
- ↑ Back to Top ↑
297
- </a>
298
- </p>
299
-
300
- ## CookBook
301
-
302
- Explore detailed implementations with sample code and applications to help you get started with AG2.
303
- [Cookbook](https://github.com/ag2ai/build-with-ag2)
304
-
305
-
306
- ## Related Papers
307
-
308
- [AutoGen](https://arxiv.org/abs/2308.08155)
309
-
310
- ```
311
- @inproceedings{wu2023autogen,
312
- title={AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework},
313
- 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},
314
- year={2023},
315
- eprint={2308.08155},
316
- archivePrefix={arXiv},
317
- primaryClass={cs.AI}
318
- }
319
- ```
320
-
321
- [EcoOptiGen](https://arxiv.org/abs/2303.04673)
322
-
323
- ```
324
- @inproceedings{wang2023EcoOptiGen,
325
- title={Cost-Effective Hyperparameter Optimization for Large Language Model Generation Inference},
326
- author={Chi Wang and Susan Xueqing Liu and Ahmed H. Awadallah},
327
- year={2023},
328
- booktitle={AutoML'23},
329
- }
330
- ```
331
-
332
- [MathChat](https://arxiv.org/abs/2306.01337)
333
-
334
- ```
335
- @inproceedings{wu2023empirical,
336
- title={An Empirical Study on Challenging Math Problem Solving with GPT-4},
337
- 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},
338
- year={2023},
339
- booktitle={ArXiv preprint arXiv:2306.01337},
340
- }
341
- ```
342
-
343
- [AgentOptimizer](https://arxiv.org/pdf/2402.11359)
344
-
345
- ```
346
- @article{zhang2024training,
347
- title={Training Language Model Agents without Modifying Language Models},
348
- author={Zhang, Shaokun and Zhang, Jieyu and Liu, Jiale and Song, Linxin and Wang, Chi and Krishna, Ranjay and Wu, Qingyun},
349
- journal={ICML'24},
350
- year={2024}
351
- }
352
- ```
353
-
354
- [StateFlow](https://arxiv.org/abs/2403.11322)
355
- ```
356
- @article{wu2024stateflow,
357
- title={StateFlow: Enhancing LLM Task-Solving through State-Driven Workflows},
358
- author={Wu, Yiran and Yue, Tianwei and Zhang, Shaokun and Wang, Chi and Wu, Qingyun},
359
- journal={arXiv preprint arXiv:2403.11322},
360
- year={2024}
361
- }
362
- ```
363
-
364
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
365
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
366
- ↑ Back to Top ↑
367
- </a>
368
- </p>
369
-
370
- ## Contributors Wall
371
- <a href="https://github.com/ag2ai/ag2/graphs/contributors">
372
- <img src="https://contrib.rocks/image?repo=ag2ai/ag2&max=204" />
373
- </a>
374
-
375
- <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
376
- <a href="#readme-top" style="text-decoration: none; color: blue; font-weight: bold;">
377
- ↑ Back to Top ↑
378
- </a>
379
- </p>
380
-
381
- ## License
382
- This project is licensed under the [Apache License, Version 2.0 (Apache-2.0)](./LICENSE).
383
-
384
- This project is a spin-off of [AutoGen](https://github.com/microsoft/autogen) and contains code under two licenses:
385
-
386
- - 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.
387
-
388
- - 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.
389
-
390
- 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.
391
-
392
-