ag2 0.3.2b2__py3-none-any.whl → 0.4b1__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ag2
3
- Version: 0.3.2b2
3
+ Version: 0.4b1
4
4
  Summary: A programming framework for agentic AI
5
5
  Home-page: https://github.com/ag2ai/ag2
6
6
  Author: Chi Wang & Qingyun Wu
@@ -10,20 +10,21 @@ Platform: UNKNOWN
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: License :: OSI Approved :: Apache Software License
12
12
  Classifier: Operating System :: OS Independent
13
- Requires-Python: >=3.8,<3.13
13
+ Requires-Python: >=3.8,<3.14
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
16
  License-File: NOTICE.md
17
17
  Requires-Dist: diskcache
18
18
  Requires-Dist: docker
19
19
  Requires-Dist: flaml
20
- Requires-Dist: numpy (<2,>=1.17.0)
21
20
  Requires-Dist: openai (>=1.3)
22
21
  Requires-Dist: packaging
23
22
  Requires-Dist: pydantic (!=2.6.0,<3,>=1.10)
24
23
  Requires-Dist: python-dotenv
25
24
  Requires-Dist: termcolor
26
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"
27
28
  Provides-Extra: anthropic
28
29
  Requires-Dist: anthropic (>=0.23.1) ; extra == 'anthropic'
29
30
  Provides-Extra: autobuild
@@ -35,6 +36,11 @@ Provides-Extra: bedrock
35
36
  Requires-Dist: boto3 (>=1.34.149) ; extra == 'bedrock'
36
37
  Provides-Extra: blendsearch
37
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: pysqlite3 ; extra == 'captainagent'
43
+ Requires-Dist: sentence-transformers ; extra == 'captainagent'
38
44
  Provides-Extra: cerebras
39
45
  Requires-Dist: cerebras-cloud-sdk (>=1.0.0) ; extra == 'cerebras'
40
46
  Provides-Extra: cohere
@@ -203,7 +209,7 @@ We adopt the Apache 2.0 license from v0.3. This enhances our commitment to open-
203
209
 
204
210
  :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).
205
211
 
206
- <!-- :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). -->
212
+ <!-- :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). -->
207
213
 
208
214
  <!-- :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. -->
209
215
 
@@ -228,7 +234,7 @@ We adopt the Apache 2.0 license from v0.3. This enhances our commitment to open-
228
234
 
229
235
  ## What is AG2
230
236
 
231
- 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.
237
+ 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.
232
238
 
233
239
  **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.
234
240
 
@@ -274,7 +280,7 @@ Find detailed instructions for users [here](https://ag2ai.github.io/ag2/docs/ins
274
280
 
275
281
  ### Option 2. Install AG2 Locally
276
282
 
277
- AG2 requires **Python version >= 3.8, < 3.13**. It can be installed from pip:
283
+ AG2 requires **Python version >= 3.8, < 3.14**. It can be installed from pip:
278
284
 
279
285
  ```bash
280
286
  pip install ag2
@@ -339,7 +345,7 @@ The figure below shows an example conversation flow with AG2.
339
345
  ![Agent Chat Example](./website/static/img/chat_example.png)
340
346
 
341
347
 
342
- 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.
348
+ 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.
343
349
  Please find more [code examples](https://ag2ai.github.io/ag2/docs/Examples#automated-multi-agent-chat) for this feature.
344
350
 
345
351
  <p align="right" style="font-size: 14px; color: #555; margin-top: 20px;">
@@ -398,12 +404,12 @@ In addition, you can find:
398
404
  ## CookBook
399
405
 
400
406
  Explore detailed implementations with sample code and applications to help you get started with AG2.
401
- [Cookbook](https://github.com/ag2ai/build-with-autogen)
407
+ [Cookbook](https://github.com/ag2ai/build-with-ag2)
402
408
 
403
409
 
404
410
  ## Related Papers
405
411
 
406
- [AG2](https://arxiv.org/abs/2308.08155)
412
+ [AutoGen](https://arxiv.org/abs/2308.08155)
407
413
 
408
414
  ```
409
415
  @inproceedings{wu2023autogen,
@@ -479,7 +485,7 @@ Explore detailed implementations with sample code and applications to help you g
479
485
  ## License
480
486
  This project is licensed under the [Apache License, Version 2.0 (Apache-2.0)](./LICENSE).
481
487
 
482
- This project is a spin-off of https://github.com/microsoft/autogen and contains code under two licenses:
488
+ This project is a spin-off of [AutoGen](https://github.com/microsoft/autogen) and contains code under two licenses:
483
489
 
484
490
  - 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.
485
491
 
@@ -11,21 +11,22 @@ autogen/retrieve_utils.py,sha256=CndQ0lr7dsRGLltudqp-O_dC_4NgO6fmhzka8iXLa-g,196
11
11
  autogen/runtime_logging.py,sha256=iAJO_oddNfItIghNlTv060Ld0NybK52SzL7qu3n0vRw,4837
12
12
  autogen/token_count_utils.py,sha256=z9HMEYf9DWr3IJah-PyzIwU_vr64_NF_6U0WCFI1L7s,10240
13
13
  autogen/types.py,sha256=zkSwYEfDePIsuk03IgutDPwb1QlFK-rAu23uYvQKrXE,601
14
- autogen/version.py,sha256=xgAavEb-Csf8tE0CH5PcI_fmNiRzqvlCD_Y1GnG0u0k,250
15
- autogen/agentchat/__init__.py,sha256=THTYvGvFyi-gKVAMnBdDgU9CKE8cWMqWcbFS-VrzOQs,773
14
+ autogen/version.py,sha256=4LnAqSTAUIszZcTSEdMLr0I4xotjCK6n6PWKmBUHhWY,248
15
+ autogen/agentchat/__init__.py,sha256=GhEKIablUdEaWlW8i7VpHwtzIVOl6N9sgbnAcT-X9jw,1091
16
16
  autogen/agentchat/agent.py,sha256=r3jjZbVGkms4a8FTOXzyiQQ7PcMPVBj8zwbSJ-siwXg,4764
17
17
  autogen/agentchat/assistant_agent.py,sha256=cEaYk15yyeRSE3LaguDThxzZFgTWiPJ1SxTvAvK6t68,5548
18
18
  autogen/agentchat/chat.py,sha256=F7WNQc_feDg0pXwkqG0ER74jy_zRzj6NO7MVNwEQcPM,12484
19
- autogen/agentchat/conversable_agent.py,sha256=oV3xQiZtn8zasMb8iH_jB-csc27wyKDMITLNkMvaaO4,139137
20
- autogen/agentchat/groupchat.py,sha256=S4hQ_pAxfk6n9_R0HhVM4fJ12hxEKP_nMhTeel2Yu_I,83723
19
+ autogen/agentchat/conversable_agent.py,sha256=T-lnzd8BVTvgujjRsUJ1N1KrLo2ojQ7HG6l-CCnEVAA,139387
20
+ autogen/agentchat/groupchat.py,sha256=2kzT4nf_Yexuq8YqcmJSX9TA2QoTv9yZXZ8W5Q3NpA8,83877
21
21
  autogen/agentchat/user_proxy_agent.py,sha256=c-RG-Sb_O3p3QnePkOVepVI5olyfKOlsM9SQaEOcthw,7307
22
22
  autogen/agentchat/utils.py,sha256=Y-FjMcwiJuO-WsgLDuXep_IU2absAMwQulCKs9QdHVc,8036
23
23
  autogen/agentchat/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- autogen/agentchat/contrib/agent_builder.py,sha256=yY2eFSaewKmYS-vylNJVN_jtHG6zTdKETR50nrjyb9A,32641
24
+ autogen/agentchat/contrib/agent_builder.py,sha256=z08C5-zpAXqKliX0vSdhphHr1w43YqENjYK6uhjKYdY,32699
25
25
  autogen/agentchat/contrib/agent_optimizer.py,sha256=dSsRIcYwZXxTWIGn_0gUl-zvDnWgOSQKyImzmkE6UPQ,22446
26
+ autogen/agentchat/contrib/captainagent.py,sha256=ir079N3lk_xphZjrus8WZntZT2maCuJUj7anRbKaOkU,25500
26
27
  autogen/agentchat/contrib/gpt_assistant_agent.py,sha256=5aNsw8HJQKw5KumHRZekT2smnHR9e4PLRvIZzfsNPQw,25146
27
28
  autogen/agentchat/contrib/img_utils.py,sha256=XEnLKeWOXoD1IiWf8IT1A3QiUE8ZEdZrjxUaJwR1WVY,14276
28
- autogen/agentchat/contrib/llamaindex_conversable_agent.py,sha256=2g-yz9nNu1p3RxagwGYuU0bp_baje7vfV2gYNqFtiK0,4292
29
+ autogen/agentchat/contrib/llamaindex_conversable_agent.py,sha256=BSfjG4fDXjG4jpBmyAso5k1dK8JJPYWoNuL4LiYl-EM,4535
29
30
  autogen/agentchat/contrib/llava_agent.py,sha256=pVKcwa_16Pg6lBfGJ6JXWUH-nAUtgW05q6KdhDESass,6330
30
31
  autogen/agentchat/contrib/math_user_proxy_agent.py,sha256=Q6YI8Z3M4Ndcp8ruMtpEr16rxLi4ZnIKKnYD8ujv33I,19938
31
32
  autogen/agentchat/contrib/multimodal_conversable_agent.py,sha256=vDYP6c3K1L6HaefG4gItGvlrbAa91KERJQTKZlMpe2c,5155
@@ -33,7 +34,9 @@ autogen/agentchat/contrib/qdrant_retrieve_user_proxy_agent.py,sha256=mgKHvKbx5dc
33
34
  autogen/agentchat/contrib/retrieve_assistant_agent.py,sha256=79igEA0r1eZYSuWKOCKkUwCV1c5yTWH295-L2-4ao4c,2424
34
35
  autogen/agentchat/contrib/retrieve_user_proxy_agent.py,sha256=kDEQ_HJ5nvbBmsCf-oyCnZGxzv3R0VawoLHKuNz5v4c,37069
35
36
  autogen/agentchat/contrib/society_of_mind_agent.py,sha256=lRF69C8ejcqPRGj5_fPtUs2NandyATw010OJB7OTdos,9087
37
+ autogen/agentchat/contrib/swarm_agent.py,sha256=qeBV6XoBPdEGbJgSf2ZmpFEuDKmE1etee9X7hJNV7Bs,17032
36
38
  autogen/agentchat/contrib/text_analyzer_agent.py,sha256=WitXX--yoGh3Xq_jC_D85Unt7UCVPdhM4MzuVJxiRSg,3563
39
+ autogen/agentchat/contrib/tool_retriever.py,sha256=WIOTdHOWR-JRscw9RJBRAuuSYqV97nhUhGw3yQ0J8sg,4304
37
40
  autogen/agentchat/contrib/web_surfer.py,sha256=kAqbfuyj_lK61VUhvVUM83CYs_Hsut6eKPy388LVwL8,14563
38
41
  autogen/agentchat/contrib/capabilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
42
  autogen/agentchat/contrib/capabilities/agent_capability.py,sha256=f6cBV4FcMvA7oZE1_o42RUUayC3KTkKOB7wW2fFEjso,771
@@ -97,16 +100,16 @@ autogen/oai/cerebras.py,sha256=7TrdvplPx5ATbFwSIvwqg_8Xmzkjsi2Hr9Q60w5uyZk,10669
97
100
  autogen/oai/client.py,sha256=HR8ATrTlNoSM8fr0fH9cmKR-lxr3Rd62kBI0aj-eoNg,52615
98
101
  autogen/oai/client_utils.py,sha256=W9RD6V3XPpelDqPwjG412go4qXfYWDPmKur68s-Siu0,7282
99
102
  autogen/oai/cohere.py,sha256=giMIRomeAEd3y0QsulmWYYLXXCfsqY0ojKG4UzwQ2SI,18513
100
- autogen/oai/completion.py,sha256=KwbFggV_b30uJfuJsw3oOpvVzIM05fNM1KHwjbLJHXY,53660
101
- autogen/oai/gemini.py,sha256=JcjJh9WoV7JDxkS2e4kercaApw_Ecp4q_T4t9GgrsBE,20599
103
+ autogen/oai/completion.py,sha256=dT2LEjmRUMXx0UR7OKs6zYQH-cDtW5m0vWvwXXOjmvk,53652
104
+ autogen/oai/gemini.py,sha256=YNrwGKwPVglfUhx2XPph9AbPN0b5IbPMaT0njWPEXjI,20595
102
105
  autogen/oai/groq.py,sha256=gpLe1UJZMtkJAks2mj40aksvMcQ0oBjgOxRuTVupG7s,11164
103
106
  autogen/oai/mistral.py,sha256=1xybwfihh6n2HyLlCNNebT01SYVIwNj9ClIms92ySak,11414
104
107
  autogen/oai/ollama.py,sha256=lKGvNdVoNhpvssYu-shrNPcMHczBX1kVktZe77c9zz0,25383
105
108
  autogen/oai/openai_utils.py,sha256=zZU1GFZsqy_dEYvt5UbCfRPh_i3nIFvGVnmF3kbTUvU,35162
106
109
  autogen/oai/together.py,sha256=AfEx2Dt4limeVvnCibtwvs9OuJkS1wcYFdA-P-gDzRw,13411
107
- ag2-0.3.2b2.dist-info/LICENSE,sha256=GEFQVNayAR-S_rQD5l8hPdgvgyktVdy4Bx5-v90IfRI,11384
108
- ag2-0.3.2b2.dist-info/METADATA,sha256=WSECs3Tw1quc1NuBbQyYPkqi3Ng4adHdiriRT12WUmQ,24564
109
- ag2-0.3.2b2.dist-info/NOTICE.md,sha256=ucvou1bE6i2s40qyuU9RL0TeIVG01VhXoQ59EngtEz4,1317
110
- ag2-0.3.2b2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
111
- ag2-0.3.2b2.dist-info/top_level.txt,sha256=qRZ2MW8yuy0LtOLpeZndl4H1buusjxhwD6c9AXbVqKQ,8
112
- ag2-0.3.2b2.dist-info/RECORD,,
110
+ ag2-0.4b1.dist-info/LICENSE,sha256=GEFQVNayAR-S_rQD5l8hPdgvgyktVdy4Bx5-v90IfRI,11384
111
+ ag2-0.4b1.dist-info/METADATA,sha256=gGFTLvAIcn8UdRmqt52Z4lhmstqgjjK-AHXUMfNT6Gw,24897
112
+ ag2-0.4b1.dist-info/NOTICE.md,sha256=ucvou1bE6i2s40qyuU9RL0TeIVG01VhXoQ59EngtEz4,1317
113
+ ag2-0.4b1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
114
+ ag2-0.4b1.dist-info/top_level.txt,sha256=qRZ2MW8yuy0LtOLpeZndl4H1buusjxhwD6c9AXbVqKQ,8
115
+ ag2-0.4b1.dist-info/RECORD,,
@@ -7,12 +7,22 @@
7
7
  from .agent import Agent
8
8
  from .assistant_agent import AssistantAgent
9
9
  from .chat import ChatResult, initiate_chats
10
+
11
+ # Imported last to avoid circular imports
12
+ from .contrib.swarm_agent import (
13
+ AFTER_WORK,
14
+ ON_CONDITION,
15
+ AfterWorkOption,
16
+ SwarmAgent,
17
+ SwarmResult,
18
+ initiate_swarm_chat,
19
+ )
10
20
  from .conversable_agent import ConversableAgent, register_function
11
21
  from .groupchat import GroupChat, GroupChatManager
12
22
  from .user_proxy_agent import UserProxyAgent
13
23
  from .utils import gather_usage_summary
14
24
 
15
- __all__ = (
25
+ __all__ = [
16
26
  "Agent",
17
27
  "ConversableAgent",
18
28
  "AssistantAgent",
@@ -23,4 +33,10 @@ __all__ = (
23
33
  "initiate_chats",
24
34
  "gather_usage_summary",
25
35
  "ChatResult",
26
- )
36
+ "initiate_swarm_chat",
37
+ "SwarmAgent",
38
+ "SwarmResult",
39
+ "ON_CONDITION",
40
+ "AFTER_WORK",
41
+ "AfterWorkOption",
42
+ ]
@@ -203,7 +203,9 @@ Match roles in the role set to each expert in expert set.
203
203
  builder_filter_dict.update({"model": builder_model})
204
204
  if len(builder_model_tags) != 0:
205
205
  builder_filter_dict.update({"tags": builder_model_tags})
206
- builder_config_list = autogen.config_list_from_json(config_file_or_env, filter_dict=builder_filter_dict)
206
+ builder_config_list = autogen.config_list_from_json(
207
+ config_file_or_env, file_location=config_file_location, filter_dict=builder_filter_dict
208
+ )
207
209
  if len(builder_config_list) == 0:
208
210
  raise RuntimeError(
209
211
  f"Fail to initialize build manager: {builder_model}{builder_model_tags} does not exist in {config_file_or_env}. "
@@ -267,7 +269,7 @@ Match roles in the role set to each expert in expert set.
267
269
  description = agent_config["description"]
268
270
 
269
271
  # Path to the customize **ConversableAgent** class.
270
- model_path = agent_config.get("model_path", None)
272
+ agent_path = agent_config.get("agent_path", None)
271
273
  filter_dict = {}
272
274
  if len(model_name_or_hf_repo) > 0:
273
275
  filter_dict.update({"model": model_name_or_hf_repo})
@@ -302,8 +304,8 @@ Match roles in the role set to each expert in expert set.
302
304
  )
303
305
 
304
306
  model_class = autogen.AssistantAgent
305
- if model_path:
306
- module_path, model_class_name = model_path.replace("/", ".").rsplit(".", 1)
307
+ if agent_path:
308
+ module_path, model_class_name = agent_path.replace("/", ".").rsplit(".", 1)
307
309
  module = importlib.import_module(module_path)
308
310
  model_class = getattr(module, model_class_name)
309
311
  if not issubclass(model_class, autogen.ConversableAgent):
@@ -313,7 +315,7 @@ Match roles in the role set to each expert in expert set.
313
315
  additional_config = {
314
316
  k: v
315
317
  for k, v in agent_config.items()
316
- if k not in ["model", "name", "system_message", "description", "model_path", "tags"]
318
+ if k not in ["model", "name", "system_message", "description", "agent_path", "tags"]
317
319
  }
318
320
  agent = model_class(
319
321
  name=agent_name, llm_config=current_config.copy(), description=description, **additional_config