Skip to content

Commit d86b864

Browse files
fengju0213nitpicker55555zjrwtxopenhands-agentWendong-Fan
authored
chore: enhance_workforce_prompt and remove the taskplan_toolkit (#3431)
Co-authored-by: Puzhen Zhang <[email protected]> Co-authored-by: Yifeng Wang(正经人王同学) <[email protected]> Co-authored-by: openhands <[email protected]> Co-authored-by: Wendong-Fan <[email protected]>
1 parent ae424be commit d86b864

File tree

7 files changed

+61
-60
lines changed

7 files changed

+61
-60
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ body:
2626
attributes:
2727
label: What version of camel are you using?
2828
description: Run command `python3 -c 'print(__import__("camel").__version__)'` in your shell and paste the output here.
29-
placeholder: E.g., 0.2.80a1
29+
placeholder: E.g., 0.2.80a2
3030
validations:
3131
required: true
3232

camel/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from camel.logger import disable_logging, enable_logging, set_log_level
1616

17-
__version__ = '0.2.80a1'
17+
__version__ = '0.2.80a2'
1818

1919
__all__ = [
2020
'__version__',

camel/societies/workforce/prompts.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@
278278
{child_nodes_info}
279279
==============================
280280
281-
You must return the subtasks as a list of individual subtasks within <tasks> tags. If your decomposition, following the principles and detailed example above (e.g., for summarizing multiple papers), results in several parallelizable actions, EACH of those actions must be represented as a separate <task> entry. For instance, the general format is:
281+
You must output all subtasks strictly as individual <task> elements enclosed within a single <tasks> root.
282+
If your decomposition produces multiple parallelizable or independent actions, each action MUST be represented as its own <task> element, without grouping or merging.
283+
Your final output must follow exactly this structure:
282284
283285
<tasks>
284286
<task>Subtask 1</task>

camel/societies/workforce/workforce.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
CodeExecutionToolkit,
8787
FunctionTool,
8888
SearchToolkit,
89-
TaskPlanningToolkit,
9089
ThinkingToolkit,
9190
)
9291
from camel.types import ModelPlatformType, ModelType
@@ -184,9 +183,9 @@ class Workforce(BaseNode):
184183
task_agent (Optional[ChatAgent], optional): A custom task planning
185184
agent instance for task decomposition and composition. If
186185
provided, the workforce will create a new agent using this agent's
187-
model configuration but with the required system message and tools
188-
(TaskPlanningToolkit). If None, a default agent will be created
189-
using DEFAULT model settings. (default: :obj:`None`)
186+
model configuration but with the required system message. If None,
187+
a default agent will be created using DEFAULT model settings.
188+
(default: :obj:`None`)
190189
new_worker_agent (Optional[ChatAgent], optional): A template agent for
191190
workers created dynamically at runtime when existing workers cannot
192191
handle failed tasks. If None, workers will be created with default
@@ -384,23 +383,20 @@ def __init__(
384383
stop_event=coordinator_agent.stop_event,
385384
)
386385

387-
# Set up task agent with default system message and required tools
386+
# Set up task agent with default system message
388387
task_sys_msg = BaseMessage.make_assistant_message(
389388
role_name="Task Planner",
390389
content=TASK_AGENT_SYSTEM_MESSAGE,
391390
)
392-
task_planning_tools = TaskPlanningToolkit().get_tools()
393391

394392
if task_agent is None:
395393
logger.warning(
396394
"No task_agent provided. Using default ChatAgent "
397395
"settings (ModelPlatformType.DEFAULT, ModelType.DEFAULT) "
398-
"with default system message and TaskPlanningToolkit."
396+
"with default system message."
399397
)
400-
task_tools = TaskPlanningToolkit().get_tools()
401398
self.task_agent = ChatAgent(
402399
task_sys_msg,
403-
tools=task_tools, # type: ignore[arg-type]
404400
)
405401
else:
406402
logger.info(
@@ -425,8 +421,7 @@ def __init__(
425421
# function names as keys, we don't need to manually deduplicate.
426422
combined_tools: List[Union[FunctionTool, Callable]] = cast(
427423
List[Union[FunctionTool, Callable]],
428-
list(task_agent._internal_tools.values())
429-
+ task_planning_tools,
424+
list(task_agent._internal_tools.values()),
430425
)
431426

432427
# Create a new agent with the provided agent's configuration

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
project = 'CAMEL'
2828
copyright = '2024, CAMEL-AI.org'
2929
author = 'CAMEL-AI.org'
30-
release = '0.2.80a1'
30+
release = '0.2.80a2'
3131

3232
html_favicon = (
3333
'https://raw.githubusercontent.com/camel-ai/camel/master/misc/favicon.png'

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "camel-ai"
7-
version = "0.2.80a1"
7+
version = "0.2.80a2"
88
description = "Communicative Agents for AI Society Study"
99
authors = [{ name = "CAMEL-AI.org" }]
1010
requires-python = ">=3.10,<3.15"

0 commit comments

Comments
 (0)