Keep users safeObserve

Risk alerts

When risk crosses a threshold, a person hears about it.

Elevated or critical risk fires a signed safety.flagged webhook from both observe() and process(), whether or not a gate also acted. Send it to your own endpoint, Slack or Discord, and on to a human takeover.

Alerts · live

  • safety.flaggedcritical
    user_88 · flags: self_harm→ Webhook · Slack
  • safety.holdhold
    user_42 · reply held for review→ Webhook
  • anomaly.detectedwarning
    user_17 · engagement_drop→ Webhook
  • proactive.mood_droptrigger
    user_05 · mood below 0.30→ Discord
Illustration of a risk alert feed
How it works

Alerts that leave the API response

A risk level in a response only helps if someone reads it. Humane sends the alert out as a signed webhook with the user's id, the risk level, the flags and the call it came from, so your team can act without building the alerting themselves.

  • safety.flagged on elevated and critical risk
  • safety.hold and safety.blocked when a gate acts
  • anomaly.detected and proactive events for slower-moving risk
  • Slack and Discord connectors format the same events for a channel

Webhook delivery

POST /hooks/humane
X-Humane-Event: safety.flagged
X-Humane-Delivery-Attempt: 1
X-Humane-Signature: t=1762000000,v1=5f2c…9ab1

{"event":"safety.flagged",
 "data":{"user_id":"user_88","risk_level":"critical",
         "flags":["self_harm"],"source":"observe"}}
HMAC-SHA256(secret, t + "." + body)Valid

Retried on failure · dead-letter queue · manual retry

Illustration of a signed webhook delivery
Receive it

Verify, then page someone

python
import json, os
from fastapi import FastAPI, HTTPException, Request
from humane_ai import verify_webhook_signature

app = FastAPI()
SECRET = os.environ["HUMANE_WEBHOOK_SECRET"]

@app.post("/hooks/humane")
async def humane_hook(request: Request):
    raw = await request.body()
    sig = request.headers.get("X-Humane-Signature")
    if not verify_webhook_signature(SECRET, raw, sig):   # also rejects replays
        raise HTTPException(401, "invalid signature")

    event = json.loads(raw)    # {"event": ..., "timestamp": ..., "data": {...}}
    if event["event"] == "safety.flagged":
        d = event["data"]
        page_on_call(d["user_id"], d["risk_level"], d["flags"], d["source"])
    return {"ok": True}

Wire it up in an afternoon

  1. 1

    Add an endpoint

    Verify the X-Humane-Signature header with the SDK helper.

  2. 2

    Subscribe

    Choose safety.flagged, safety.hold and safety.blocked, or everything with *.

  3. 3

    Route to a person

    Page your on-call rota, post to a channel, or open a takeover for that user.

Humane is not an emergency service

Alerts help your team notice risk sooner. They don't replace your own crisis procedures, staffing or local emergency services, and automated detection can miss things. Plan the human response before you rely on it.

Alert questions

Something else? Ask us.

Every AI should know who it's talking to.

The safety and human-oversight layer for emotional AI: user state across sessions, risk alerts, safety gates and human takeover, with every decision explained.