Summary
We need a documentation page (docs/github-webhook-integration.md) describing the use case and best practices for triggering agents via GitHub webhooks through Discord.
Use Case
A user wants their AI agent (e.g. Masami) to automatically:
- Wake up when a new PR or Issue is created on a GitHub repo
- Analyze and understand the content
- Collaborate with other agents (e.g. Kiro / 超度法師) for review
- Post comments / reviews on the PR
- Notify the repo owner when ready to merge
The Problem
Agent Broker only listens to Discord events — it does not accept external webhooks or events directly. The only event source is the Discord server itself.
Proposed Architecture
GitHub Webhook (PR/Issue event)
→ GitHub Actions workflow
→ Discord Webhook (sends formatted message to a channel/topic)
→ Agent Broker detects the message
→ Routes to target agent (e.g. Masami / Kiro)
→ Agent performs review, comments, notifies owner
Documentation Should Cover
Architecture & Flow
- Why Discord is the single entry point (by design)
- The full event flow from GitHub → Discord → Agent Broker → Agent
Implementation Guide
- GitHub Actions workflow example (sending to Discord webhook)
- Discord webhook setup for a dedicated channel/topic
- Message format convention (how AB identifies trigger messages vs. casual chat)
Key Questions to Address
- Bot message handling: Does AB currently ignore messages from other bots/webhooks? If so, how to allowlist webhook sources?
- Routing: How does AB determine which agent to route the message to?
- Structured payload: Recommended message format (e.g.
[GH-EVENT] repo:xxx action:pr_opened pr:#123)
Best Practices
- Use a dedicated channel/topic for webhook events (separation of concerns)
- Message format conventions for different event types
- Security considerations (validating webhook sources)
- Avoiding infinite loops (agent responses triggering more events)
- Error handling and retry patterns
Future Considerations
- Extending the pattern to other sources (Jira, Slack, PagerDuty, etc.)
- Agent-to-agent invocation during the workflow
- Event filtering and deduplication
Suggested File
docs/github-webhook-integration.md
Labels
documentation, enhancement
Summary
We need a documentation page (
docs/github-webhook-integration.md) describing the use case and best practices for triggering agents via GitHub webhooks through Discord.Use Case
A user wants their AI agent (e.g. Masami) to automatically:
The Problem
Agent Broker only listens to Discord events — it does not accept external webhooks or events directly. The only event source is the Discord server itself.
Proposed Architecture
Documentation Should Cover
Architecture & Flow
Implementation Guide
Key Questions to Address
[GH-EVENT] repo:xxx action:pr_opened pr:#123)Best Practices
Future Considerations
Suggested File
docs/github-webhook-integration.mdLabels
documentation, enhancement