Documentation Index
Fetch the complete documentation index at: https://docs.emergence.ai/llms.txt
Use this file to discover all available pages before exploring further.
Webhooks
Webhooks enable event-driven communication between CRAFT and external systems. When a platform event occurs (such as a schedule trigger, agent completion, or data connection status change), the webhook system delivers a signed HTTP POST request to a configured endpoint.Architecture
The webhook system follows a publish-subscribe pattern built on Redis Streams, consistent with the platform’s infrastructure-agnostic design:Redis Streams is used instead of cloud-specific message brokers (SQS, Pub/Sub) to avoid cloud-specific dependencies. Redis is already part of the infrastructure stack, so no additional dependencies are required.
Security
HMAC Payload Signing
Every webhook delivery includes an HMAC-SHA256 signature in the request headers, allowing receivers to verify that the payload was sent by the platform and has not been tampered with:- Extract the timestamp and signature from headers
- Reconstruct the signed payload:
{timestamp}.{body} - Compute HMAC-SHA256 using the shared secret
- Compare the computed signature with the received one (constant-time comparison)
- Reject payloads older than a configurable tolerance window (e.g., 5 minutes) to prevent replay attacks
SSRF Protection
The webhook dispatcher includes protection against Server-Side Request Forgery (SSRF):- Private/internal IP ranges are blocked by default (10.x.x.x, 172.16-31.x.x, 192.168.x.x, 127.x.x.x)
- DNS resolution is validated before delivery
- Redirect following is disabled or limited to prevent redirect-based SSRF
Retry Logic
Failed webhook deliveries are retried with exponential backoff:| Attempt | Delay | Cumulative |
|---|---|---|
| 1st retry | 1 minute | 1 minute |
| 2nd retry | 5 minutes | 6 minutes |
| 3rd retry | 30 minutes | 36 minutes |
| 4th retry | 2 hours | ~2.5 hours |
| 5th retry | 12 hours | ~14.5 hours |
Event Types
The platform plans to support webhook notifications for the following event categories:| Category | Events | Description |
|---|---|---|
| Schedules | schedule.triggered, schedule.failed | Schedule execution events |
| Agents | agent.registered, agent.health_changed | Agent lifecycle events |
| Assets | asset.created, asset.updated, asset.deleted | Asset lifecycle events (files, artifacts, data connections) |
| Governance | organization.created, organization.deleted, project.created | Tenant-boundary events |
| Data Connections | connection.status_changed, connection.verified | Connection state changes |
| Deployments | deployment.started, deployment.completed, deployment.failed | Deployment lifecycle |
Webhook Payload Structure
Webhook payloads follow a consistent envelope format:| Field | Description |
|---|---|
id | Unique event ID for idempotency |
type | Event type identifier |
timestamp | ISO 8601 UTC timestamp of the event |
organization_id | Organization that owns the resource |
project_id | Project scope (if applicable) |
data | Event-specific payload |
Multi-Tenancy
Webhooks are scoped to organizations and optionally to projects, following the same isolation model as all platform resources:- Webhook configurations are owned by an organization and optionally scoped to a project
- Events are only delivered for resources within the webhook’s scope
- Webhook secrets (for HMAC signing) are stored via the Governance Secrets API
Next Steps
Schedules
Configure time-based triggers that generate webhook events.
Agent Registry
Monitor agent lifecycle events via webhooks.
Data Connections
Receive notifications when connection status changes.
Authentication
Understand how webhook endpoints authenticate with the platform.

