Technical Architecture

Components, integrations, data flow, and system constraints

Treat deviation handling as a first-class runtime system, not a reporting afterthought. Every component is designed for real-time classification, proportional intervention, and continuous learning from agent behavior.

Core Components

Eight services that form the deviation-intelligence runtime.

1

Copilot Panel UI

Suggestion card, override action, deviation status, and supervisor approval — all inline within the agent workspace.

2

Deviation Classification Service

Real-time classification of every override in <500ms. Labels deviation type (corrective, cost-risk, policy-risk, quality-risk).

3

Risk Scoring + Policy Mapping

Computes a 0–21 weighted risk score per override and performs policy_criticality lookup to determine severity.

4

Selective Intervention Router

Maps risk tier to the appropriate friction level: allow (L), justify (M), approve (H), or block (C).

5

Supervisor Queue Service

Receives Tier H and C overrides only. SLA timers enforce response deadlines. Queue is prioritized by risk score.

6

Post-Resolution Audit Pipeline

Batch audit pipeline. 10% random sample of Tier L cases plus all escalated cases feed into the QA review queue.

7

Learning & Calibration Pipeline

Adjusts risk thresholds based on FP/FN rates, promotes approved overrides to suggestion updates, and recalibrates weekly.

8

Inference Gateway

Tier-based model routing with token budgets. Routes Tier L to lightweight models and Tier H/C to high-capability models.

Integration Topology

Five external systems the copilot connects to, each with a defined integration pattern.

Event subscription
Workforce Routing System

Subscribes to assignment and escalation events to track case flow and agent workload in real time.

Bidirectional API
CRM / Chat Platform

Reads case context and conversation history; writes copilot suggestions, deviation tags, and resolution metadata back.

Handoff events
FAQ / Self-Serve Layer

Receives handoff events when self-serve fails to resolve. Passes context (attempted resolution, user intent) to the agent workspace.

Versioned retrieval API
Policy Repository

Serves policy documents by version and market. The classifier and risk scorer query active policy rules at inference time.

Event stream (outbound)
Agent Analytics / QA Stack

Emits structured events — deviation class, risk score, intervention decision, outcome — to the analytics and QA pipeline.

Primary Data Flow

End-to-end path from customer contact to learning loop.

Fork points: FAQ/Self-Serve may resolve the case (→ END). If the agent follows the copilot suggestion, the case proceeds directly to Resolution with a log entry. Overrides enter the classification pipeline.

Customer
Inbound contact
FAQ / Self-Serve
Attempt resolution
Routing
Assign to agent
Agent Workspace
Copilot suggestion
Classifier
Deviation type
Risk Scorer
0–21 score → Tier
Intervention
L / M / H / C action
Resolution
Case closed
Audit
Post-resolution QA
Learning
Calibration loop

Non-Negotiables

Five architectural constraints that cannot be traded away.

Low-latency classification

Deviation classification completes in <500ms. Agents never wait for the system to catch up.

Explainable rationale

Every intervention surfaces the contributing risk factors and policy references so the agent understands why.

Minimal friction for Tier L

70% of overrides pass with zero added friction — just a log entry. The system is invisible when risk is low.

Full provenance for escalated actions

Tier H and C cases carry a complete audit trail: deviation class, risk breakdown, agent rationale, supervisor disposition.

Graceful degradation

If the classifier or gateway is unavailable, the system defaults to Tier M (reason tag required) — never blocks agents outright.

Key Logged Fields

Every deviation event emits these fields for analytics, audit, and learning.

FieldDescription
deviation_classCorrective, cost-risk, policy-risk, quality-risk, or empathy-within-policy
risk_scoreComposite 0–21 weighted score with per-factor breakdown
intervention_decisionAllow, justify, approve, or block — plus the tier that triggered it
agent_reason_tagStructured tag selected by the agent when justification is required
supervisor_dispositionApproved, rejected, or modified — with optional supervisor note
final_case_outcomeResolution type, CSAT score, reopen flag, and cost-to-serve
automation_handoff_contextSelf-serve attempt details passed at handoff: intent, steps tried, failure reason
suggestion_acceptedBoolean — whether the agent accepted the copilot suggestion as-is or overrode it