
Webhook Configuration Interface
Setting Up Your Webhook
To enable webhooks for your agent:1
Access Task Sources
In the Workbench, navigate to your agent and click the Task Sources tab.
2
Enable Webhooks
Toggle the Webhook task source and click Configure and test.
3
Get Your Webhook URL
Copy the provided webhook URL and API key from the configuration panel.
4
Test Your Webhook
Use the built-in test interface or the provided curl snippet to verify your setup.
Making Requests
All webhook requests usePOST
to the root endpoint with your authentication and agent configuration.
Basic Request Structure
Parameters
Required Parameters
Parameter | Type | Location | Description |
---|---|---|---|
agent_id | string | Query or Body | Your agent’s unique identifier |
x-api-key | string | Header or Query | Your API key for authentication |
Optional Parameters
Parameter | Type | Default | Description |
---|---|---|---|
prompt | string | "" | Text prompt to send to your agent |
asynchronous | boolean | false | Process in background and return immediately |
task_id | string | - | Associate request with specific task ID |
getter | string | - | Extract specific data from response (e.g., "result.summary" ) |
You can include any additional fields in your request - they’ll all be passed to your agent for processing. This gives you complete flexibility for custom data structures.
Input Formats
Webhooks support multiple content types to fit your integration needs:Perfect for structured data and API integrations.
Execution Modes
Synchronous
Best for: Immediate responses, short tasks, interactive workflows
- Waits for agent to complete processing
- Returns full results in the response
- Request remains open until finished
Asynchronous
Best for: Long-running tasks, file processing, background jobs
- Returns immediately with task started confirmation
- Agent processes in the background
- Prevents timeouts for long operations
Synchronous Response
Asynchronous Response
File Processing
Files must be uploaded directly using
multipart/form-data
. URLs to external files are not supported - the webhook service needs the actual file content.Supported File Types
- Documents: PDF, DOC, DOCX, TXT
- Images: PNG, JPEG, GIF, WEBP, SVG
- Spreadsheets: XLS, XLSX, CSV
- Archives: ZIP (contents extracted automatically)
Multiple File Upload
For large file batches (10+ files), use asynchronous mode and consider breaking uploads into smaller batches of 5-10 files for optimal performance.
Advanced Features
Data Extraction with Getter
Use thegetter
parameter to extract specific data from your agent’s response:
Parameter Priority
When the same parameter appears in multiple places:- Query parameters (highest priority)
- Request body parameters
- Default values
Integration Examples
Zapier Integration
Connect any Zapier trigger to your agent for automated workflows.
Form Processing
Process contact forms, surveys, and user submissions automatically.
Document Analysis
Extract data from uploaded documents, invoices, and contracts.
API Integration
Integrate agents into your existing applications and services.
JavaScript Example
Python Example
Error Handling
400 Bad Request
400 Bad Request
agent_id
parameter in your request.401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
Best Practices
Use Async for Large Tasks
Set
asynchronous=true
for file processing, complex analysis, or any task taking >30 seconds.Implement Retry Logic
Add exponential backoff retry for transient failures (5xx errors).
Validate Responses
Always check the HTTP status code and handle error responses appropriately.
Use Getter for Large Responses
Extract only the data you need to reduce response size and improve performance.