Integrations

Webhooks

Get a signed POST when a tool's schema changes, errors spike or an agent converts.

Add an endpoint under Project settings → Integrations → Webhooks and choose which events to receive. Use Send test to check your endpoint.

For Zapier, Make or n8n, use their generic "webhook" trigger and paste its URL here.

Slack and Discord: paste a Slack incoming webhook URL (https://hooks.slack.com/…) or a Discord webhook URL and they get a readable message with a link to the dashboard, instead of the JSON below.

Events

EventFires when
alert.schema_changeA tool's description, input schema or annotations change
alert.new_toolA new tool is registered
alert.tool_removedA tool disappears
alert.error_spikeA tool's error rate jumps (checked hourly)
alert.new_ai_agentAn AI crawler or agent visits the site for the first time
alert.robots_changerobots.txt now allows or blocks an AI bot differently (checked daily)
alert.ruleOne of your alert rules fires
alert.rule_resolvedIt recovers
mcp.feedbackAn agent or user sends feedback through an MCP server's send_feedback tool
eval.finishedAn eval run finishes: passed, failed or inconclusive
tool_call.errorA tool call fails
custom_eventEvery AgentStats.track() call
testYou press Send test

Alert rules

Under Project settings → Notifications → Alert rules, set your own alerts on a tool source or one tool: error rate, failed calls, p95 latency, tool calls (below a threshold: traffic stopped), unreachable (requests the proxy got no answer to) or rejected sign-ins, over the last 5, 15 or 60 minutes. Rules are checked every minute. One fires after two bad checks in a row and recovers at the first good one; both are emailed as your notification settings say and sent here. Rates and latency wait for a minimum number of calls, so a quiet hour doesn't page anyone.

Payload

POST https://your-endpoint
Content-Type: application/json
X-Webhook-Id: whd_…
X-Webhook-Event: alert.schema_change
X-Webhook-Signature: t=1757900000,v1=<hex hmac-sha256>
{
  "id": "whd_…",
  "event": "alert.schema_change",
  "created_at": "2026-09-15T10:00:00.000Z",
  "site": { "id": "…", "name": "Storefront", "domain": "shop.example.com" },
  "data": {
    "type": "schema_change",
    "severity": "warning",
    "title": "Schema of \"search_products\" changed",
    "details": {
      "tool": "search_products",
      "diff": ["parameter \"limit\" added (number)"],
      "before": {},
      "after": {}
    },
    "url": "https://agentstats.io/dashboard/sites/…/alerts"
  }
}

X-Webhook-Id is unique per delivery and stays the same across retries. Use it to ignore duplicates.

Verify the signature

Compute HMAC-SHA256(secret, "${t}.${rawBody}") with the endpoint's signing secret and compare it with v1 in constant time. Reject requests where t is more than 5 minutes old.

import { createHmac, timingSafeEqual } from 'node:crypto'

function verify(secret: string, rawBody: string, header: string) {
  const { t, v1 } = Object.fromEntries(header.split(',').map(p => p.split('=')))
  if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false
  const expected = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex')
  return expected.length === v1.length && timingSafeEqual(Buffer.from(expected), Buffer.from(v1))
}
Sign the raw request body. Parsing and re-serialising the JSON changes the bytes and the signature won't match.

Retries

Respond with any 2xx within 10 seconds. Otherwise the delivery is retried up to 5 times, after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours. After 50 consecutive failures the endpoint is disabled.