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:

  1. Text Generation: Generate text responses with support for tool calls
  2. Object Generation: Generate structured JSON responses
  3. Image Generation: Generate images from text descriptions
  4. Speech Generation: Convert text to speech

Event Types

The webhook handles three main types of events:

  1. 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
  2. Dataset Run Events: When you run a dataset

    • Processes multiple items in parallel
    • Supports text and object generation
    • Includes telemetry for monitoring
  3. 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

  1. Set up your webhook endpoint
  2. Use Webhook Helpers for easy integration
  3. Handle prompt run events
  4. Process dataset runs
  5. Handle alert events

Have Questions?

We’re here to help! Choose the best way to reach us: