> ## 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.societies.workforce.worker

<a id="camel.societies.workforce.worker" />

<a id="camel.societies.workforce.worker.Worker" />

## Worker

```python theme={"system"}
class Worker(BaseNode, ABC):
```

A worker node that works on tasks. It is the basic unit of task
processing in the workforce system.

**Parameters:**

* **description** (str): Description of the node.
* **node\_id** (Optional\[str]): ID of the node. If not provided, it will be generated automatically. (default: :obj:`None`)

<a id="camel.societies.workforce.worker.Worker.__init__" />

### **init**

```python theme={"system"}
def __init__(self, description: str, node_id: Optional[str] = None):
```

<a id="camel.societies.workforce.worker.Worker.__repr__" />

### **repr**

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

<a id="camel.societies.workforce.worker.Worker._get_dep_tasks_info" />

### \_get\_dep\_tasks\_info

```python theme={"system"}
def _get_dep_tasks_info(dependencies: List[Task]):
```

<a id="camel.societies.workforce.worker.Worker.set_channel" />

### set\_channel

```python theme={"system"}
def set_channel(self, channel: TaskChannel):
```

<a id="camel.societies.workforce.worker.Worker.stop" />

### stop

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

Forcefully stop the worker.

Cancels all running tasks immediately and sets the stop flag.
The worker will exit after completing cancellation.
