Overview
Learn how to integrate AgentMark webhook into your application
AgentMark webhooks allow you to integrate your prompts and datasets directly into your application. When you run a prompt or dataset in the AgentMark platform, it sends the request to your webhook endpoint, processes it, and returns the results.
Key Features
- Unified Integration: Single endpoint for all generation types (text, object, image, speech)
- Real-time Processing: Support for both streaming and non-streaming responses
- Security: Built-in signature verification for secure communication
- Flexibility: Handle different event types (prompt runs, dataset runs, alerts)
- Telemetry: Built-in support for tracing and monitoring
Generation Types
AgentMark webhooks support four types of generation:
- Text Generation: Generate text responses with support for tool calls
- Object Generation: Generate structured JSON responses
- Image Generation: Generate images from text descriptions
- Speech Generation: Convert text to speech
Event Types
The webhook handles three main types of events:
-
Prompt Run Events: When you run a single prompt
- Supports all generation types
- Can return streaming or non-streaming responses
- Includes metadata like usage and tool calls
-
Dataset Run Events: When you run a dataset
- Processes multiple items in parallel
- Supports text and object generation
- Includes telemetry for monitoring
-
Alert Events: When alerts are triggered or resolved
- Monitor cost, latency, and error rate thresholds
- Receive real-time notifications
- Track alert status changes
Security
All webhook requests are secured with:
- Signature verification using HMAC-SHA256
- Required headers for authentication
- Proper error handling and validation
Getting Started
- Set up your webhook endpoint
- Use Webhook Helpers for easy integration
- Handle prompt run events
- Process dataset runs
- Handle alert events
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 hello@agentmark.co for support
Schedule an Enterprise Demo to learn about our business solutions