> ## Documentation Index
> Fetch the complete documentation index at: https://docs.camel-ai.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Camel.toolkits.task planning toolkit

<a id="camel.toolkits.task_planning_toolkit" />

<a id="camel.toolkits.task_planning_toolkit.TaskPlanningToolkit" />

## TaskPlanningToolkit

```python theme={"system"}
class TaskPlanningToolkit(BaseToolkit):
```

A toolkit for task decomposition and re-planning.

<a id="camel.toolkits.task_planning_toolkit.TaskPlanningToolkit.__init__" />

### **init**

```python theme={"system"}
def __init__(self, timeout: Optional[float] = None):
```

Initialize the TaskPlanningToolkit.

**Parameters:**

* **timeout** (Optional\[float]): The timeout for the toolkit. (default: :obj:`None`)

<a id="camel.toolkits.task_planning_toolkit.TaskPlanningToolkit.decompose_task" />

### decompose\_task

```python theme={"system"}
def decompose_task(
    self,
    original_task_content: str,
    sub_task_contents: List[str],
    original_task_id: Optional[str] = None
):
```

Use the tool to decompose an original task into several sub-tasks.
It creates new Task objects from the provided original task content,
used when the original task is complex and needs to be decomposed.

**Parameters:**

* **original\_task\_content** (str): The content of the task to be decomposed.
* **sub\_task\_contents** (List\[str]): A list of strings, where each string is the content for a new sub-task.
* **original\_task\_id** (Optional\[str]): The id of the task to be decomposed. If not provided, a new id will be generated. (default: :obj:`None`)

**Returns:**

List\[Task]: A list of newly created sub-task objects.

<a id="camel.toolkits.task_planning_toolkit.TaskPlanningToolkit.replan_tasks" />

### replan\_tasks

```python theme={"system"}
def replan_tasks(
    self,
    original_task_content: str,
    sub_task_contents: List[str],
    original_task_id: Optional[str] = None
):
```

Use the tool to re\_decompose a task into several subTasks.
It creates new Task objects from the provided original task content,
used when the decomposed tasks are not good enough to help finish
the task.

**Parameters:**

* **original\_task\_content** (str): The content of the task to be decomposed.
* **sub\_task\_contents** (List\[str]): A list of strings, where each string is the content for a new sub-task.
* **original\_task\_id** (Optional\[str]): The id of the task to be decomposed. (default: :obj:`None`)

**Returns:**

List\[Task]: Reordered or modified tasks.

<a id="camel.toolkits.task_planning_toolkit.TaskPlanningToolkit.get_tools" />

### get\_tools

```python theme={"system"}
def get_tools(self):
```
