SDKs & API
Webhooks and SIEM
Stream AgentID security events to Splunk, Datadog, Microsoft Sentinel or your own endpoint with signed webhooks.
AgentID can send security events of an AI system to HTTPS endpoints, for example a SIEM collector.
Configure a webhook
Open the AI system's Integration tab and click Open SIEM Settings under SIEM & Event Streaming. Add a webhook with:
- Target URL: a public HTTPS endpoint,
- Secret: the shared secret used to sign deliveries,
- Alerts: send
security_alertevents, - Blocks: send
security_blockandsecurity_policy_violationevents, - Active: turn delivery on or off.
Delivery
Each event is sent as a JSON POST with these headers:
| Header | Content |
|---|---|
Content-Type | application/json |
X-AgentID-Signature | Hex-encoded HMAC-SHA256 of the raw request body, keyed with your secret |
X-AgentID-Event-ID | The AgentID event id, for de-duplication |
{
"type": "agentid.security_event",
"event_id": "285d12c7-7f10-40f2-b50b-e61eb8cfd970",
"system_id": "00000000-0000-0000-0000-000000000000",
"event_type": "security_block",
"severity": "error",
"timestamp": "2026-10-14T09:30:00.000Z",
"model": "gpt-4o-mini",
"system_version": 3,
"input_hash": "9f2c...",
"output_hash": "41ab...",
"input_tokens": 33,
"output_tokens": 12,
"cost_usd": 0.0001,
"metadata": {}
}input_hash and output_hash are opaque correlation digests: the same input (or output) of the same AI system always gives the same value, so you can group repeated events, but you cannot recompute the value yourself and it does not reveal the text. Treat it as an identifier, not as a SHA-256 of the content. Since this release it is a keyed digest; earlier deliveries carried a plain SHA-256, so values from before and after the change do not match. Both fields are null when the organization stores no content (payload mode None). The prompt and answer text are not sent. For systems that block personal information, the payload is redacted before delivery. A delivery times out after 7.5 seconds.
A redelivery of a queued event can carry two optional top-level fields, only when the organization's payload mode hides content: "payload_redacted": true and "redaction_reason": "organization_payload_mode" (or "system_payload_mode"). Prompt, answer and summary text in metadata then reads [ENCRYPTED]. The fields are absent in every other delivery, and the signature always covers the body as sent, fields included.
Employee attribution (payload version 2)
Organizations that do not attribute AI activity to named employees send events without a person's identity. For such an event the payload gains two top-level fields, and only then; payloads of organizations that attribute events to people are unchanged and carry neither field.
{
"payload_version": 2,
"employee": {
"pseudonym": "821HJ12K1ABCD",
"pseudonym_epoch": 1,
"attribution_status": "pseudonym"
}
}employee.attribution_statusis"pseudonym"(a stable opaque code for the person,pseudonymandpseudonym_epochare set),"key_owner"/"key_only"(a stable opaque code derived from the owner label of the API key, or from the key itself when it has no label, for events that carry no person input: it groups events per key owner and is never the pseudonym of a person nor necessarily the person who used the key;pseudonymandpseudonym_epochare set),"no_person"(a credential without an owner label and without a key id: nothing can be derived,pseudonymandpseudonym_epocharenull) or"withheld"(attribution was attempted and could not be completed, bothnull).- The code is opaque: it is the same for the same person within your organization, differs between organizations and is not an email, name or user id.
metadata.user_idis not sent in a version 2 payload; useemployee.pseudonym. - Key and device identity fields are not part of the event, so they are absent from
metadata. - Treat a missing
payload_versionas version 1. Ignore unknown fields so later additions do not break your integration.
Verify the signature
Compute the HMAC over the exact raw body you received, before parsing it:
import { createHmac, timingSafeEqual } from "node:crypto";
export function isValidAgentIdSignature(rawBody: string, signature: string, secret: string) {
const expected = createHmac("sha256", secret).update(rawBody, "utf8").digest("hex");
const a = Buffer.from(expected, "hex");
const b = Buffer.from(signature, "hex");
return a.length === b.length && timingSafeEqual(a, b);
}import hashlib
import hmac
def is_valid_agentid_signature(raw_body: bytes, signature: str, secret: str) -> bool:
expected = hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, signature)Answer with a 2xx status. Use X-AgentID-Event-ID to ignore duplicates.
Other alert channels
For human notifications, set a Slack incoming webhook and an alert e-mail in Guardrails → Notification Channels.