Documentation Index
Fetch the complete documentation index at: https://docs.svantic.com/llms.txt
Use this file to discover all available pages before exploring further.
Webhooks & Event-Driven Automation
Savant can receive inbound webhooks from external services and automatically convert them into agent sessions. When a GitHub PR is opened, a JIRA ticket is created, a Zendesk ticket arrives, or a Datadog alert fires — Savant can react autonomously.How It Works
- An external service sends a POST to
/webhooks/:provider. - The webhook route verifies the request signature (if configured).
- The event type is extracted from provider-specific headers or body fields.
- The
WebhookSessionBridgeformats the event into a natural-language prompt. - That prompt can trigger a new Savant session — the agent takes it from there.
Supported Providers
| Provider | Event Source | Signature Verification |
|---|---|---|
| github | X-GitHub-Event header | HMAC SHA-256 (X-Hub-Signature-256) |
| bitbucket | X-Event-Key header | HMAC SHA-256 (X-Hub-Signature) |
| jira | webhookEvent in body | Shared secret (X-Webhook-Secret header) |
| zendesk | event field in body | Shared secret (X-Webhook-Secret header) |
| slack | event.type in body | HMAC SHA-256 (Slack signing secret) |
| datadog | Always alert | Shared secret (X-Webhook-Secret header) |
X-Event-Type header and signature from X-Webhook-Secret.
Configuration
Registering a Webhook URL
Point your external service’s webhook settings to:- GitHub:
https://savant.example.com/webhooks/github - Bitbucket:
https://savant.example.com/webhooks/bitbucket - JIRA:
https://savant.example.com/webhooks/jira - Zendesk:
https://savant.example.com/webhooks/zendesk - Datadog:
https://savant.example.com/webhooks/datadog
Configuring Secrets
Secrets are configured on the server side via theWebhookRoute API:
Slack URL Verification
Slack sends aurl_verification challenge when you first register a webhook URL. The Savant webhook route handles this automatically — it responds with the challenge token so Slack confirms the endpoint.
Event Handlers
Register handlers that fire when a webhook arrives:WebhookEvent Shape
WebhookSessionBridge
TheWebhookSessionBridge converts raw webhook events into natural-language prompts suitable for starting a Savant session:
| Provider | Event | Generated Prompt Example |
|---|---|---|
| GitHub | pull_request (opened) | “GitHub webhook: pull request opened — PR #42 ‘Add feature’ on owner/repo. Review and take appropriate action.” |
| GitHub | push | ”GitHub webhook: push to refs/heads/main — 3 commit(s) on owner/repo. Check for any issues.” |
| Bitbucket | pullrequest:created | ”Bitbucket webhook: pull request created — PR #5 ‘Fix login’ on myteam/my-repo. Review and take appropriate action.” |
| Bitbucket | repo:push | ”Bitbucket webhook: push to myteam/my-repo. Check for any issues.” |
| JIRA | jira:issue_updated | ”JIRA webhook: jira:issue_updated — issue PROJ-123. Review and take appropriate action.” |
| Zendesk | ticket_created | ”Zendesk webhook: ticket_created — ticket #101 ‘Cannot access account’. Review and respond if needed.” |
| Slack | message | ”Slack webhook: message event — ‘Hello bot, can you help?’. Respond appropriately.” |
| Datadog | alert | ”Datadog webhook: alert — ‘High CPU on api-server’. Investigate and take action.” |
Example: Auto-Review PRs on Push
Combine webhooks with builtin tools for fully autonomous workflows:- GitHub/Bitbucket sends a
pull_request.openedwebhook to Savant. - The
WebhookSessionBridgecreates a prompt: “Review PR #42…” - A new Savant session starts. The agent uses
github_get_pr_diff(orbitbucket_get_pr_diff) to read the changes. - The agent reviews the code, checking for patterns in the Knowledge Store.
- The agent posts a review comment via
github_post_review(orbitbucket_post_comment). - The agent updates the linked JIRA ticket via
jira_transition_issue. - The agent posts a summary to Slack via
slack_send_message.
Example: Auto-Triage Zendesk Tickets
- Zendesk sends a
ticket_createdwebhook. - Savant reads the ticket details via
zendesk_get_ticket. - The agent searches the Knowledge Store for similar past tickets and resolutions.
- The agent looks up the customer in internal systems (via custom client tools).
- The agent drafts a response and posts it via
zendesk_add_comment. - The agent updates the ticket priority and tags via
zendesk_update_ticket.
Safety
Webhook-triggered sessions run through the same safety system as user-initiated sessions:- ToolGuard gates every tool invocation — destructive actions (merging PRs, closing tickets) require approval unless YOLO mode is enabled.
- FlowGuard prevents runaway execution — a single webhook cannot trigger an infinite chain of agent actions.
- Webhook handlers run asynchronously and failures in one handler do not block others.
