Use Cases

AI Support Chatbot

Check user messages, tool results, and assistant replies in support conversations

AI support chatbots handle account data, refunds, order details, and emotionally charged conversations. Use the Events API to check each part of the conversation separately and keep a clear record of what was flagged.

What to Check

For a support chatbot, send Events for:

EventTypeFieldWhy it matters
User messagemessagecontentDetect abusive requests, sensitive data, jailbreaks, or unsafe instructions.
Tool resulttooloutputCheck returned account data, refund decisions, or internal notes before they influence the assistant.
Assistant replymessagecontentDetect unsafe advice, leaked data, or Policy-violating responses before showing them to the user.
Agent stateagentstateTrack handoff decisions, escalation state, and risk markers.

Basic Flow

  1. Check the user’s message when it arrives.
  2. If your assistant calls tools, check any sensitive tool outputs before using them.
  3. Check the assistant’s final response before sending it to the user.
  4. Store the returned internal_event_id values when you need to retrieve the exact results later.

Example: Check a User Message

cURL

curl -X POST "https://eu.whitecircle.com/api/event" \
  -H "Authorization: Bearer wc-your-api-key" \
  -H "Content-Type: application/json" \
  -H "whitecircle-version: 2026-06-01" \
  -d '{
    "event": {
      "type": "message",
      "event_id": "evt_user_turn_7",
      "role": "user",
      "content": "I need a refund. My account number is 123-45-6789."
    },
    "run_id": "support_conversation_123_turn_7",
    "external_session_id": "support_conversation_123"
  }'

Example: Check Tool Output

JSON

{
  "run_id": "support_conversation_123_turn_7",
  "external_session_id": "support_conversation_123",
  "event": {
    "type": "tool",
    "event_id": "evt_order_lookup_turn_7",
    "name": "lookup_order",
    "call_id": "call_order_123",
    "output": {
      "order_id": "ord_123",
      "refund_eligible": true,
      "customer_tier": "vip",
      "internal_note": "Customer has disputed two previous charges."
    }
  }
}

Example: Check Assistant Reply

JSON

{
  "run_id": "support_conversation_123_turn_7",
  "external_session_id": "support_conversation_123",
  "event": {
    "type": "message",
    "event_id": "evt_assistant_turn_7",
    "role": "assistant",
    "content": "Your order is eligible for a refund. I can start that process now."
  }
}

Batch a Full Turn

You can send all Events for one turn in a single batch:

JSON

{
  "run_id": "support_conversation_123_turn_7",
  "external_session_id": "support_conversation_123",
  "events": [
    {
      "type": "message",
      "event_id": "evt_user_turn_7",
      "role": "user",
      "content": "I need a refund. My account number is 123-45-6789."
    },
    {
      "type": "tool",
      "event_id": "evt_order_lookup_turn_7",
      "name": "lookup_order",
      "output": {
        "order_id": "ord_123",
        "refund_eligible": true
      }
    },
    {
      "type": "message",
      "event_id": "evt_assistant_turn_7",
      "role": "assistant",
      "content": "Your order is eligible for a refund. I can start that process now."
    }
  ]
}

The response groups results into messages, tools, agents, and other typed buckets.

IDExampleRecommendation
run_idsupport_conversation_123_turn_7Use one per conversation turn or assistant operation.
external_session_idsupport_conversation_123Use your stable conversation ID.
event_idevt_user_turn_7Use one per message, tool result, or assistant reply.
internal_event_idreturned by White CircleStore when you need exact lookup later.

Next Steps

Check One Event

Learn the single Event request and response shape.

Check Multiple Events

Batch all Events for one support turn.

Get Event Results

Retrieve exact or latest Event results.

Risk Scoring

Use user metadata and Policy violations to inspect user risk.