View as markdown

Triggers

A trigger says which provider event can start a workflow. The Hub workflows page covers the steps, inputs, routing, prompts, and deadlines that run after a match.

triggers:
  - name: mention
    on: github.issue_comment
    filters:
      repo: acme/api
      contains: "@paseo"
      from_users: [alice]
    max_runtime: 2h
    steps:
      - id: work
        environment: dev
        max_runtime: 90m
        idle_timeout: 10m
        agent: { provider: codex, mode: full-access }
        prompt:
          - text: Call hub.finish_execution when the step is complete.
          - text: |
              <user-prompt>
              ${{ paseo.prompt }}
              </user-prompt>

Field-by-field detail is in the hub.yml reference.

Events

onFires when
github.issue_commentA comment on an issue or pull request
github.issuesAn issue is opened or edited
github.pull_request_reviewA review is submitted
github.pull_request_review_commentA comment on a diff
slack.mentionThe bot is mentioned in a channel
discord.mentionThe bot is mentioned in a guild
manual.runA run started from the API

Each provider page documents its events and the data they expose:

Filters

filters is required, and from_users must be present and non-empty. A trigger without it is rejected at validation.

The allowlist is what keeps a stranger's comment on a public issue from starting an agent on your machine. There is no default, because a safe default differs per repository.

An allowlist is one layer of defense. It does not make a permitted account trustworthy after compromise or make prompt injection harmless. See Hub security before choosing the daemon, working directory, provider policy, and outputs for an external trigger.

FilterApplies toMatches
from_usersallGitHub: login. Slack and Discord: user id, not display name
repoGitHubowner/name
workspaceSlackTeam id, T01234567
guildDiscordGuild id
channelsSlack, DiscordChannel ids
containsallSubstring of the message text
patternallPrefix of the message text
connectionallA connection slug, when the organization has several

All conditions must pass. There is no any mode.

Which connection an event comes from

repo, workspace, and guild are resolved to immutable ids when the configuration activates, along with the connection that owns them. Naming a resource the organization has no connection for fails activation, so you find out on push rather than when someone comments.

Omit the resource filter and the trigger listens to every connection of that provider in the organization. To pin it to one:

filters:
  connection: acme-github
  from_users: [alice]

See How Hub works for what activation compiles.

When two triggers match

Both run. Triggers are not ordered and do not shadow each other, in one configuration or across projects.

Replying

Put allow_outputs on the step that should reply. The reply capabilities are slack.reply and discord.reply.

  • Set max when a step needs more than one update.
  • Set required: true when the step must emit at least one reply before it can finish. A required type must be registered and available for the execution context.

GitHub has no reply capability; a step with a github block comments through gh instead. The output capability reference has the contract.

The declaration grants the hub.reply tool; the prompt has to tell the agent to call it. See Tell the agent which tool to call.