# Managing tasks

Once you've created a dataset and uploaded files to it, you can create a task to start annotating.

Here is how you can create a task.

```py
from mindkosh import Client, Label

labelsObjects = [
    mindkosh.Label(
        name="Pedestrian",
        color=hex_codes[0],
        sequence=1,
        attributes=[
            {
                'name': 'Age-group',
                'input_type': 'radio',
                'default_value': 'Adult',
                'mutable': False,
                'values': ['Adult', 'Child']
            }
        ]
    ),
    mindkosh.Label(name="Truck", color=hex_codes[1], sequence=2),
]

newTask = client.task.create(
    name="sample-task",
    labels=labelsObjects,
    dataset_id=datasetId,
    project_id=213,
    job_modes=['validation','qc'],
    batches=3,
    tags=['tag1'],
)
```

### Label properties

<table><thead><tr><th width="183">Property</th><th width="188">Type</th><th width="110">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>string</td><td>Yes</td><td>Name of the task.</td></tr><tr><td><code>color</code></td><td>string</td><td>Yes</td><td>Color of the label in hex string.</td></tr><tr><td><code>sequence</code></td><td>integer</td><td>Yes</td><td>Order in which the label will appear.</td></tr><tr><td><code>track</code></td><td>boolean</td><td>No</td><td>Whether this label should be tracked across frames.</td></tr><tr><td><code>lock_dimenions</code></td><td>boolean</td><td>No</td><td>Only for tracked labels in Point cloud tasks. If set to true, the dimensions of an object stay the same across all frames. </td></tr><tr><td><code>type</code></td><td><code>non_mask</code> (default), <code>semantic_mask</code> or <code>instance_mask</code></td><td>No</td><td>Whether the label is a Segmentation label.</td></tr><tr><td><code>attributes</code></td><td>array of dictionaries</td><td>No</td><td>See the attributes section below.</td></tr></tbody></table>

#### Label attributes (properties)

Mindkosh supports the following types of attributes:

**Radio button**\
Specify a range of choices from which the labeler can choose only 1.

```py
{
    'name': 'Occlusion',
    'input_type': 'radio',
    'default_value': '0',
    'sequence': 1 ### Similar to label sequence, this specifies the order in which the property appears.
    'mutable': True, ### Only applicable to tracked labels. Can this attribute change from frame to frame?
    'values': ['0', '1', '2']
}
```

**Checkbox**\
Specify an attribute that can take on 2 values - `True` or `False`&#x20;

```py
{
    'name': 'Standing',
    'input_type': 'checkbox',
    'default_value': True,
    'sequence': 1 ### Similar to label sequence, this specifies the order in which the property appears.
    'mutable': True, ### Only applicable to tracked labels. Can this attribute change from frame to frame?
    'values' : ['true']
}
```

**Text**\
Enter freeform text. Can be used for OCR as well.

**Number**

### Task parameters

<table><thead><tr><th width="183">Property</th><th width="188">Type</th><th width="110">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>string</td><td>Yes</td><td>Name of the task</td></tr><tr><td><code>labels</code></td><td>array of <code>Label</code> objects</td><td>Yes</td><td>Labels </td></tr><tr><td><code>dataset_id</code></td><td>integer</td><td>Yes</td><td>Dataset ID of the dataset from which to create the task.</td></tr><tr><td><code>tags</code></td><td>array of strings</td><td>No</td><td>Create a task from the dataset files that have the specified tags</td></tr><tr><td><code>project_id</code></td><td>integer</td><td>No</td><td>Project ID of an existing project in which this task will be placed.</td></tr><tr><td><code>job_mode</code></td><td><code>['validation']</code> or<br><code>['validation', 'qc']</code></td><td>No</td><td>What annotation modes will be present in the task. By default only the annotation is present.</td></tr><tr><td><code>batches</code></td><td>integer</td><td>No</td><td>How many batches should the task data be divided into</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mindkosh.com/python-sdk/managing-tasks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
