Skip to main content
This guide walks you through integrating White Circle into an AI-powered customer support chatbot. You’ll learn how to moderate both user messages and AI responses, track conversations across multiple turns, identify high-risk users, and set up real-time alerts.

Overview

AI support chatbots face unique moderation challenges:
  • Users may attempt to manipulate the AI into providing harmful advice or bypassing guidelines
  • AI responses might inadvertently share sensitive information or give inappropriate recommendations
  • Long conversations require maintaining context while checking each new message
  • Repeat offenders need to be identified across multiple support sessions
White Circle addresses all of these by providing real-time content moderation, context-aware analysis, and user risk scoring.
Only the last message is evaluated for violations. When you send a conversation with multiple messages, White Circle evaluates only the final message against your policies. Previous messages provide context but are not flagged. This means you should send user messages and AI responses separately for individual moderation.

Prerequisites

Before you begin, make sure you have:
  • A White Circle account with access to the dashboard
  • A working AI chatbot (this guide uses examples with OpenAI’s API, but works with any provider)

Architecture

Here’s how White Circle fits into your support chatbot architecture:

Step 1: Create an API Key

Create an API key to authenticate your requests to White Circle.
  1. Go to the API Keys page
  2. Click Create API Key
  3. Name it something descriptive like support-chatbot-production
  4. Copy the key and store it securely — you won’t be able to see it again

Step 2: Create Policies

Create policies that define what content should be flagged. For a support chatbot, you’ll need policies to protect users and maintain safe conversations. Go to the Policies page and create the following:
Prevents explicit sexual content in support conversations.
Detects manipulation attempts targeting the AI system.
Detects and blocks child sexual abuse material references.
Prevents threats of violence and harm.
Use Shadow mode when first creating policies to test them without affecting your production traffic. You can monitor flagged content in the dashboard before enabling enforcement.

Step 3: Create a Deployment

Create a deployment that groups your policies together.
  1. Go to the Deployments page
  2. Click Add Deployment
  3. Name it support-chatbot-production
  4. Select all the policies you created above
  5. Save the deployment and copy the Deployment ID
Consider creating separate deployments for different environments:
  • support-chatbot-development — for dev and QA testing
  • support-chatbot-production — for live traffic

Step 4: Integrate the API

Now integrate White Circle into your chatbot. Below is a complete implementation example.
Context merging reduces payload size. Use this recommended flow:
  1. First request in a session: Send the full conversation history to establish context
  2. Subsequent requests: Set include_context: true and send only the new message — White Circle automatically prepends previous messages from the session
This approach minimizes data transfer while maintaining full conversation context for accurate moderation.

Configuration

First, set up your configuration and White Circle client:

Main Chatbot Logic

Here’s the core chatbot implementation with White Circle integration:

API Endpoint

Expose the chatbot as an API endpoint in your web framework:

Step 5: Add User Risk Scoring

Use White Circle’s Radar feature to identify users with a history of violations. This helps you proactively protect your support agents.

Step 6: Set Up Slack Alerts

Get instant Slack notifications for critical policy violations. You can configure alerts for specific policies only — for example, receive notifications for abuse or jailbreak attempts while skipping less urgent violations.
  1. Go to Integrations → Slack
  2. Click Connect to Slack and authorize the app
  3. Select a channel (e.g., #support-alerts)
  4. Select only critical policies — choose high-priority policies like “Harm to Others” or “CSAM” to avoid alert fatigue
  5. Save the integration
Keep your alert channel focused by enabling notifications only for policies that require immediate attention. You can always review all violations in the dashboard.
For private channels, first invite the bot with /invite @White Circle Notifications

Step 7: Track Metrics

Beyond moderation, use White Circle’s metrics to gain insights into your support conversations. Create metrics on the Metrics page:
Track when users request refunds or monetary compensation.
Capture genuine expressions of gratitude and positive feedback.
Detect when users want to speak with a human agent.
Metrics are computed in the background and don’t affect your API response times. View aggregated data in your dashboard to identify trends and improve your support experience.

Best Practices

Check user messages and AI responses. Users can manipulate AI into generating harmful content even when their own messages appear innocent.
For multi-turn conversations, use include_context: true with an external_session_id. This reduces payload size and ensures White Circle has full conversation context.
Always include metadata.user.id and metadata.user.email to enable risk scoring. This builds a violation history that helps identify repeat offenders.
If your chatbot accepts image uploads (e.g., screenshots, product photos), use the Artifact Check endpoint to moderate them before processing:
This checks the image independently against your policies before it enters the conversation.
When White Circle flags an AI response as harmful, have a fallback strategy ready:
  • Return a safe, pre-written response that offers to help differently
  • Retry with a more capable model (e.g., upgrade from gpt-5-mini to gpt-5.2)
  • Escalate to a human agent for sensitive topics
  • Log the incident for later review and model fine-tuning
Enable shadow mode on new policies to test them without blocking content. Review flagged sessions in the dashboard before enabling enforcement.
Store flagged sessions and the policies they violated. This helps you:
  • Identify false positives and tune policies
  • Build training data for your AI model
  • Document incidents for compliance

Example Conversation Flow

Here’s how a typical moderated conversation looks:

Next Steps

View Sessions Dashboard

Monitor flagged sessions and review moderation decisions

Artifact Moderation

Moderate image uploads and file attachments

Risk Scoring

Deep dive into user risk assessment with Radar

Webhooks

Set up custom integrations with webhook events