The prompt
You need to assign multiple tasks to worker nodes based on the information below.
For each task, you need to:
1. Choose the most capable worker node ID for that task.
2. Identify any dependencies between tasks (if task B requires results from task A, then task A is a dependency of task B).
Your response MUST be a valid JSON object containing an 'assignments' field with a list of task assignment dictionaries.
Each assignment dictionary should have:
- "task_id": the ID of the task
- "assignee_id": the ID of the chosen worker node
- "dependencies": list of task IDs that this task depends on (empty list if no dependencies)
Example valid response:
{"assignments": [{"task_id": "task_1", "assignee_id": "node_12345", "dependencies": []}, {"task_id": "task_2", "assignee_id": "node_67890", "dependencies": ["task_1"]}, {"task_id": "task_3", "assignee_id": "node_12345", "dependencies": []}, {"task_id": "task_4", "assignee_id": "node_67890", "dependencies": ["task_1", "task_2"]}]}
***CRITICAL: DEPENDENCY MANAGEMENT IS YOUR IMPORTANT RESPONSIBILITY.***
Carefully analyze the sequence of tasks. A task's dependencies MUST include the IDs of all prior tasks whose outputs are necessary for its execution. For example, a task to 'Summarize Paper X' MUST depend on the task that 'Finds/Retrieves Paper X'. Similarly, a task that 'Compiles a report from summaries' MUST depend on all 'Summarize Paper X' tasks. **Incorrect or missing dependencies will lead to critical operational failures and an inability to complete the overall objective.** Be meticulous in defining these relationships.
Do not include any other text, explanations, justifications, or conversational filler before or after the JSON object. Return ONLY the JSON object.
Here are the tasks to be assigned:
==============================
{tasks_info}
==============================
Following is the information of the existing worker nodes. The format is <ID>:<description>:<toolkit_info and skill names>. Choose the most capable worker node ID for each task.
==============================
{child_nodes_info}
============================== What it is
CAMEL's workforce assignment prompt: for a list of tasks and worker nodes, choose the most capable worker for each task and list the task IDs it depends on, returned as one JSON object with an assignments list and nothing else. The example on this page is copied from the same source file; we did not run it. The prompt text comes from the camel repository (Apache License 2.0, Copyright 2023-2026 @ CAMEL-AI.org). Licence: https://github.com/camel-ai/camel/blob/master/LICENSE. Original author: CAMEL-AI.org (camel-ai/camel). Changes by FoxaMind: Python string quotes removed and .format doubled braces turned back into single braces; {...} placeholders keep the source syntax.
Who it's for
- Developers building multi-agent orchestrators
- Anyone scheduling LLM tasks that depend on each other
برومبت توزيع المهام في CAMEL Workforce: لقائمة مهام وقائمة عمال، يختار العامل الأقدر لكل مهمة ويذكر معرّفات المهام التي تعتمد عليها، ويعيد كائن JSON واحداً فيه قائمة assignments دون أي نص آخر.
Examples
Example valid response in the prompt
Prompt{"assignments": [{"task_id": "task_1", "assignee_id": "node_12345", "dependencies": []}, {"task_id": "task_2", "assignee_id": "node_67890", "dependencies": ["task_1"]}, {"task_id": "task_3", "assignee_id": "node_12345", "dependencies": []}, {"task_id": "task_4", "assignee_id": "node_67890", "dependencies": ["task_1", "task_2"]}]}Expected output: The sample JSON reply printed in the source prompt. Not run by us.
Tips
- {tasks_info} is the list of tasks and {child_nodes_info} the worker list in the form <ID>:<description>:<toolkit_info and skill names>.
- The prompt gives its own dependency examples: a task to summarise a paper must depend on the task that retrieves it, and a report must depend on all the summaries.