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

# Always-On

> Background Abilities that run continuously for the entire session.

Always-on Abilities run as **Background Daemons** — they start automatically when a call begins and stay alive for the whole session. **No hotword, no trigger.** They work even when the Personality is in sleep mode.

## What's possible

* **Background polling** — check a file or API on a timer
* **Proactive notifications** — interrupt the conversation when something fires
* **Scheduled tasks** — alarms and time-based events
* **Ambient monitoring** — note-taking, summarization, conversation watching

## Minimal daemon template

```python theme={"system"}
from src.agent.capability import MatchingCapability
from src.main import AgentWorker
from src.agent.capability_worker import CapabilityWorker

class YourWatcher(MatchingCapability):
    worker: AgentWorker = None
    capability_worker: CapabilityWorker = None
    background_daemon_mode: bool = False

    #{{register capability}}

    async def watcher_loop(self):
        while True:
            # your background logic here
            await self.worker.session_tasks.sleep(20.0)

    def call(self, worker: AgentWorker, background_daemon_mode: bool):
        self.worker = worker
        self.background_daemon_mode = background_daemon_mode
        self.capability_worker = CapabilityWorker(self)
        self.worker.session_tasks.create(self.watcher_loop())
```

The file **must** be named `background.py` — no other filename will be detected.

## Three patterns to know

<CardGroup cols={3}>
  <Card title="Standalone Daemon" href="/building-abilities/background-abilities">
    Only `background.py`. Continuous monitoring, logging, note-taking.
  </Card>

  <Card title="Interactive + Daemon" href="/building-abilities/background-abilities#coordination-pattern">
    `main.py` + `background.py`. Coordinate via shared file storage. Alarm is the canonical example.
  </Card>

  <Card title="Ambient Listener" href="/building-abilities/hot-mic-deepgram">
    Background daemon + hot mic + Deepgram. Room-aware Ability that never sleeps.
  </Card>
</CardGroup>

## Next steps

* Deep dive: [Background Abilities](/building-abilities/background-abilities)
* Real examples: [Alarm template](https://github.com/openhome-dev/abilities/tree/dev/templates/Alarm) + [Background template](https://github.com/openhome-dev/abilities/tree/dev/templates/Background)
* Ideas: [Cookbook → Always-On / Watcher](/building-abilities/cookbook#always-on-and-watcher)
