Webhooks
Send Fragua's notifications to Slack or any endpoint you run.
Everything that lands in Fragua's notification tray — an agent waiting on you, a run that finished or failed, a rate limit, an outdated CLI — can also go out as a signed HTTP POST. Point a webhook at a Slack incoming webhook and your team sees it in a channel, or at your own endpoint to wire Fragua into anything else.
Adding a webhook
On the account page, find Webhooks and press Add a webhook. Only an admin can manage them. Give it a name that says where it goes and an https URL, and add any headers your endpoint needs — an Authorization token, say. Fragua shows the signing secret once, right after you create it: copy it then.
- How many
- — up to 5 per account, each with up to 10 headers.
- Headers
- — stored encrypted, shown only by their last four characters. Fragua's own headers and the standard ones like Content-Type are reserved.
- Changing one
- — a webhook's URL, secret, and header values can't be edited. Delete it and add it again, or delete a header and re-add it.
Test, then enable
A new webhook starts off. Press Send test: Fragua sends a signed test message and tells you what your endpoint answered. Once a test gets a 2xx response, you can turn the webhook on, and from then on every notification for the account goes to it.
What gets sent
Each delivery is JSON with the event (needs_attention, completed, failed, rate_limited, cli_outdated, or test), a title and body, a link back to Fragua, and the account, workspace, document, and run it's about. It also carries a plain text line and Slack blocks, so a Slack incoming webhook shows a formatted message with no extra work; other receivers can ignore them.
Verifying the signature
Every delivery carries X-Fragua-Signature, X-Fragua-Timestamp, X-Fragua-Event, and X-Fragua-Delivery. The signature is sha256= followed by the HMAC-SHA256 of the timestamp, a dot, and the raw body, keyed with your signing secret. Compute it yourself and compare in constant time — in Ruby:
payload = "#{timestamp}.#{raw_body}"
expected = "sha256=" + OpenSSL::HMAC.hexdigest("SHA256", secret, payload)
Rack::Utils.secure_compare(expected, signature_header)
Copied
Reject a timestamp more than a few minutes old to stop replays, and use the delivery id to ignore duplicates.
When deliveries fail
Fragua tries each delivery twice, waiting up to 10 seconds for an answer; after that the message is dropped, so treat a webhook as a nudge, not a record — the tray keeps everything. After five failures in ten minutes the webhook pauses for 15 minutes and its row says until when. Each row shows its last result, and turning the webhook back on clears a pause.
See also: Watching your agents · My Work