AgentSwarm can listen to GitHub events and automatically create and start tasks on your behalf. When a matching event arrives — such as a new issue being opened or a reaction added to a comment — AgentSwarm evaluates your repository’s automation rules and, if a rule matches, spins up an agent task without any manual intervention. This makes it straightforward to wire up AI-assisted workflows directly into your existing GitHub projects.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/coretracker/agentswarm/llms.txt
Use this file to discover all available pages before exploring further.
Webhook URL Format
Each repository in AgentSwarm has a dedicated webhook endpoint:repositoryId is the UUID assigned to a repository when you add it in AgentSwarm. You can find it in the repository settings page or by copying it from the URL when viewing the repository in the UI.
GitHub Setup
Configure the webhook on the GitHub repository side so that events are forwarded to AgentSwarm.Choose Events
Select Let me select individual events and enable the events you want to automate:
- Issues — triggers on issue lifecycle actions such as
opened - Pull requests — triggers on pull request lifecycle actions such as
opened - Pull request review comments — triggers on inline review comment activity
- Issue comments — triggers on issue and PR comment activity
- Reactions — triggers when emoji reactions are added or removed
Automation Rules
Each repository can have a list of JSON automation rules stored in its settings under githubAutomations. Rules are evaluated in order for every inbound webhook event. A single event can match and create tasks for multiple rules.Rule Structure
A unique identifier for this rule within the repository. Used for deduplication and audit references.
A human-readable label for the rule shown in logs and the UI.
When
false, the rule is stored but never evaluated. Set to true to activate it.The primary event type this rule listens for. Supported values are
issue_opened and pull_request_opened. These are the only valid values for this field — comment and reaction events from GitHub are handled automatically when automationEnabled: true is set on the rule (see below).When
true, AgentSwarm writes task status updates back to the originating GitHub issue or pull request as comments. Defaults to false.When
true, this rule also fires on comment and reaction events (issue comments, PR review comments, and emoji reactions), not just on the primary trigger event. Requires configuring allowedTriggers and related fields.When
automationEnabled is true, restricts which comment-based trigger mechanisms can activate the rule. Supported values are emoji_reaction, slash_command, and bot_mention. Defaults to all three when automationEnabled is true.Emoji reactions that activate the rule when
emoji_reaction is in allowedTriggers. For example: ["🤖", "rocket"]. Defaults to ["🤖", "robot"].Slash commands that activate the rule when
slash_command is in allowedTriggers. For example: ["/agent run"]. Defaults to ["/agent run"].GitHub usernames permitted to trigger comment-based automation. When empty, any non-bot user may trigger. Bots and accounts whose login ends with
[bot] are always blocked to prevent automation loops.Restricts which issues or pull requests the rule applies to, based on labels. See Label Filtering for details.
Configuration for the task that is created when this rule fires.
Full Example Rule
The following example is taken directly from the AgentSwarm examples directory. It demonstrates three rules: a basicissue_opened rule and two comment-trigger rules for issues and pull requests.
Label Filtering
ThelabelFilter object lets you scope rules to specific issues or pull requests based on their GitHub labels. All matching is case-insensitive.
labelsAny
The issue or PR must have at least one of the listed labels for the rule to fire. Useful for opt-in labels like
ai or bot-ready.labelsAll
The issue or PR must have every listed label. Use this when multiple labels together signal intent.
labelsNone
If the issue or PR has any of these labels, the rule is skipped. Useful for blocking labels like
wip or do-not-automate.Status Sync
WhensyncStatusEnabled is true on a rule, AgentSwarm posts status update comments back to the originating GitHub issue or pull request as the task progresses. This keeps your GitHub timeline in sync without requiring anyone to check the AgentSwarm UI.
Status sync requires a GitHub token to be configured in Settings → Credentials. The token needs write access to issues on the target repository.
Webhook Response
Every inbound webhook payload receives an HTTP202 Accepted response. The response body reports how many rules matched and how many tasks were created:
202 does not guarantee that tasks were created. Task creation depends on:
- Whether any automation rules are configured for the repository
- Whether the event type and action match a rule’s trigger
- Whether label filters pass
- Whether an actor allowlist is satisfied (for comment triggers)
- Whether a valid user is available to own the task
404 response means the repositoryId in the URL is not recognized. A 409 response means no AgentSwarm users exist to own the task.
Supported Trigger Types
| Trigger | GitHub Event | Fired When |
|---|---|---|
issue_opened | issues | A new issue is opened |
pull_request_opened | pull_request | A new pull request is opened |
emoji_reaction (comment automation) | reaction | A user adds an emoji reaction to a comment |
slash_command (comment automation) | issue_comment, pull_request_review_comment | A comment starts with a configured slash command such as /agent run |
bot_mention (comment automation) | issue_comment, pull_request_review_comment | A comment contains @agent |
Comment and reaction triggers only fire when the rule has
automationEnabled: true. Bot accounts and logins ending with [bot] are always excluded from comment-based triggers to prevent automation loops.