Webhook Triggers
Copy page
Create webhook endpoints for external services to invoke your Agents
Triggers create webhook endpoints that allow external services to invoke your Agents via HTTP. When a service like GitHub, Slack, or Stripe sends a webhook, the payload is validated, transformed, and used to start a new conversation with your Agent.
How Triggers Work
- External service sends a webhook to your trigger's URL
- Authentication is verified (API key, bearer token, or signature)
- Payload is validated against the input schema (if configured)
- Payload is transformed using the message template
- Invocation is logged and the webhook returns immediately with
202 Accepted - Agent processes the message asynchronously in a new conversation
When to Use Triggers
Triggers are ideal for:
| Use Case | Example |
|---|---|
| CI/CD pipelines | Trigger code review agents on PR creation |
| Customer events | Respond to Stripe payment webhooks |
| DevOps alerts | Process PagerDuty or Datadog alerts |
| Chat integrations | Handle Slack or Discord messages |
| Form submissions | Process Typeform or webhook-enabled forms |
| Scheduled tasks | Invoke agents from cron jobs or schedulers |
Trigger Configuration
Each trigger is configured with:
Required
- Name: Human-readable identifier for the trigger
- Message Template: Template that converts the webhook payload into a message for the Agent
Optional
- Input Schema: JSON Schema to validate incoming payloads
- Authentication: API key, bearer token, or basic auth
- Signing Secret: HMAC-SHA256 signature verification (for GitHub, Slack, etc.)
- Output Transform: JMESPath or object mapping to reshape payloads
Authentication Options
Triggers support multiple authentication methods:
| Type | Header | Use Case |
|---|---|---|
api_key | Custom header (e.g., X-API-Key) | Simple token auth |
bearer_token | Authorization: Bearer <token> | OAuth-style auth |
basic_auth | Authorization: Basic <base64> | Username/password |
none | No authentication | Public webhooks with signature verification |
For services that sign webhooks (GitHub, Stripe, Slack), you can use authentication: { type: 'none' } combined with signingSecret for security.
Webhook URL Format
After creating a trigger, the webhook URL follows this pattern:
You can find the complete webhook URL in the API response when creating or listing triggers.
Invocation Tracking
Every webhook invocation is tracked with:
- Status:
pending→successorfailed - Request Payload: The original webhook body
- Transformed Payload: The payload after transformation
- Conversation ID: The conversation created for this invocation
- Error Message: Details if the invocation failed
This allows you to monitor webhook activity, debug failures, and audit trigger usage.
Example: GitHub Issue Handler
Here's a conceptual example of a trigger that responds to GitHub issues:
The Agent then processes this message like any other conversation, using its configured tools and sub-agents to respond.