Configuring Puzzlet
Test Webhook
Set up a webhook endpoint to test your Puzzlet inference in your application
Puzzlet allows you to test your inference directly in your application by setting up a webhook endpoint. This endpoint receives test requests from Puzzlet and returns the inference results back to the platform. All inference results must be returned in Agentmark format.
Setting Up Your Webhook
1. Get Your Webhook Credentials
- Navigate to the Settings page in your Puzzlet dashboard
- Under “Webhook Url”, you’ll find:
- A webhook URL input field
- A webhook secret input field. This must match the secret in your test endpoint.
Keep your webhook secret secure! This is used to verify that requests are coming from Puzzlet.
2. Create Your Webhook Endpoint
Here’s an example of setting up a webhook endpoint using Next.js:
NextJS
Security Considerations
- Signature Verification: Always verify the
x-puzzlet-signature-256
header using your webhook secret - Environment Variables: Store your webhook secret as an environment variable
- Error Handling: Implement proper error handling and logging
Webhook Request Format
Puzzlet sends POST requests to your webhook URL with the following:
Headers
Body
Testing Your Webhook
- Set up your webhook endpoint
- Add your webhook URL and secret in Puzzlet settings
- Create a prompt in Puzzlet
- Click “Run” in the prompt to send a request to your webhook
- View the results in Puzzlet’s dashboard
Make sure your webhook endpoint is publicly accessible and can handle POST requests.
Troubleshooting
- Verify your webhook URL is correct and accessible
- Check that your webhook secret matches the one in Puzzlet
- Ensure proper error handling in your endpoint
- Make sure your returning a JSON response that matches whats provided by Agentmark
Was this page helpful?