Webhooks
Webhooks let Agent Handler notify your systems when important events occur, and also consume events from third-party services. Agent Handler supports both outbound webhooks (events from Agent Handler to you) and inbound webhooks (events from third parties into Agent Handler, then forwarded to you).
Outbound webhooks
Outbound webhooks allow Agent Handler to send HTTP requests to your server when specific internal events occur. For example, you can receive a webhook every time a registered user is created or deleted.
Prerequisites
- A server endpoint that can receive HTTP POST requests
- For testing, we recommend using webhook.site or a similar tool.
Step 1: Navigate to Webhooks
- In Agent Handler, go to Connectors.
- Select the Webhooks section in the upper navigation, next to Overview
Step 2: Configure your callback URL
- Click Add webhook (or edit an existing one).
- In Callback URL, enter the HTTPS endpoint on your server that will receive webhook events.
- Save your changes.
Your server should be prepared to:
- Accept
POSTrequests. - Parse the JSON payload.
- Return an appropriate HTTP status code (for example,
200 OKon success).
Step 3: Subscribe to events
- In the same Webhooks configuration screen, find the Events section.
- Select the events you want to subscribe to. For example:
registered user createdregistered user deleted
- Save your configuration.
Agent Handler will now send a POST request to your callback URL whenever one of the selected events occurs.
Step 4: Test your outbound webhook
To verify your configuration:
- In Agent Handler, create a test registered user.
- In your webhook receiver (for example, your server logs or webhook.site), confirm that a new request was received.
- Inspect the payload and verify:
- The event type matches what you subscribed to.
- The body contains the expected event data (for example, registered user identifiers and metadata).
Tip For quick validation without deploying your own server, use webhook.site to generate a temporary callback URL and inspect requests in the browser.
Inbound webhooks (passthrough)
Inbound webhooks allow Agent Handler to receive events from third-party services (such as Slack) and then forward those events to your outbound webhook endpoint. Agent Handler handles the service-specific registration and verification flow, so you can focus on handling a unified event stream.
Important Inbound webhooks are passthrough only. Every inbound webhook must be paired with an outbound webhook subscription to forward events to your server.
Prerequisites
Before configuring inbound webhooks, ensure you have:
- A server endpoint to receive outbound webhooks
- Again, a tool like webhook.site is useful for testing.
- At least one outbound webhook configured and subscribed to “inbound webhook received” (described below).
- Any connector-specific requirements. For Slack, you need:
- A Slack app installed in your workspace.
- Access to the app’s signing secret.
Step 1: Subscribe your outbound webhook to inbound events
- In Agent Handler, go to Connectors.
- Select the Webhooks section in the upper navigation, next to Overview.
- Edit the outbound webhook you want to use as the destination.
- In the Events list, enable “inbound webhook received” (or equivalent).
- Save your changes.
Now, whenever Agent Handler receives an inbound webhook from a third-party connector, it will send a corresponding event to this outbound webhook endpoint.
Step 2: Enable inbound webhooks for a Connector
- In Agent Handler, navigate to the Connector you want to configure (for example, Slack).
- If inbound webhooks are supported for that connector, you’ll see a Webhook section in its settings.
- Open the Webhook section to start configuration.
Step 3: Connector-specific setup (Slack example)
The exact setup varies by Connector. This example walks through Slack.
1. Ensure the Slack app is installed
- Create or open your Slack app in the Slack developer dashboard.
- Install the app into your Slack workspace.
2. Locate your Slack signing secret
- In the Slack app’s dashboard, go to Basic Information → App Credentials.
- Copy the Signing Secret.
3. Configure inbound webhook in Agent Handler
- In Agent Handler, navigate to Connectors and find the Slack Connector.
- The row should say “Webhook setup needed”. Click Add webhook.
- Select the Edit icon and paste the Slack signing secret into the field.
- Save the configuration.
Step 4: Verify the webhook URL in Slack
- In Agent Handler’s Slack connector settings, copy the webhook URL provided.
- In the Slack app’s dashboard, go to Event Subscriptions.
- Enable Event Subscriptions.
- Paste the Agent Handler webhook URL into the Request URL field.
- Slack will send a verification request to that URL:
- Agent Handler will handle the challenge/verification flow.
- If successful, Slack will show the URL as verified.
- In Subscribe to events, select the specific events you want Agent Handler to receive. For example:
channel_createdchannel_joined
- Save your changes in Slack.
At this point, Slack events that you subscribed to will be delivered to Agent Handler, and then forwarded to your outbound webhook endpoint as “inbound webhook received” events.
Testing inbound webhooks
To verify that inbound webhooks are correctly configured end-to-end:
-
Trigger an event in the third-party service
- For Slack, you can:
- Create a new channel.
- Perform another action that emits one of the subscribed events.
- For Slack, you can:
-
Check your outbound webhook endpoint
- On your server (or webhook.site), look for a new webhook request from Agent Handler.
- Confirm that:
- The event type indicates an inbound webhook was received.
- The payload contains the data from the third-party event.
For example, when creating a Slack channel you may see:
channel_createdchannel_joined
-
Validate payload structure
- Ensure your application can parse and handle the payload.
- Optionally log samples in non-production environments to inform your event handling logic.
Next steps
Once you have webhooks configured:
- Use outbound webhooks to keep your systems in sync with key Agent Handler events.
- Use inbound webhooks (via supported connectors like Slack) to react to external events with your agents.
- Combine webhooks with your Tool Packs and connectors to build rich, event-driven workflows for your agents.