Webhooks, HMAC Verification & Replay
Build reactive workflows in Slack bots, CI pipelines, billing engines, or SaaS notifications whenever Helix completes work or reaches a human approval gate.
Supported Event Types
| Event Name | Trigger Condition |
|---|---|
assignment.completed | Assignment reached terminal completed state |
assignment.needs_approval | T2 / T3 gate paused execution waiting on human review |
assignment.blocked | Colleague paused on missing input, policy escalation, or unresolved schema mismatch |
assignment.failed | Assignment aborted or exhausted retries with diagnostic summary |
department.handoff | Multi-agent department handed off work to another colleague |
staff.immersion_completed | Day-One System Immersion finished and System Manual was published |
staff.promoted | Colleague autonomy level increased |
staff.demoted | Colleague autonomy level lowered |
report.ready | Scheduled or handover report published |
usage.threshold | Workspace or colleague crossed a configured usage threshold |
ledger.entry_created | Ed25519 signed action receipt appended to workspace hash chain |
Step 1 — Register an HTTPS Endpoint
Configure endpoints visually under Developer Console -> Webhooks or programmatically:
curl -X POST https://launchverse.app/api/webhooks/platform \
-H "Authorization: Bearer hx_live_..." \
-H "Helix-Version: 2026-11-16" \
-H "Content-Type: application/json" \
-d '{
"targetUrl": "https://api.example.com/webhooks/helix",
"events": ["assignment.completed", "assignment.needs_approval", "ledger.entry_created"]
}'SSRF guardrails reject plain HTTP,
localhost, loopback (127.0.0.1), link-local (169.254.*), and private RFC1918 CIDRs on public webhooks. For private internal listeners, route via Helix Bridge.
What is HMAC-SHA256 in plain English? Think of an HMAC signature as a tamper-proof wax seal made using your secret key. Even if someone knows your webhook URL, only requests signed with your secret key will match — so fake requests get rejected cleanly.
Step 2 — Verify Webhook Signatures (Always!)
Every delivery includes two authentication/tracking headers:
x-helix-signature-256:sha256=<hex>HMAC-SHA256 over the exact raw UTF-8 request body using your subscription'ssigningSecretx-helix-delivery: Unique delivery ID for idempotent deduplication
TypeScript / Node.js
import { createHmac, timingSafeEqual } from "node:crypto";
export function verifyHelixWebhook(rawBody: string, headerSig: string, secret: string): boolean {
const expected = createHmac("sha256", secret).update(rawBody, "utf8").digest("hex");
const cleanSig = headerSig.replace(/^sha256=/, "").trim();
const a = Buffer.from(expected, "utf8");
const b = Buffer.from(cleanSig, "utf8");
return a.length === b.length && timingSafeEqual(a, b);
}
// Read `req.headers.get("x-helix-signature-256")` and deduplicate on `req.headers.get("x-helix-delivery")`Python (FastAPI / Flask)
import hmac
import hashlib
def verify_helix_webhook(raw_body: bytes, header_sig: str, secret: str) -> bool:
expected = hmac.new(secret.encode("utf-8"), raw_body, hashlib.sha256).hexdigest()
clean_sig = header_sig.removeprefix("sha256=").strip()
return hmac.compare_digest(expected, clean_sig)Step 3 — Delivery Guarantees & Replay
- Respond with HTTP
2xxwithin 10 seconds to acknowledge delivery; persist heavy jobs asynchronously. - Deduplicate handlers using the unique
x-helix-deliveryheader. - Transient failures can be replayed interactively in Developer Console -> Webhooks or via API:
curl -X POST https://launchverse.app/api/webhooks/platform \
-H "Authorization: Bearer hx_live_..." \
-H "Helix-Version: 2026-11-16" \
-H "Content-Type: application/json" \
-d '{"action": "replay"}'
