Overview
Webhooks notify your server when agent tasks complete. Instead of polling for results, configure a URL and Stewrd will POST the response to your endpoint — signed with HMAC-SHA256 so you can verify authenticity. Webhooks are available on the Dev plan and above.Setup
Configure webhooks in your project dashboard:- Open your project settings
- In the Webhooks section, enter your endpoint URL (must be HTTPS)
- Save — your signing secret is displayed once, copy it immediately
- Use the Send Test button to verify delivery
Payload Format
When an agent task completes, Stewrd sends a POST request to your webhook URL:"object": "session.message" and an additional session_id field.
For requests with custom tools, the webhook fires once the agent reaches status: "completed" — after all tool call rounds are finished. Intermediate requires_tool_outputs responses do not trigger webhooks.
Headers
Every webhook request includes these headers:| Header | Description |
|---|---|
Content-Type | application/json |
X-Stewrd-Signature | HMAC signature: t=<timestamp>,v1=<hex> |
X-Stewrd-Webhook-Id | Unique delivery ID |
X-Stewrd-Webhook-Timestamp | Unix timestamp of the delivery |
User-Agent | Stewrd-Webhooks/1.0 |
Signature Verification
Always verify theX-Stewrd-Signature header to confirm the webhook came from Stewrd.
The signature format is t=<timestamp>,v1=<hmac> where:
timestampis the Unix timestamp when the webhook was senthmacis the HMAC-SHA256 of<timestamp>.<payload>using your signing secret
Retry Behavior
If your endpoint returns a non-2xx status code or is unreachable, Stewrd retries with exponential backoff:| Attempt | Delay |
|---|---|
| 1st | Immediate |
| 2nd | 30 seconds |
| 3rd | 5 minutes |
Delivery Log
View delivery history in your project dashboard under the Webhooks section. Each delivery shows:- Status:
delivered,pending, orfailed - HTTP response code from your endpoint
- Attempt count
- Timestamp
Managing Webhooks
Regenerate Signing Secret
If your signing secret is compromised, regenerate it from the dashboard. The old secret stops working immediately.Disable / Enable
Toggle webhooks on/off without removing the configuration. Disabled webhooks skip delivery entirely.Test Delivery
Send a test webhook with a sample payload to verify your endpoint is working. Test events use"event": "webhook.test".
