# Create the Task model

1. Navigate to the **API** tab.
2. Click on the **Model** tab in the left panel.
3. Click on the **Add API Model** button.
4. Fill the **Model Name** with "Task".
5. To add some Properties by clicking on the **Add Field** button below **Properties** :&#x20;

   To change a **Type** click on the showing one and select it in the dropdown. You can choose as well if the property is Nullable and/or is a List.

   1. Add a "title" of type **String.**
   2. Add a "date" of type **DateTime.**
   3. Add a "description" of type **String?.**&#x20;
   4. Add a "isDone" of type **bool.**
   5. Add a "priority" of type **int?.**
   6. Add a "comments" of type **List\<String>.**
6. Click on **Save.**

If you click on the **Task** model you should have the same as shown below.

<figure><img src="/files/glsJCwBELqawpRb3I6XF" alt=""><figcaption><p>Task model</p></figcaption></figure>

The Task model created now we have to create a **Local State** variable to store the tasks in the device storage.

1. Navigate to the [State](/main-pages/state.md) tab.
2. Click on the **Add Local State** button.
3. Fill the **Field Name** with "taskList".
4. Enable the **Persisted** switch to allow the application to store the Tasks in the device.
5. Select **Task** as **Field Type** in the bottom of the dropdown, in the Custom type section.
6. Click on **List.**
7. Click on **Save.**

<figure><img src="/files/732WKe97EKsGE3faQFR9" alt=""><figcaption><p>Create Local State </p></figcaption></figure>

In the next step we will see how to initialize a page with an observable, set the values, create and update the layout in consequence.

{% content-ref url="/pages/suCPXg4tNEhMJe1Mxz2J" %}
[Create the base HomePage Layout](/cookbook/my-first-application/create-the-base-homepage-layout.md)
{% endcontent-ref %}


---

# 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.goril.app/cookbook/my-first-application/create-the-task-model.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.
