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

<CodeGroup>
  ```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
  ```
</CodeGroup>

<Note>The order of the decorators can be interchanged.</Note>

See [@task](/decorators/task), [@agent](/decorators/agent), and [@on](/decorators/on)
for the full argument list.
