camel-ai 0.2.71a9__py3-none-any.whl → 0.2.71a10__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 camel-ai might be problematic. Click here for more details.

camel/__init__.py CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  from camel.logger import disable_logging, enable_logging, set_log_level
16
16
 
17
- __version__ = '0.2.71a9'
17
+ __version__ = '0.2.71a10'
18
18
 
19
19
  __all__ = [
20
20
  '__version__',
@@ -196,7 +196,11 @@ Now you should summarize the scenario and return the result of the task.
196
196
  """
197
197
  )
198
198
 
199
- WF_TASK_DECOMPOSE_PROMPT = r"""You need to decompose the given task into subtasks according to the workers available in the group, following these important principles to maximize efficiency and parallelism:
199
+ TASK_DECOMPOSE_PROMPT = r"""You need to decompose the given task into subtasks according to the workers available in the group, following these important principles to maximize efficiency, parallelism, and clarity for the executing agents:
200
+
201
+ 1. **Self-Contained Subtasks**: This is the most critical principle. Each subtask's description **must be fully self-sufficient and independently understandable**. The agent executing the subtask has **no knowledge** of the parent task, other subtasks, or the overall workflow.
202
+ * **DO NOT** use relative references like "the first task," "the paper mentioned above," or "the result from the previous step."
203
+ * **DO** write explicit instructions. For example, instead of "Analyze the document," write "Analyze the document titled 'The Future of AI'." The system will automatically provide the necessary inputs (like the document itself) from previous steps.
200
204
 
201
205
  1. **Strategic Grouping for Sequential Work**:
202
206
  * If a series of steps must be done in order *and* can be handled by the same worker type, group them into a single subtask to maintain flow and minimize handoffs.
@@ -218,17 +222,17 @@ These principles aim to reduce overall completion time by maximizing concurrent
218
222
 
219
223
  If given a hypothetical task requiring research, analysis, and reporting with multiple items to process, you should decompose it to maximize parallelism:
220
224
 
221
- * Poor decomposition (monolithic):
225
+ * Poor decomposition (monolithic and vague):
222
226
  `<tasks><task>Do all research, analysis, and write final report.</task></tasks>`
223
227
 
224
- * Better decomposition (parallel structure):
228
+ * **Excellent decomposition (self-contained and parallel)**:
225
229
  ```
226
230
  <tasks>
227
- <task>Subtask 1 (ResearchAgent): Gather initial data and resources.</task>
228
- <task>Subtask 2.1 (AnalysisAgent): Analyze Item A from Subtask 1 results.</task>
229
- <task>Subtask 2.2 (AnalysisAgent): Analyze Item B from Subtask 1 results.</task>
230
- <task>Subtask 2.N (AnalysisAgent): Analyze Item N from Subtask 1 results.</task>
231
- <task>Subtask 3 (ReportAgent): Compile all analyses into final report.</task>
231
+ <task>(ResearchAgent): Gather data and resources on topic X, producing a list of relevant items.</task>
232
+ <task>(AnalysisAgent): Analyze the provided document 'Item A'.</task>
233
+ <task>(AnalysisAgent): Analyze the provided document 'Item B'.</task>
234
+ <task>(AnalysisAgent): Analyze the provided document 'Item N'.</task>
235
+ <task>(ReportAgent): Compile the provided analyses of items A, B, and N into a final report.</task>
232
236
  </tasks>
233
237
  ```
234
238
 
@@ -261,10 +265,11 @@ You must return the subtasks as a list of individual subtasks within <tasks> tag
261
265
  </tasks>
262
266
 
263
267
  Each subtask should be:
264
- - Clear and concise
265
- - Achievable by a single worker
266
- - Contain all sequential steps that should be performed by the same worker type
267
- - Only separated from other subtasks when parallel execution by different worker types is beneficial
268
+ - **Self-contained and independently understandable.**
269
+ - Clear and concise.
270
+ - Achievable by a single worker.
271
+ - Containing all sequential steps that should be performed by the same worker type.
272
+ - Written without any relative references (e.g., "the previous task").
268
273
  """
269
274
 
270
275
  FAILURE_ANALYSIS_PROMPT = TextPrompt(
@@ -87,15 +87,9 @@ class Worker(BaseNode, ABC):
87
87
  f"{Fore.YELLOW}{self} get task {task.id}: {task.content}"
88
88
  f"{Fore.RESET}"
89
89
  )
90
- # Get the Task instance of dependencies
91
- dependency_ids = await self._channel.get_dependency_ids()
92
- task_dependencies = [
93
- await self._channel.get_task_by_id(dep_id)
94
- for dep_id in dependency_ids
95
- ]
96
90
 
97
91
  # Process the task
98
- task_state = await self._process_task(task, task_dependencies)
92
+ task_state = await self._process_task(task, [])
99
93
 
100
94
  # Update the result and status of the task
101
95
  task.set_state(task_state)
@@ -44,7 +44,7 @@ from camel.societies.workforce.prompts import (
44
44
  ASSIGN_TASK_PROMPT,
45
45
  CREATE_NODE_PROMPT,
46
46
  FAILURE_ANALYSIS_PROMPT,
47
- WF_TASK_DECOMPOSE_PROMPT,
47
+ TASK_DECOMPOSE_PROMPT,
48
48
  )
49
49
  from camel.societies.workforce.role_playing_worker import RolePlayingWorker
50
50
  from camel.societies.workforce.single_agent_worker import SingleAgentWorker
@@ -730,7 +730,7 @@ class Workforce(BaseNode):
730
730
  Union[List[Task], Generator[List[Task], None, None]]:
731
731
  The subtasks or generator of subtasks.
732
732
  """
733
- decompose_prompt = WF_TASK_DECOMPOSE_PROMPT.format(
733
+ decompose_prompt = TASK_DECOMPOSE_PROMPT.format(
734
734
  content=task.content,
735
735
  child_nodes_info=self._get_child_nodes_info(),
736
736
  additional_info=task.additional_info,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: camel-ai
3
- Version: 0.2.71a9
3
+ Version: 0.2.71a10
4
4
  Summary: Communicative Agents for AI Society Study
5
5
  Project-URL: Homepage, https://www.camel-ai.org/
6
6
  Project-URL: Repository, https://github.com/camel-ai/camel
@@ -1,4 +1,4 @@
1
- camel/__init__.py,sha256=5n7NZMAxb749oqgkyLbTX4gLlHYBd4c8HTvC0fzotXg,901
1
+ camel/__init__.py,sha256=SVt5eoUz6dQCW5uOcU6k9K8XET0mIj6RAZBzc9ixhgI,902
2
2
  camel/generators.py,sha256=JRqj9_m1PF4qT6UtybzTQ-KBT9MJQt18OAAYvQ_fr2o,13844
3
3
  camel/human.py,sha256=Xg8x1cS5KK4bQ1SDByiHZnzsRpvRP-KZViNvmu38xo4,5475
4
4
  camel/logger.py,sha256=WgEwael_eT6D-lVAKHpKIpwXSTjvLbny5jbV1Ab8lnA,5760
@@ -273,14 +273,14 @@ camel/societies/babyagi_playing.py,sha256=KbTdpHfZ2V8AripVck0bNTOyF-RSaMPCRARz3D
273
273
  camel/societies/role_playing.py,sha256=0XScr3WfxX1QOC71RhBLmrcS5y2c7DMQB_mAFOHU34M,31421
274
274
  camel/societies/workforce/__init__.py,sha256=bkTI-PE-MSK9AQ2V2gR6cR2WY-R7Jqy_NmXRtAoqo8o,920
275
275
  camel/societies/workforce/base.py,sha256=z2DmbTP5LL5-aCAAqglznQqCLfPmnyM5zD3w6jjtsb8,2175
276
- camel/societies/workforce/prompts.py,sha256=gobVelz7rRdReogFG2QCfFy21GfhaQJyoiNnKWo4EHE,14391
276
+ camel/societies/workforce/prompts.py,sha256=46qAt4CZeCqLFMt2EZIeiOWXai4DT9PIpWjkI0VbwGk,15168
277
277
  camel/societies/workforce/role_playing_worker.py,sha256=z5-OcNiaNEaoC206_3HD7xeonuUkD-XTxYbD3AqoNC8,10319
278
278
  camel/societies/workforce/single_agent_worker.py,sha256=fXgAEkDMhvTd-nbwy5Gw3BOaRAiPsL8mf3AW1aaNqKU,19342
279
279
  camel/societies/workforce/structured_output_handler.py,sha256=xr8szFN86hg3jQ825aEkJTjkSFQnTlbinVg4j1vZJVI,17870
280
280
  camel/societies/workforce/task_channel.py,sha256=GWHaGQBpjTzdKbWoBYAQzzAiLKRKRXa6beqtc4cg-Is,7611
281
281
  camel/societies/workforce/utils.py,sha256=THgNHSeZsNVnjTzQTur3qCJhi72MrDS8X2gPET174cI,8434
282
- camel/societies/workforce/worker.py,sha256=k_AokiF-HAfq6Cd5SQYb0uaoJsA_kSwV_n5o1fxvzmo,6522
283
- camel/societies/workforce/workforce.py,sha256=HD9Q5U4hqtTYewNWbYxa7u6ojW6lyGX_o_K7alm4S6E,138306
282
+ camel/societies/workforce/worker.py,sha256=wImTK95gXBfnfzEaInUKJyyRSPlHJUyV9dONjofbVu8,6233
283
+ camel/societies/workforce/workforce.py,sha256=yiKEULgeNl5Red3LGhDZzY63tFZpcEkCKFivVKTfIKg,138300
284
284
  camel/societies/workforce/workforce_logger.py,sha256=0YT__ys48Bgn0IICKIZBmSWhON-eA1KShebjCdn5ppE,24525
285
285
  camel/storages/__init__.py,sha256=RwpEyvxpMbJzVDZJJygeBg4AzyYMkTjjkfB53hTuqGo,2141
286
286
  camel/storages/graph_storages/__init__.py,sha256=G29BNn651C0WTOpjCl4QnVM-4B9tcNh8DdmsCiONH8Y,948
@@ -446,7 +446,7 @@ camel/verifiers/math_verifier.py,sha256=tA1D4S0sm8nsWISevxSN0hvSVtIUpqmJhzqfbuMo
446
446
  camel/verifiers/models.py,sha256=GdxYPr7UxNrR1577yW4kyroRcLGfd-H1GXgv8potDWU,2471
447
447
  camel/verifiers/physics_verifier.py,sha256=c1grrRddcrVN7szkxhv2QirwY9viIRSITWeWFF5HmLs,30187
448
448
  camel/verifiers/python_verifier.py,sha256=ogTz77wODfEcDN4tMVtiSkRQyoiZbHPY2fKybn59lHw,20558
449
- camel_ai-0.2.71a9.dist-info/METADATA,sha256=3IG3o0Zfp79IqN8Y6I6N5jJsjw0-A9A_gqwDszF8qLw,50002
450
- camel_ai-0.2.71a9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
451
- camel_ai-0.2.71a9.dist-info/licenses/LICENSE,sha256=id0nB2my5kG0xXeimIu5zZrbHLS6EQvxvkKkzIHaT2k,11343
452
- camel_ai-0.2.71a9.dist-info/RECORD,,
449
+ camel_ai-0.2.71a10.dist-info/METADATA,sha256=QLd0G8GK8Yk3FoOBa6p6kh2oTl-ChEguicXtGpcVEKk,50003
450
+ camel_ai-0.2.71a10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
451
+ camel_ai-0.2.71a10.dist-info/licenses/LICENSE,sha256=id0nB2my5kG0xXeimIu5zZrbHLS6EQvxvkKkzIHaT2k,11343
452
+ camel_ai-0.2.71a10.dist-info/RECORD,,