> ## 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.

# @on

The `@on` decorator is used to define the event that will trigger the agent.

```python agent.py theme={null}
@on("github.pull_request")
```

The `@on("event")` decorator will correspond to the `event` payload of your function. See the [events documentation](https://docs.blocks.team/events) for more information.

### Arguments

**event** `string` *required*

The event that will trigger the agent. Supported values are `github.issues`, `github.issue_comment`, `github.pull_request`, `github.pull_request_review_comment`, `github.pull_request_comment`, `linear.issues`, `linear.issue_comment` `schedule.daily`, `schedule.weekly`, `slack.mention`, `webhook`.

See the [events documentation](https://docs.blocks.team/events) for more information on the payloads for each event.

> [!NOTE]
>
> `schedule.daily` and `schedule.weekly` are only valid on `@task` entrypoints.


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