# Initiative

> When Nestor speaks without being asked. Reminders, watches, finished tasks, messages passed on, and the courier that delivers them.

Source: https://nestorhome.dev/docs/agent/initiative/

*Ongoing: what waits for an answer, the tasks running, the reminders and watches*

## What calls for it

| Source       | Example                                   | Tool                                       |
| ------------ | ----------------------------------------- | ------------------------------------------ |
| **Reminder** | "every weekday at 8, tell me the weather" | `schedule`                                 |
| **Watch**    | "tell me when the bank writes"            | `create_watch`                             |
| **Task**     | "read this PDF and sum up the contract"   | `delegate_task`, to an [executor](https://nestorhome.dev/docs/executors/) |
| **Message**  | "ask Léa if she needs the car"            | `message_person`                           |

Each has a title, shown in the admin, and reaches whoever asked.

- **Reminder**: runs once or on chosen days. A recurring one tells only what changed; one missed
  during a stop runs at the next start.
- **Watch**: a small model reads each item once: mail from a [connected account](https://nestorhome.dev/docs/accounts/),
  a feed, a page, a webhook ([Tools](https://nestorhome.dev/docs/tools/)).
- **Task**: its result and files are announced once, even after a restart.
- **Message**: one expecting a reply stays an open question for both people. `may_message` limits
  whom a person may write to (default `"*"`, always themselves).

## Where it arrives

The **courier** decides, from [Home Assistant](https://nestorhome.dev/docs/home/) presence, and journals why.

| The person                    | Nestor                                                        |
| ----------------------------- | ------------------------------------------------------------- |
| asked for writing, or is away | writes where they read (their `reach`)                        |
| is in a room with a satellite | speaks there                                                  |
| is home, in no known room     | speaks through `initiative.main_room`                         |
| is in a room without one      | writes                                                        |
| has no presence at all        | writes; speaks only into an ongoing spoken conversation, or to someone with nowhere to write |

| Case            | Then                                                                                  |
| --------------- | ------------------------------------------------------------------------------------- |
| no reaction     | a spoken message follows in writing after `initiative.follow_up_after_s` (180 s)       |
| quiet hours     | `initiative.quiet_hours` (`"22:30-07:30"`): nothing spoken unless urgent, still written |
| private content | the room hears that something came; the content is written                            |
| files           | written with the files; the room hears what they bring                                 |

A spoken message is heard by everyone in the room ([Speakers](https://nestorhome.dev/docs/agent/speakers/)).

## How it ends

Only the agent's final answer goes out, never "let me check".

| Outcome         | When                                                | Then                                   |
| --------------- | --------------------------------------------------- | -------------------------------------- |
| passed on       | it reached the person                               | it stays in the conversation's history |
| nothing to tell | a check found nothing new                           | nothing sent, the reason journaled, never retried |
| not passed on   | no channel took it, or the model could not write it | tried again at the next start          |

Only a reminder or a watch may end with nothing to tell. A request, a message, a confirmation and
a failure are always told.
