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

# Decorators

Every entrypoint uses an `@on` decorator to bind an event trigger plus one of:

* `@task` — single-turn automations (one-shot per trigger; can still be
  long-running). Use this by default.
* `@agent` — multi-turn agents that continue a conversation with the user
  across Slack, Linear, or the dashboard.

```python task.py theme={null}
@task(name="my-automation")
@on("schedule.daily")
def task(event):
    pass
```

```python agent.py theme={null}
@agent(name="my-agent")
@on("github.pull_request_comment")
def agent(event):
    pass
```

> [!NOTE]
>
> The order of the decorators can be interchanged.

See [@task](https://docs.blocks.team/decorators/task.md), [@agent](https://docs.blocks.team/decorators/agent.md), and [@on](https://docs.blocks.team/decorators/on.md)
for the full argument list.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.