Skip to main content
A trigger runs an agent automatically — either when an event occurs in an external service, or on a recurring schedule.

Trigger types

Webhook

Fires when an event occurs in a connected service, such as a new Slack mention or a GitHub pull request.

Time

Fires on a recurring schedule: hourly, daily, weekly, or monthly.

Create a trigger

1

Open your workspace

Go to guild.ai and open the workspace where the agent is installed.
2

Go to Triggers

Click Triggers in the left sidebar, then click New trigger.
3

Choose a type

Select Webhook or Time, then configure the trigger.
4

Select an agent

Choose the agent the trigger will run when it fires.

Webhook triggers

A webhook trigger fires when a specific event occurs in a connected service.

Supported services

ServiceExample events
Slackapp_mention, message
GitHubpull_request, issues, push
Linearissue, comment
Jiraissue_created, issue_updated
Bitbucketpullrequest:created, issue:created
Azure DevOpsworkitem.created, git.pullrequest.created
Google DocsDocument changes
NotionPage updates
Configure the service, event type, and optional event action when creating the trigger. The agent receives the event payload as its input.

Scope events with service_config

Use service_config to restrict webhook triggers to specific repositories, channels, or projects. Webhook triggers accept an optional service_config JSON object. When you omit it or set it to null, the trigger matches all events of the selected type (for example, every repository or every channel).
ServiceFieldExampleBehavior
GitHubrepo"guildaidev/guildcode"Only events for this repository (owner/repo format)
Slackchannel_ids["C01234567"]Only events in these channel IDs. Messages from the Slack app itself are always excluded to prevent loops.
Jiraproject"ENG"Only events for this project key (case-insensitive)
service_config must be a JSON object. Do not pass an array or string at the top level. Pass service_config when you create or update a trigger with the CLI:
# GitHub: only pull requests in one repo
guild trigger create \
  --type webhook \
  --service GITHUB \
  --event pull_request \
  --action opened \
  --agent code-reviewer \
  --service-config '{"repo": "guildaidev/guildcode"}'

# Slack: only mentions in specific channels
guild trigger create \
  --type webhook \
  --service SLACK \
  --event app_mention \
  --agent slack-assistant \
  --service-config '{"channel_ids": ["C01234567"]}'
For Slack, an empty channel_ids array matches all channels. Omit service_config entirely only if you intend to process events workspace-wide.

CLI

# Create a Slack webhook trigger
guild trigger create \
  --type webhook \
  --service SLACK \
  --event app_mention \
  --agent slack-assistant

# Create a GitHub webhook trigger for opened pull requests
guild trigger create \
  --type webhook \
  --service GITHUB \
  --event pull_request \
  --action opened \
  --agent code-reviewer

Time triggers

A time trigger fires on a recurring schedule and runs the agent with a fixed input.

Frequencies

FrequencyOptions
HOURLY
DAILYTime of day
WEEKLYDays of week, time of day
MONTHLYDays of month, time of day

CLI

# Daily trigger at 9:00 AM
guild trigger create \
  --type time \
  --frequency DAILY \
  --time 09:00 \
  --agent daily-report \
  --input '{"project": "GUILD"}'

# Weekly trigger on Monday mornings
guild trigger create \
  --type time \
  --frequency WEEKLY \
  --days-of-week monday \
  --time 09:00 \
  --agent weekly-summary

Manage triggers

Activate and deactivate

Deactivate a trigger to pause it without deleting it.
guild trigger deactivate <trigger-id>
guild trigger activate <trigger-id>

List and inspect

# List all triggers in the workspace
guild trigger list

# Get details for a specific trigger
guild trigger get <trigger-id>

# List sessions spawned by a trigger
guild trigger sessions <trigger-id>

Update

# Change the schedule of a time trigger
guild trigger update <trigger-id> --time 10:00

# Change the event of a webhook trigger
guild trigger update <trigger-id> --event message