POST to your endpoint each time the agent reaches a step you selected. The agent keeps working while your endpoint handles the event.
Connect your endpoint
If this is your first hook, open Admin > Security > Inference Hooks and select Add your first hook.- Set up a public HTTPS endpoint that accepts JSON. Use the final URL. Dust won’t follow redirects. Have the endpoint reject requests it can’t verify, even during setup.
- Choose Custom webhook and enter the Endpoint URL. If your gateway needs a credential in addition to Dust’s signature, enter its header name and value under Auth header and Auth header value.
- Choose the events, conversation history, and group exclusions. By default, Dust sends all four event types with This step only. Check the URL before you select Create. Live delivery starts immediately.
- Copy the signing secret to your receiver’s secret store before closing the dialog. Dust shows it only once. Then select Send test event. Dust sends signed examples of the event types you chose, with
test: trueand no real conversation data. You can also test a paused hook.
Verify requests and handle retries
Pass the raw request body, signing secret, and three headers (webhook-id, webhook-timestamp, webhook-signature) to a Standard Webhooks library. Verify the signature and timestamp before parsing the JSON. Reformatting the JSON can change the bytes Dust signed.
The webhook-id header matches the event’s id. The webhook-timestamp header tells you when Dust made this delivery attempt, in Unix seconds. The timestamp in the JSON tells you when the event happened.
If you verify signatures yourself, sign webhook-id.webhook-timestamp.raw-body with HMAC-SHA256. Use the header values and exact body bytes. For the key, remove whsec_ from the secret and Base64-decode the rest. The webhook-signature header contains v1, followed by the Base64-encoded digest.
Return 204 No Content or another 2xx status once you accept the event. Dust ignores the response body. On a network failure or an HTTP 408, 429, or 5xx response, Dust may try again, up to six attempts in total. Retries have the same event ID and body. If you’ve already handled that ID, return 2xx without processing it again.
Event format: version "1"
Each request contains one JSON object. data.messages holds the content for this step. context holds any earlier messages you chose to include. In this test event, the agent is about to look up record 42. The hook uses This step only, so context is empty:
conversation_id and turn_id to group events from the same answer. Each turn starts at step: 0. If the user retries the answer, Dust starts a new turn. run_id identifies the model run for tool_inputs and final_answer. For the other two event types, it’s null. A run without a user can have user_id: null. Live events have test: false.
Each message in data.messages or context has a role (user or assistant) and a content array. Read every block in the array. One event can contain several tool calls or results.
context_scope matches the setting you chose: target_only for This step only, since_last_agent_message for Current turn, or full_context for Full conversation. Dust may add fields, event types, modes, or block types to version "1". Have your receiver ignore any it doesn’t recognize.
Sample events
These four sample payloads show a single test turn with Full conversation selected. Dust sends each as a separate request.user_request
user_request
tool_inputs
tool_inputs
tool_outputs
tool_outputs
final_answer
final_answer