waldiez 0.4.7__py3-none-any.whl → 0.4.9__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 waldiez might be problematic. Click here for more details.

Files changed (248) hide show
  1. waldiez/__init__.py +5 -5
  2. waldiez/_version.py +1 -1
  3. waldiez/cli.py +97 -102
  4. waldiez/exporter.py +61 -19
  5. waldiez/exporting/__init__.py +25 -6
  6. waldiez/exporting/agent/__init__.py +7 -3
  7. waldiez/exporting/agent/code_execution.py +114 -0
  8. waldiez/exporting/agent/exporter.py +354 -0
  9. waldiez/exporting/agent/extras/__init__.py +15 -0
  10. waldiez/exporting/agent/extras/captain_agent_extras.py +315 -0
  11. waldiez/exporting/agent/extras/group/target.py +178 -0
  12. waldiez/exporting/agent/extras/group_manager_agent_extas.py +500 -0
  13. waldiez/exporting/agent/extras/group_member_extras.py +181 -0
  14. waldiez/exporting/agent/extras/handoffs/__init__.py +19 -0
  15. waldiez/exporting/agent/extras/handoffs/after_work.py +78 -0
  16. waldiez/exporting/agent/extras/handoffs/available.py +74 -0
  17. waldiez/exporting/agent/extras/handoffs/condition.py +158 -0
  18. waldiez/exporting/agent/extras/handoffs/handoff.py +171 -0
  19. waldiez/exporting/agent/extras/handoffs/target.py +189 -0
  20. waldiez/exporting/agent/extras/rag/__init__.py +10 -0
  21. waldiez/exporting/agent/{utils/rag_user/chroma_utils.py → extras/rag/chroma_extras.py} +37 -24
  22. waldiez/exporting/agent/{utils/rag_user/mongo_utils.py → extras/rag/mongo_extras.py} +10 -10
  23. waldiez/exporting/agent/{utils/rag_user/pgvector_utils.py → extras/rag/pgvector_extras.py} +13 -13
  24. waldiez/exporting/agent/{utils/rag_user/qdrant_utils.py → extras/rag/qdrant_extras.py} +13 -13
  25. waldiez/exporting/agent/{utils/rag_user/vector_db.py → extras/rag/vector_db_extras.py} +59 -46
  26. waldiez/exporting/agent/extras/rag_user_proxy_agent_extras.py +245 -0
  27. waldiez/exporting/agent/extras/reasoning_agent_extras.py +88 -0
  28. waldiez/exporting/agent/factory.py +95 -0
  29. waldiez/exporting/agent/processor.py +150 -0
  30. waldiez/exporting/agent/system_message.py +36 -0
  31. waldiez/exporting/agent/termination.py +50 -0
  32. waldiez/exporting/chats/__init__.py +7 -3
  33. waldiez/exporting/chats/exporter.py +97 -0
  34. waldiez/exporting/chats/factory.py +65 -0
  35. waldiez/exporting/chats/processor.py +226 -0
  36. waldiez/exporting/chats/utils/__init__.py +6 -5
  37. waldiez/exporting/chats/utils/common.py +11 -45
  38. waldiez/exporting/chats/utils/group.py +55 -0
  39. waldiez/exporting/chats/utils/nested.py +37 -52
  40. waldiez/exporting/chats/utils/sequential.py +72 -61
  41. waldiez/exporting/chats/utils/{single_chat.py → single.py} +48 -50
  42. waldiez/exporting/core/__init__.py +196 -0
  43. waldiez/exporting/core/constants.py +17 -0
  44. waldiez/exporting/core/content.py +69 -0
  45. waldiez/exporting/core/context.py +244 -0
  46. waldiez/exporting/core/enums.py +89 -0
  47. waldiez/exporting/core/errors.py +19 -0
  48. waldiez/exporting/core/exporter.py +390 -0
  49. waldiez/exporting/core/exporters.py +67 -0
  50. waldiez/exporting/core/extras/__init__.py +39 -0
  51. waldiez/exporting/core/extras/agent_extras/__init__.py +27 -0
  52. waldiez/exporting/core/extras/agent_extras/captain_extras.py +57 -0
  53. waldiez/exporting/core/extras/agent_extras/group_manager_extras.py +102 -0
  54. waldiez/exporting/core/extras/agent_extras/rag_user_extras.py +53 -0
  55. waldiez/exporting/core/extras/agent_extras/reasoning_extras.py +68 -0
  56. waldiez/exporting/core/extras/agent_extras/standard_extras.py +263 -0
  57. waldiez/exporting/core/extras/base.py +241 -0
  58. waldiez/exporting/core/extras/chat_extras.py +118 -0
  59. waldiez/exporting/core/extras/flow_extras.py +70 -0
  60. waldiez/exporting/core/extras/model_extras.py +73 -0
  61. waldiez/exporting/core/extras/path_resolver.py +93 -0
  62. waldiez/exporting/core/extras/serializer.py +138 -0
  63. waldiez/exporting/core/extras/tool_extras.py +82 -0
  64. waldiez/exporting/core/protocols.py +259 -0
  65. waldiez/exporting/core/result.py +705 -0
  66. waldiez/exporting/core/types.py +329 -0
  67. waldiez/exporting/core/utils/__init__.py +11 -0
  68. waldiez/exporting/core/utils/comment.py +33 -0
  69. waldiez/exporting/core/utils/llm_config.py +117 -0
  70. waldiez/exporting/core/validation.py +96 -0
  71. waldiez/exporting/flow/__init__.py +6 -2
  72. waldiez/exporting/flow/execution_generator.py +193 -0
  73. waldiez/exporting/flow/exporter.py +107 -0
  74. waldiez/exporting/flow/factory.py +94 -0
  75. waldiez/exporting/flow/file_generator.py +214 -0
  76. waldiez/exporting/flow/merger.py +387 -0
  77. waldiez/exporting/flow/orchestrator.py +411 -0
  78. waldiez/exporting/flow/utils/__init__.py +9 -36
  79. waldiez/exporting/flow/utils/common.py +206 -0
  80. waldiez/exporting/flow/utils/importing.py +373 -0
  81. waldiez/exporting/flow/utils/linting.py +200 -0
  82. waldiez/exporting/flow/utils/{logging_utils.py → logging.py} +23 -9
  83. waldiez/exporting/models/__init__.py +3 -1
  84. waldiez/exporting/models/exporter.py +233 -0
  85. waldiez/exporting/models/factory.py +66 -0
  86. waldiez/exporting/models/processor.py +139 -0
  87. waldiez/exporting/tools/__init__.py +11 -0
  88. waldiez/exporting/tools/exporter.py +207 -0
  89. waldiez/exporting/tools/factory.py +57 -0
  90. waldiez/exporting/tools/processor.py +248 -0
  91. waldiez/exporting/tools/registration.py +133 -0
  92. waldiez/io/__init__.py +128 -0
  93. waldiez/io/_ws.py +199 -0
  94. waldiez/io/models/__init__.py +60 -0
  95. waldiez/io/models/base.py +66 -0
  96. waldiez/io/models/constants.py +78 -0
  97. waldiez/io/models/content/__init__.py +23 -0
  98. waldiez/io/models/content/audio.py +43 -0
  99. waldiez/io/models/content/base.py +45 -0
  100. waldiez/io/models/content/file.py +43 -0
  101. waldiez/io/models/content/image.py +96 -0
  102. waldiez/io/models/content/text.py +37 -0
  103. waldiez/io/models/content/video.py +43 -0
  104. waldiez/io/models/user_input.py +269 -0
  105. waldiez/io/models/user_response.py +215 -0
  106. waldiez/io/mqtt.py +681 -0
  107. waldiez/io/redis.py +782 -0
  108. waldiez/io/structured.py +439 -0
  109. waldiez/io/utils.py +184 -0
  110. waldiez/io/ws.py +298 -0
  111. waldiez/logger.py +481 -0
  112. waldiez/models/__init__.py +108 -51
  113. waldiez/models/agents/__init__.py +34 -70
  114. waldiez/models/agents/agent/__init__.py +10 -4
  115. waldiez/models/agents/agent/agent.py +466 -65
  116. waldiez/models/agents/agent/agent_data.py +119 -47
  117. waldiez/models/agents/agent/agent_type.py +13 -2
  118. waldiez/models/agents/agent/code_execution.py +12 -12
  119. waldiez/models/agents/agent/human_input_mode.py +8 -0
  120. waldiez/models/agents/agent/{linked_skill.py → linked_tool.py} +7 -7
  121. waldiez/models/agents/agent/nested_chat.py +35 -7
  122. waldiez/models/agents/agent/termination_message.py +30 -22
  123. waldiez/models/agents/{swarm_agent → agent}/update_system_message.py +22 -22
  124. waldiez/models/agents/agents.py +58 -63
  125. waldiez/models/agents/assistant/assistant.py +4 -4
  126. waldiez/models/agents/assistant/assistant_data.py +13 -1
  127. waldiez/models/agents/{captain_agent → captain}/captain_agent.py +5 -5
  128. waldiez/models/agents/{captain_agent → captain}/captain_agent_data.py +5 -5
  129. waldiez/models/agents/extra_requirements.py +11 -16
  130. waldiez/models/agents/group_manager/group_manager.py +103 -13
  131. waldiez/models/agents/group_manager/group_manager_data.py +36 -14
  132. waldiez/models/agents/group_manager/speakers.py +77 -24
  133. waldiez/models/agents/{rag_user → rag_user_proxy}/__init__.py +16 -16
  134. waldiez/models/agents/rag_user_proxy/rag_user_proxy.py +64 -0
  135. waldiez/models/agents/{rag_user/rag_user_data.py → rag_user_proxy/rag_user_proxy_data.py} +6 -5
  136. waldiez/models/agents/{rag_user → rag_user_proxy}/retrieve_config.py +182 -114
  137. waldiez/models/agents/{rag_user → rag_user_proxy}/vector_db_config.py +13 -13
  138. waldiez/models/agents/reasoning/reasoning_agent.py +6 -6
  139. waldiez/models/agents/reasoning/reasoning_agent_data.py +110 -63
  140. waldiez/models/agents/reasoning/reasoning_agent_reason_config.py +38 -10
  141. waldiez/models/agents/user_proxy/user_proxy.py +11 -7
  142. waldiez/models/agents/user_proxy/user_proxy_data.py +2 -2
  143. waldiez/models/chat/__init__.py +2 -1
  144. waldiez/models/chat/chat.py +166 -87
  145. waldiez/models/chat/chat_data.py +99 -136
  146. waldiez/models/chat/chat_message.py +33 -23
  147. waldiez/models/chat/chat_nested.py +31 -30
  148. waldiez/models/chat/chat_summary.py +10 -8
  149. waldiez/models/common/__init__.py +52 -2
  150. waldiez/models/common/ag2_version.py +1 -1
  151. waldiez/models/common/base.py +38 -7
  152. waldiez/models/common/dict_utils.py +42 -17
  153. waldiez/models/common/handoff.py +459 -0
  154. waldiez/models/common/id_generator.py +19 -0
  155. waldiez/models/common/method_utils.py +130 -68
  156. waldiez/{exporting/base/utils → models/common}/naming.py +38 -61
  157. waldiez/models/common/waldiez_version.py +37 -0
  158. waldiez/models/flow/__init__.py +9 -2
  159. waldiez/models/flow/connection.py +18 -0
  160. waldiez/models/flow/flow.py +311 -215
  161. waldiez/models/flow/flow_data.py +207 -40
  162. waldiez/models/flow/info.py +85 -0
  163. waldiez/models/flow/naming.py +131 -0
  164. waldiez/models/model/__init__.py +7 -1
  165. waldiez/models/model/extra_requirements.py +3 -12
  166. waldiez/models/model/model.py +76 -21
  167. waldiez/models/model/model_data.py +108 -20
  168. waldiez/models/tool/__init__.py +16 -0
  169. waldiez/models/tool/extra_requirements.py +36 -0
  170. waldiez/models/{skill/skill.py → tool/tool.py} +88 -88
  171. waldiez/models/tool/tool_data.py +51 -0
  172. waldiez/models/tool/tool_type.py +8 -0
  173. waldiez/models/waldiez.py +97 -80
  174. waldiez/runner.py +115 -61
  175. waldiez/running/__init__.py +13 -7
  176. waldiez/running/environment.py +49 -68
  177. waldiez/running/gen_seq_diagram.py +16 -14
  178. waldiez/running/post_run.py +119 -0
  179. waldiez/running/pre_run.py +149 -0
  180. waldiez/running/util.py +134 -0
  181. waldiez/utils/__init__.py +2 -4
  182. waldiez/utils/cli_extras/jupyter.py +5 -3
  183. waldiez/utils/cli_extras/runner.py +6 -4
  184. waldiez/utils/cli_extras/studio.py +6 -4
  185. waldiez/utils/conflict_checker.py +15 -9
  186. waldiez/utils/flaml_warnings.py +5 -5
  187. waldiez/utils/version.py +47 -0
  188. {waldiez-0.4.7.dist-info → waldiez-0.4.9.dist-info}/METADATA +235 -91
  189. waldiez-0.4.9.dist-info/RECORD +203 -0
  190. waldiez/exporting/agent/agent_exporter.py +0 -297
  191. waldiez/exporting/agent/utils/__init__.py +0 -23
  192. waldiez/exporting/agent/utils/captain_agent.py +0 -263
  193. waldiez/exporting/agent/utils/code_execution.py +0 -65
  194. waldiez/exporting/agent/utils/group_manager.py +0 -220
  195. waldiez/exporting/agent/utils/rag_user/__init__.py +0 -7
  196. waldiez/exporting/agent/utils/rag_user/rag_user.py +0 -209
  197. waldiez/exporting/agent/utils/reasoning.py +0 -36
  198. waldiez/exporting/agent/utils/swarm_agent.py +0 -469
  199. waldiez/exporting/agent/utils/teachability.py +0 -41
  200. waldiez/exporting/agent/utils/termination_message.py +0 -44
  201. waldiez/exporting/base/__init__.py +0 -25
  202. waldiez/exporting/base/agent_position.py +0 -75
  203. waldiez/exporting/base/base_exporter.py +0 -118
  204. waldiez/exporting/base/export_position.py +0 -48
  205. waldiez/exporting/base/import_position.py +0 -23
  206. waldiez/exporting/base/mixin.py +0 -137
  207. waldiez/exporting/base/utils/__init__.py +0 -18
  208. waldiez/exporting/base/utils/comments.py +0 -96
  209. waldiez/exporting/base/utils/path_check.py +0 -68
  210. waldiez/exporting/base/utils/to_string.py +0 -84
  211. waldiez/exporting/chats/chats_exporter.py +0 -240
  212. waldiez/exporting/chats/utils/swarm.py +0 -210
  213. waldiez/exporting/flow/flow_exporter.py +0 -528
  214. waldiez/exporting/flow/utils/agent_utils.py +0 -204
  215. waldiez/exporting/flow/utils/chat_utils.py +0 -71
  216. waldiez/exporting/flow/utils/def_main.py +0 -77
  217. waldiez/exporting/flow/utils/flow_content.py +0 -202
  218. waldiez/exporting/flow/utils/flow_names.py +0 -116
  219. waldiez/exporting/flow/utils/importing_utils.py +0 -227
  220. waldiez/exporting/models/models_exporter.py +0 -199
  221. waldiez/exporting/models/utils.py +0 -174
  222. waldiez/exporting/skills/__init__.py +0 -9
  223. waldiez/exporting/skills/skills_exporter.py +0 -176
  224. waldiez/exporting/skills/utils.py +0 -369
  225. waldiez/models/agents/agent/teachability.py +0 -70
  226. waldiez/models/agents/rag_user/rag_user.py +0 -60
  227. waldiez/models/agents/swarm_agent/__init__.py +0 -50
  228. waldiez/models/agents/swarm_agent/after_work.py +0 -179
  229. waldiez/models/agents/swarm_agent/on_condition.py +0 -105
  230. waldiez/models/agents/swarm_agent/on_condition_available.py +0 -142
  231. waldiez/models/agents/swarm_agent/on_condition_target.py +0 -40
  232. waldiez/models/agents/swarm_agent/swarm_agent.py +0 -107
  233. waldiez/models/agents/swarm_agent/swarm_agent_data.py +0 -124
  234. waldiez/models/flow/utils.py +0 -232
  235. waldiez/models/skill/__init__.py +0 -16
  236. waldiez/models/skill/extra_requirements.py +0 -36
  237. waldiez/models/skill/skill_data.py +0 -53
  238. waldiez/models/skill/skill_type.py +0 -8
  239. waldiez/running/running.py +0 -369
  240. waldiez/utils/pysqlite3_checker.py +0 -308
  241. waldiez/utils/rdps_checker.py +0 -122
  242. waldiez-0.4.7.dist-info/RECORD +0 -149
  243. /waldiez/models/agents/{captain_agent → captain}/__init__.py +0 -0
  244. /waldiez/models/agents/{captain_agent → captain}/captain_agent_lib_entry.py +0 -0
  245. {waldiez-0.4.7.dist-info → waldiez-0.4.9.dist-info}/WHEEL +0 -0
  246. {waldiez-0.4.7.dist-info → waldiez-0.4.9.dist-info}/entry_points.txt +0 -0
  247. {waldiez-0.4.7.dist-info → waldiez-0.4.9.dist-info}/licenses/LICENSE +0 -0
  248. {waldiez-0.4.7.dist-info → waldiez-0.4.9.dist-info}/licenses/NOTICE.md +0 -0
@@ -1,26 +1,28 @@
1
1
  # SPDX-License-Identifier: Apache-2.0.
2
2
  # Copyright (c) 2024 - 2025 Waldiez and contributors.
3
+ # SPDX-License-Identifier: Apache-2.0.
4
+ # Copyright (c) 2024 - 2025 Waldiez and contributors.
3
5
  """Update the agent's system message before they reply."""
4
6
 
5
- from typing import Optional, Tuple
7
+ from typing import Optional
6
8
 
7
9
  from pydantic import Field, model_validator
8
10
  from typing_extensions import Annotated, Literal, Self
9
11
 
10
12
  from ...common import WaldiezBase, check_function, generate_function
11
13
 
12
- WaldiezSwarmUpdateFunctionType = Literal["string", "callable"]
14
+ WaldiezAgentUpdateFunctionType = Literal["string", "callable"]
13
15
  """Possible types for the update function."""
14
16
 
15
17
  CUSTOM_UPDATE_SYSTEM_MESSAGE = "custom_update_system_message"
16
18
  CUSTOM_UPDATE_SYSTEM_MESSAGE_ARGS = ["agent", "messages"]
17
19
  CUSTOM_UPDATE_SYSTEM_MESSAGE_TYPES = (
18
- ["ConversableAgent", "List[Dict[str, Any]]"],
20
+ ["ConversableAgent", "list[dict[str, Any]]"],
19
21
  "str",
20
22
  )
21
23
 
22
24
 
23
- class WaldiezSwarmUpdateSystemMessage(WaldiezBase):
25
+ class WaldiezAgentUpdateSystemMessage(WaldiezBase):
24
26
  """Update the agent's system message before they reply.
25
27
 
26
28
  Attributes
@@ -36,18 +38,17 @@ class WaldiezSwarmUpdateSystemMessage(WaldiezBase):
36
38
  ```
37
39
  def custom_update_system_message(
38
40
  agent: ConversableAgent,
39
- messages: List[Dict[str, Any]]
41
+ messages: list[dict[str, Any]]
40
42
  ) -> str:
41
43
 
42
44
  ```
43
45
  """
44
46
 
45
- update_function_type: Annotated[
46
- WaldiezSwarmUpdateFunctionType,
47
+ type: Annotated[
48
+ WaldiezAgentUpdateFunctionType,
47
49
  Field(
48
50
  "string",
49
51
  title="Function Type",
50
- alias="updateFunctionType",
51
52
  description=(
52
53
  "The type of the update function. "
53
54
  "Can be either 'string' or 'callable'."
@@ -55,12 +56,11 @@ class WaldiezSwarmUpdateSystemMessage(WaldiezBase):
55
56
  ),
56
57
  ]
57
58
 
58
- update_function: Annotated[
59
+ content: Annotated[
59
60
  str,
60
61
  Field(
61
62
  ...,
62
- title="Update Function",
63
- alias="updateFunction",
63
+ title="Function Content",
64
64
  description=(
65
65
  "The string template or function definition to update "
66
66
  "the agent's system message. Can be a string or a Callable. "
@@ -70,20 +70,20 @@ class WaldiezSwarmUpdateSystemMessage(WaldiezBase):
70
70
  "is 'callable', it should have signature: "
71
71
  "def custom_update_system_message("
72
72
  " agent: ConversableAgent, "
73
- " messages: List[Dict[str, Any]] "
73
+ " messages: list[dict[str, Any]] "
74
74
  ") -> str"
75
75
  ),
76
76
  ),
77
77
  ]
78
78
 
79
- _update_function: str = ""
79
+ _content: str = ""
80
80
 
81
- def get_update_function(
81
+ def get_content(
82
82
  self,
83
83
  name_prefix: Optional[str] = None,
84
84
  name_suffix: Optional[str] = None,
85
- ) -> Tuple[str, str]:
86
- """Get the update function.
85
+ ) -> tuple[str, str]:
86
+ """Get the update function content.
87
87
 
88
88
  Parameters
89
89
  ----------
@@ -94,7 +94,7 @@ class WaldiezSwarmUpdateSystemMessage(WaldiezBase):
94
94
 
95
95
  Returns
96
96
  -------
97
- Tuple[str, str]
97
+ tuple[str, str]
98
98
  The update function and the function name.
99
99
 
100
100
  """
@@ -108,7 +108,7 @@ class WaldiezSwarmUpdateSystemMessage(WaldiezBase):
108
108
  function_name=function_name,
109
109
  function_args=CUSTOM_UPDATE_SYSTEM_MESSAGE_ARGS,
110
110
  function_types=CUSTOM_UPDATE_SYSTEM_MESSAGE_TYPES,
111
- function_body=self._update_function,
111
+ function_body=self._content,
112
112
  ),
113
113
  function_name,
114
114
  )
@@ -129,10 +129,10 @@ class WaldiezSwarmUpdateSystemMessage(WaldiezBase):
129
129
  or if the function type is not 'string' or 'callable'.
130
130
 
131
131
  """
132
- self._update_function = self.update_function
133
- if self.update_function_type == "callable":
132
+ self._content = self.content
133
+ if self.type == "callable":
134
134
  valid, error_or_body = check_function(
135
- code_string=self.update_function,
135
+ code_string=self._content,
136
136
  function_name=CUSTOM_UPDATE_SYSTEM_MESSAGE,
137
137
  function_args=CUSTOM_UPDATE_SYSTEM_MESSAGE_ARGS,
138
138
  )
@@ -141,5 +141,5 @@ class WaldiezSwarmUpdateSystemMessage(WaldiezBase):
141
141
  raise ValueError(
142
142
  f"Invalid custom method: {error_or_body or 'no content'}"
143
143
  )
144
- self._update_function = error_or_body
144
+ self._content = error_or_body
145
145
  return self
@@ -2,7 +2,7 @@
2
2
  # Copyright (c) 2024 - 2025 Waldiez and contributors.
3
3
  """Waldiez agents model."""
4
4
 
5
- from typing import Iterator, List
5
+ from typing import Iterator
6
6
 
7
7
  from pydantic import Field, model_validator
8
8
  from typing_extensions import Annotated, Self
@@ -10,11 +10,10 @@ from typing_extensions import Annotated, Self
10
10
  from ..common import WaldiezBase
11
11
  from .agent import WaldiezAgent
12
12
  from .assistant import WaldiezAssistant
13
- from .captain_agent import WaldiezCaptainAgent
13
+ from .captain import WaldiezCaptainAgent
14
14
  from .group_manager import WaldiezGroupManager
15
- from .rag_user import WaldiezRagUser
15
+ from .rag_user_proxy import WaldiezRagUserProxy
16
16
  from .reasoning import WaldiezReasoningAgent
17
- from .swarm_agent import WaldiezSwarmAgent
18
17
  from .user_proxy import WaldiezUserProxy
19
18
 
20
19
 
@@ -23,72 +22,68 @@ class WaldiezAgents(WaldiezBase):
23
22
 
24
23
  Attributes
25
24
  ----------
26
- users : List[WaldiezUserProxy]
25
+ userProxyAgents : list[WaldiezUserProxy]
27
26
  User proxy agents.
28
- assistants : List[WaldiezAssistant]
27
+ assistantAgents : list[WaldiezAssistant]
29
28
  Assistant agents.
30
- managers : List[WaldiezGroupManager]
31
- Group chat managers.
32
- rag_users : List[WaldiezRagUser]
33
- RAG user agents.
29
+ ragUserProxyAgents : list[WaldiezRagUserProxy]
30
+ RAG user proxy agents.
31
+ reasoningAgents : list[WaldiezReasoningAgent]
32
+ Reasoning agents.
33
+ captainAgents : list[WaldiezCaptainAgent]
34
+ Captain agents.
35
+ groupManagerAgents : list[WaldiezGroupManager]
36
+ Group manager agents.
34
37
  """
35
38
 
36
- users: Annotated[
37
- List[WaldiezUserProxy],
39
+ userProxyAgents: Annotated[
40
+ list[WaldiezUserProxy],
38
41
  Field(
39
- title="Users.",
40
- description="User proxy agents",
42
+ title="User Proxy Agents.",
43
+ description="The User proxy agents in the flow.",
41
44
  default_factory=list,
42
45
  ),
43
- ]
44
- assistants: Annotated[
45
- List[WaldiezAssistant],
46
+ ] = []
47
+ assistantAgents: Annotated[
48
+ list[WaldiezAssistant],
46
49
  Field(
47
- title="Assistants.",
48
- description="Assistant agents",
50
+ title="Assistant Agents.",
51
+ description="The assistant agents in the flow.",
49
52
  default_factory=list,
50
53
  ),
51
- ]
52
- managers: Annotated[
53
- List[WaldiezGroupManager],
54
+ ] = []
55
+ ragUserProxyAgents: Annotated[
56
+ list[WaldiezRagUserProxy],
54
57
  Field(
55
- title="Managers.",
56
- description="Group chat managers",
58
+ title="RAG Users Proxy agents.",
59
+ description="The RAG user proxy agents in the flow.",
57
60
  default_factory=list,
58
61
  ),
59
- ]
60
- rag_users: Annotated[
61
- List[WaldiezRagUser],
62
+ ] = []
63
+ reasoningAgents: Annotated[
64
+ list[WaldiezReasoningAgent],
62
65
  Field(
63
- title="RAG Users.",
64
- description="RAG user agents",
65
- default_factory=list,
66
- ),
67
- ]
68
- swarm_agents: Annotated[
69
- List[WaldiezSwarmAgent],
70
- Field(
71
- title="Swarm Agents.",
72
- description="Swarm agents",
66
+ title="Reasoning Agents.",
67
+ description="The Reasoning agents in the flow.",
73
68
  default_factory=list,
74
69
  ),
75
- ]
76
- reasoning_agents: Annotated[
77
- List[WaldiezReasoningAgent],
70
+ ] = []
71
+ captainAgents: Annotated[
72
+ list[WaldiezCaptainAgent],
78
73
  Field(
79
- title="Reasoning Agents.",
80
- description="Reasoning agents",
74
+ title="Captain Agents.",
75
+ description="The Captain agents in the flow.",
81
76
  default_factory=list,
82
77
  ),
83
- ]
84
- captain_agents: Annotated[
85
- List[WaldiezCaptainAgent],
78
+ ] = []
79
+ groupManagerAgents: Annotated[
80
+ list[WaldiezGroupManager],
86
81
  Field(
87
- title="Captain Agents.",
88
- description="Captain agents",
82
+ title="Group Manager Agents.",
83
+ description="The Group manager agents in the flow.",
89
84
  default_factory=list,
90
85
  ),
91
- ]
86
+ ] = []
92
87
 
93
88
  @property
94
89
  def members(self) -> Iterator[WaldiezAgent]:
@@ -99,13 +94,12 @@ class WaldiezAgents(WaldiezBase):
99
94
  WaldiezAgent
100
95
  The agents.
101
96
  """
102
- yield from self.users
103
- yield from self.assistants
104
- yield from self.rag_users
105
- yield from self.reasoning_agents
106
- yield from self.swarm_agents
107
- yield from self.managers
108
- yield from self.captain_agents
97
+ yield from self.userProxyAgents
98
+ yield from self.assistantAgents
99
+ yield from self.ragUserProxyAgents
100
+ yield from self.reasoningAgents
101
+ yield from self.captainAgents
102
+ yield from self.groupManagerAgents
109
103
 
110
104
  @model_validator(mode="after")
111
105
  def validate_agents(self) -> Self:
@@ -131,19 +125,19 @@ class WaldiezAgents(WaldiezBase):
131
125
  raise ValueError("Agent IDs must be unique.")
132
126
  return self
133
127
 
134
- def validate_flow(self, model_ids: List[str], skill_ids: List[str]) -> None:
128
+ def validate_flow(self, model_ids: list[str], tool_ids: list[str]) -> None:
135
129
  """Validate the flow of the agents.
136
130
 
137
131
  - Validate the linked models (the referenced model ids must exist).
138
- - Validate the linked skills (the referenced skill ids must exist).
132
+ - Validate the linked tools (the referenced tool ids must exist).
139
133
  - Validate the code execution (the referenced functions must exist).
140
134
 
141
135
  Parameters
142
136
  ----------
143
- model_ids : List[str]
137
+ model_ids : list[str]
144
138
  The list of model IDs.
145
- skill_ids : List[str]
146
- The list of skill IDs.
139
+ tool_ids : list[str]
140
+ The list of tool IDs.
147
141
 
148
142
  Raises
149
143
  ------
@@ -153,9 +147,10 @@ class WaldiezAgents(WaldiezBase):
153
147
  all_agent_ids = [agent.id for agent in self.members]
154
148
  for agent in self.members:
155
149
  agent.validate_linked_models(model_ids)
156
- agent.validate_linked_skills(skill_ids, agent_ids=all_agent_ids)
157
- agent.validate_code_execution(skill_ids=skill_ids)
158
- if agent.agent_type == "manager" and isinstance(
150
+ agent.validate_linked_tools(tool_ids, agent_ids=all_agent_ids)
151
+ agent.validate_code_execution(tool_ids=tool_ids)
152
+ if agent.is_group_manager and isinstance(
159
153
  agent, WaldiezGroupManager
160
154
  ):
155
+ agent.validate_initial_agent_id(all_agent_ids)
161
156
  agent.validate_transitions(agent_ids=all_agent_ids)
@@ -24,7 +24,7 @@ class WaldiezAssistant(WaldiezAgent):
24
24
  The assistant agent's data
25
25
  """
26
26
 
27
- agent_type: Annotated[
27
+ agent_type: Annotated[ # pyright: ignore
28
28
  Literal["assistant"],
29
29
  Field(
30
30
  "assistant",
@@ -32,12 +32,12 @@ class WaldiezAssistant(WaldiezAgent):
32
32
  description="The agent type in a graph: 'assistant'",
33
33
  alias="agentType",
34
34
  ),
35
- ]
36
- data: Annotated[
35
+ ] = "assistant"
36
+ data: Annotated[ # pyright: ignore
37
37
  WaldiezAssistantData,
38
38
  Field(
39
39
  title="Data",
40
40
  description="The assistant agent's data",
41
- default_factory=WaldiezAssistantData,
41
+ default_factory=WaldiezAssistantData, # pyright: ignore
42
42
  ),
43
43
  ]
@@ -18,6 +18,9 @@ class WaldiezAssistantData(WaldiezAgentData):
18
18
  ----------
19
19
  human_input_mode : Literal["ALWAYS", "NEVER", "TERMINATE"]
20
20
  The human input mode, Defaults to `NEVER`
21
+ is_multimodal : bool
22
+ A flag to indicate if the agent is multimodal.
23
+ Defaults to `False`.
21
24
  """
22
25
 
23
26
  human_input_mode: Annotated[
@@ -28,4 +31,13 @@ class WaldiezAssistantData(WaldiezAgentData):
28
31
  description="The human input mode, Defaults to `NEVER`",
29
32
  alias="humanInputMode",
30
33
  ),
31
- ]
34
+ ] = "NEVER"
35
+ is_multimodal: Annotated[
36
+ bool,
37
+ Field(
38
+ False,
39
+ title="Is multimodal",
40
+ description="A flag to indicate if the agent is multimodal.",
41
+ alias="isMultimodal",
42
+ ),
43
+ ] = False
@@ -26,20 +26,20 @@ class WaldiezCaptainAgent(WaldiezAgent):
26
26
  The captain agent's data.
27
27
  """
28
28
 
29
- agent_type: Annotated[
29
+ agent_type: Annotated[ # pyright: ignore
30
30
  Literal["captain"],
31
31
  Field(
32
- "captain",
32
+ default="captain",
33
33
  title="Agent type",
34
34
  description="The agent type: 'captain' for a captain agent",
35
35
  alias="agentType",
36
36
  ),
37
- ]
38
- data: Annotated[
37
+ ] = "captain"
38
+ data: Annotated[ # pyright: ignore
39
39
  WaldiezCaptainAgentData,
40
40
  Field(
41
41
  title="Data",
42
42
  description="The captain agent's data",
43
- default_factory=WaldiezCaptainAgentData,
43
+ default_factory=WaldiezCaptainAgentData, # pyright: ignore
44
44
  ),
45
45
  ]
@@ -2,7 +2,7 @@
2
2
  # Copyright (c) 2024 - 2025 Waldiez and contributors.
3
3
  """Waldiez captain agent data."""
4
4
 
5
- from typing import List, Optional
5
+ from typing import Optional
6
6
 
7
7
  from pydantic import Field
8
8
  from typing_extensions import Annotated, Literal
@@ -25,7 +25,7 @@ class WaldiezCaptainAgentData(WaldiezAgentData):
25
25
  """
26
26
 
27
27
  agent_lib: Annotated[
28
- List[WaldiezCaptainAgentLibEntry],
28
+ list[WaldiezCaptainAgentLibEntry],
29
29
  Field(
30
30
  default_factory=list,
31
31
  title="Agent lib",
@@ -36,7 +36,7 @@ class WaldiezCaptainAgentData(WaldiezAgentData):
36
36
  tool_lib: Annotated[
37
37
  Optional[Literal["default"]],
38
38
  Field(
39
- None,
39
+ default=None,
40
40
  title="Tool lib",
41
41
  description="Whether to use the default tool lib",
42
42
  alias="toolLib",
@@ -45,7 +45,7 @@ class WaldiezCaptainAgentData(WaldiezAgentData):
45
45
  max_round: Annotated[
46
46
  int,
47
47
  Field(
48
- 10,
48
+ default=10,
49
49
  title="Max round",
50
50
  description="The maximum number of rounds in a group chat",
51
51
  alias="maxRound",
@@ -54,7 +54,7 @@ class WaldiezCaptainAgentData(WaldiezAgentData):
54
54
  max_turns: Annotated[
55
55
  int,
56
56
  Field(
57
- 5,
57
+ default=5,
58
58
  title="Max turns",
59
59
  description="The maximum number of turns for a chat",
60
60
  alias="maxTurns",
@@ -3,11 +3,10 @@
3
3
  """Extra requirements for agents."""
4
4
 
5
5
  # pylint: disable=line-too-long
6
- import platform
7
- from typing import Iterator, List, Set
6
+ from typing import Iterator, Set
8
7
 
9
8
  from .agent import WaldiezAgent
10
- from .rag_user import WaldiezRagUser
9
+ from .rag_user_proxy import WaldiezRagUserProxy
11
10
 
12
11
 
13
12
  def get_retrievechat_extra_requirements(
@@ -17,7 +16,7 @@ def get_retrievechat_extra_requirements(
17
16
 
18
17
  Parameters
19
18
  ----------
20
- agents : List[WaldiezAgent]
19
+ agents : list[WaldiezAgent]
21
20
  The flow agents.
22
21
 
23
22
  Returns
@@ -26,10 +25,9 @@ def get_retrievechat_extra_requirements(
26
25
  The retrievechat extra requirements.
27
26
  """
28
27
  # https://github.com/ag2ai/ag2/blob/main/pyproject.toml
29
- # with chromadb relaxed
30
- # to avoid conflicts with other extras and (later) allow py3.13
28
+ # with chromadb and sentence_transdormers relaxed
31
29
  rag_requirements: Set[str] = {
32
- "protobuf==4.25.3",
30
+ "protobuf==5.29.3",
33
31
  "chromadb>=0.5.23",
34
32
  "sentence_transformers",
35
33
  "pypdf",
@@ -38,7 +36,7 @@ def get_retrievechat_extra_requirements(
38
36
  "markdownify",
39
37
  }
40
38
  for agent in agents:
41
- if agent.agent_type == "rag_user" and isinstance(agent, WaldiezRagUser):
39
+ if agent.is_rag_user and isinstance(agent, WaldiezRagUserProxy):
42
40
  # if not chroma, get the relevant db requirements
43
41
  db_type = agent.data.retrieve_config.vector_db
44
42
  if db_type == "pgvector":
@@ -55,12 +53,12 @@ def get_retrievechat_extra_requirements(
55
53
  return rag_requirements
56
54
 
57
55
 
58
- def get_captain_agent_extra_requirements() -> List[str]:
56
+ def get_captain_agent_extra_requirements() -> list[str]:
59
57
  """Get the captain agent extra requirements.
60
58
 
61
59
  Returns
62
60
  -------
63
- List[str]
61
+ list[str]
64
62
  The captain agent extra requirements.
65
63
  """
66
64
  # https://github.com/ag2ai/ag2/blob/main/autogen/agentchat/contrib/captainagent/tools/requirements.txt # noqa: E501
@@ -72,17 +70,14 @@ def get_captain_agent_extra_requirements() -> List[str]:
72
70
  "easyocr",
73
71
  "python-pptx",
74
72
  "openai-whisper",
75
- "pandas",
76
73
  "scipy",
77
- # "sentence-transformers", also in agent_requirements
74
+ # "pandas", also in agent_requirements below
75
+ # "sentence-transformers", also in agent_requirements below
78
76
  ]
79
77
  agent_requirements = [
78
+ "pandas",
80
79
  "chromadb",
81
80
  "sentence-transformers",
82
81
  "huggingface-hub",
83
82
  ]
84
- if platform.system() == "Linux":
85
- agent_requirements.append("pysqlite3-binary")
86
- # on windows and OSX, installing pysqlite3-binary seem to fail in some cases
87
- # we can handle/install if needed in waldiez.utils.pysqlite3_checker
88
83
  return tool_requirements + agent_requirements