> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect AI Supervisor

> The AI participant in every Connect thread: answers order questions instantly, translates live, nudges silent parties, masks unsafe content, and escalates to your inbox.

Every Connect thread has a fourth participant: the **Supervisor** — the same AI agent that runs your OpenCX support, with the same [Knowledge](/knowledge/introduction), the same [Actions](/actions/introduction), and the same [handoff rules](/handoff/introduction). It reads every lane and acts on what it sees.

This is the difference between chat infrastructure and Connect. A chat pipe moves messages between three people and stops there. The Supervisor makes the conversation *resolve*.

## Three modes, set per lane

| Mode      | The Supervisor will…                                                                                                       | Use it for                                            |
| --------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| `observe` | Watch silently: sentiment, safety masking, analytics, escalation triggers. Never speaks.                                   | Lanes where you only want a safety net                |
| `assist`  | Everything in observe, plus live translation, suggested replies for merchants and couriers, and unanswered-message nudges. | Keeping humans fast without AI speaking to customers  |
| `resolve` | Everything in assist, plus answering directly: order status, ETAs, policies, anything your Actions can do. **Default.**    | Absorbing the traffic that shouldn't interrupt anyone |

Set org defaults in **Connect → Supervisor**, override per thread or per lane at [creation](/api-reference/connect/create-thread) or any time with a [PATCH](/api-reference/connect/update-thread). [Autopilot topic rules](/handoff/topics) apply — topics you've gated to humans stay with humans in Connect too.

## What intervention looks like

```mermaid theme={"dark"}
sequenceDiagram
  autonumber
  participant C as Customer
  participant S as AI Supervisor
  participant M as Merchant
  participant H as Your inbox
  C->>M: "وين طلبي؟" (where's my order?)
  S->>C: Courier picked it up 4 min ago — about 12 min away 🛵
  Note over S,M: Merchant never interrupted
  C->>M: "You forgot the garlic sauce. Again."
  S-->>M: Suggested reply + sentiment flag (frustrated, repeat issue)
  M--xS: No reply for 5 minutes
  S->>M: Nudge: customer waiting on customer_merchant lane
  M--xS: Still no reply
  S->>H: Escalate → session with thread summary attached
```

### Answers before anyone is interrupted

In `resolve` mode the Supervisor fields the questions that dominate order chat — *where is my order, how long, can I change the address, what's the refund policy* — grounded in the thread's `order_status`, your `custom_data`, your Knowledge, and live calls to your Actions (track shipment, check refund eligibility, modify delivery notes). Merchants cook, couriers drive, customers get answers in seconds.

### Live translation

Each participant sets a `language`. The Supervisor renders every message in the reader's language — the Arabic-speaking customer and the English-speaking courier each see a native conversation, with the original a tap away. No configuration, no per-message API calls, no translation add-on tier.

### Nudges and cover

Delivery chat dies when one side goes quiet. The Supervisor tracks per-lane response times: after a configurable silence (default 5 minutes) it nudges the silent party, and in `resolve` mode it covers where it can — "The store hasn't replied yet; I checked your order and the kitchen marked it ready 2 minutes ago."

### Safety, always on

In every mode, including `observe`:

* **PII masking** — phone numbers, emails, payment details typed into a lane are masked before delivery.
* **Abuse filtering** — harassment and profanity handled by AI moderation, not wordlists; incidents logged per participant.
* **Off-platform detection** — "call me on +974…" or "pay me cash directly and I'll cancel the fee" gets masked and flagged to you via [webhook](/connect/webhooks).

### Escalation into your real support

When the Supervisor hits its limits — frustrated customer, prohibited topic, explicit "I want a human", or a nudge chain that went nowhere — it escalates: a standard OpenCX [session](/api-reference/chat-sessions/index) opens in your inbox, carrying a summary of the thread, the sentiment trail, and the order context. Your agents handle it with your normal routing, SLAs, and [helpdesk sync](/integrations/introduction) — Connect is a channel in your support stack, not a second stack.

## Configuration

```json theme={"dark"}
{
  "supervisor": {
    "mode": "resolve",
    "lanes": {
      "customer_merchant": { "mode": "resolve", "nudge_after_seconds": 300 },
      "customer_courier": { "mode": "assist" }
    },
    "escalation": {
      "sentiment_threshold": "frustrated",
      "on_unanswered_nudges": 2
    }
  }
}
```

Everything here has a dashboard equivalent under **Connect → Supervisor**, where you'll also find per-lane analytics: resolution rate, deflected messages, translation volume, nudge outcomes, and escalation reasons — the same [Insights](/features) pipeline as the rest of OpenCX.

<CardGroup cols={2}>
  <Card title="Threads and lanes" icon="layer-group" href="/connect/threads">
    The conversation model the Supervisor operates on.
  </Card>

  <Card title="Connect webhooks" icon="globe" href="/connect/webhooks">
    Every intervention and escalation, streamed to your backend.
  </Card>
</CardGroup>
