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

# TaskList

The `TaskList` class allows you to display a task list next to the chatbot UI.

## Attributes

<ParamField path="status" type="str">
  The status of the TaskList. We suggest using something short like "Ready",
  "Running...", "Failed", "Done".
</ParamField>

<ParamField path="tasks" type="Task">
  The list of tasks to be displayed in the UI.
</ParamField>

## Task Attributes

<ParamField path="title" type="str">
  The task label shown in the UI. Supports Markdown formatting (e.g. `**bold**`, `[links](url)`).
</ParamField>

<ParamField path="status" type="TaskStatus">
  One of `TaskStatus.READY`, `TaskStatus.RUNNING`, `TaskStatus.DONE`, or `TaskStatus.FAILED`.
</ParamField>

<ParamField path="forId" type="str">
  Optional message ID to link the task to a chat message, enabling task navigation in history.
</ParamField>

<Note>
  Markdown in `Task.title` is supported since version **2.9.0**.
</Note>

## Usage

The TaskList element is slightly different from other elements in that it is not attached to a Message or Step but can be sent directly to the chat interface.

```python theme={null}
import chainlit as cl


@cl.on_chat_start
async def main():
    # Create the TaskList
    task_list = cl.TaskList()
    task_list.status = "Running..."

    # Create a task and put it in the running state
    task1 = cl.Task(title="Processing data", status=cl.TaskStatus.RUNNING)
    await task_list.add_task(task1)
    # Create another task that is in the ready state
    task2 = cl.Task(title="Performing calculations")
    await task_list.add_task(task2)

    # Optional: link a message to each task to allow task navigation in the chat history
    message = await cl.Message(content="Started processing data").send()
    task1.forId = message.id

    # Update the task list in the interface
    await task_list.send()

    # Perform some action on your end
    await cl.sleep(1)

    # Update the task statuses
    task1.status = cl.TaskStatus.DONE
    task2.status = cl.TaskStatus.FAILED
    task_list.status = "Failed"
    await task_list.send()

```

<Frame caption="Task List in action">
  <video controls autoPlay loop src="https://user-images.githubusercontent.com/13104895/251525854-57d1d9af-62a0-4f67-a530-1f0a3fc93488.mp4" />
</Frame>
