Skip to content

feat:367 | Webhooks - Human Input + Callback Support#6263

Open
jchui-wd wants to merge 3 commits intofeat/533-webhook-secretsfrom
feat/367-HITL-Support-Async-Call-Back
Open

feat:367 | Webhooks - Human Input + Callback Support#6263
jchui-wd wants to merge 3 commits intofeat/533-webhook-secretsfrom
feat/367-HITL-Support-Async-Call-Back

Conversation

@jchui-wd
Copy link
Copy Markdown
Contributor

@jchui-wd jchui-wd commented Apr 21, 2026

Changes

  • Human In the loop support is now added to webhooks
    • Same as Predictions, but for webhooks.
  • Optional Callback URL / Secret on Start node
    • Returns 202 immediately while waiting for flow compleletion
    • Posts SUCCESS, STOPPED (Human Input), ERROR result to callback URL when flow is done
    • HMAC-SHA256 signs callback payloads when a secret is configured

Videos

Test Videos Demo

No-Callback-Just-HITL-Proceed.mp4

No-Callback-Just-HITL-Proceed.mp4

No-Callback-60-Second-Delay-Failed.mp4

No-Callback-60-Second-Delay-Failed.mp4

Callback-HITL-Reject.mp4

Callback-HITL-Reject.mp4

Callback-HITL-Happy-Path.mp4

Callback-HITL-Happy-Path.mp4

Screenshot

Screenshot 2026-04-22 at 2 44 25 PM

Optional Callback URL / Secret on the Start node (or x-callback-url
header). Webhook now returns 202 immediately and POSTs SUCCESS,
STOPPED (HITL), or ERROR to the callback URL, signed with HMAC-SHA256
when a secret is set. Retries 3x with 0s/3s/6s backoff.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces asynchronous callback support for agentflow webhooks. It adds configuration fields for a callback URL and secret to the Start node, allowing the server to return a 202 Accepted response immediately while processing the flow in the background. Results are then dispatched to the specified URL with retry logic and optional HMAC-SHA256 signing. Feedback focuses on improving error message extraction in the background task by using a utility function instead of direct property access.

Comment thread packages/server/src/controllers/webhook/index.ts
Comment thread packages/server/src/controllers/webhook/index.ts Outdated
@jchui-wd jchui-wd marked this pull request as ready for review April 22, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant