
How It Works
Each adapter (AI SDK, Claude Agent SDK, Mastra) provides a webhook handler via its/runner export. This handler implements a standard interface with two methods:
runPrompt()— execute a single prompt (text, object, image, or speech)runExperiment()— run a prompt against a dataset
Key Features
- Adapter-agnostic: Every adapter ships its own webhook handler — use whichever SDK you prefer
- Streaming support: Real-time streaming for text and object generation
- Signature verification: HMAC-SHA256 signature checking on every request
- Dataset experiments: Run prompts against datasets with automatic eval scoring
- Telemetry: Built-in tracing for all prompt and dataset executions
Generation Types
| Type | Adapters | Streaming |
|---|---|---|
| Text | All | Yes |
| Object (structured JSON) | All | Yes |
| Image | AI SDK v4, AI SDK v5 | No |
| Speech | AI SDK v4, AI SDK v5 | No |
The Claude Agent SDK and Mastra adapters do not support image or speech generation at this time.
Event Types
The webhook handles three event types:| Event | Description |
|---|---|
prompt-run | Execute a single prompt from the platform editor |
dataset-run | Run a prompt against a dataset for experiments |
alert | Notification when a cost, latency, or error-rate alert fires or resolves |
Security
All webhook requests include anx-agentmark-signature-256 header containing an HMAC-SHA256 signature. Your endpoint should verify this signature using the webhook secret from your dashboard before processing the request.
Getting Started
Setup
Deploy a production webhook endpoint
Webhook Helpers
Adapter-specific webhook handler reference
Prompt Runs
Handle prompt run events
Dataset Runs
Process dataset run events
Alerts
Handle alert notifications
Test Webhook
Test your webhook locally with a tunnel
Have Questions?
We’re here to help! Choose the best way to reach us:
- Join our Discord community for quick answers and discussions
- Email us at [email protected] for support
- Schedule an Enterprise Demo to learn about our business solutions