Character-consistent support
Drift detection, voice fingerprinting, and long-term memory — wired into a customer support agent so the brand voice holds across thousands of sessions and QA gets alerted when it slips.
The problem
Generic chat agents drift mid-conversation. The tone flattens, the brand voice leaks, and the system prompt loses authority under load. Long sessions amplify it. The result: brand-risky messages, escalations, and lost customer trust.
The fix is not better prompting. It's having a numeric baseline of the persona's voice, scoring every reply against it, and routing the failures into QA before they reach the customer.
How Moonborn solves it
Three capabilities, one outcome:
- Voice fingerprint baked at persona generation — a fifty-scenario embedding baseline of the support agent's Mask.
- Drift detection scores every reply against that fingerprint. Below threshold ships; above threshold alerts (and optionally falls back to a stricter model).
- Long-term memory with cold-tier rotation keeps support conversations grounded — semantic + BM25 hybrid retrieval — without blowing the context window.
The chat runtime ships these by default. You configure the threshold and webhook target; the rest is on.
Minimum integration
import Moonborn from '@moonborn/sdk';
const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });
// Created once via UI or API.
const SUPPORT_PERSONA_ID = 'persona_...';
// Per ticket.
const session = await client.chat.sessions.create({
personaId: SUPPORT_PERSONA_ID,
metadata: { ticketId },
});
// Per inbound message.
const reply = await client.chat.messages.create({
sessionId: session.id,
content: customerMessage,
});
if (reply.driftAlert) {
// Route to QA, don't auto-ship.
await qaQueue.push({ sessionId: session.id, messageId: reply.id, driftScore: reply.driftScore });
}Subscribe the webhook event conversation.drift_detected to push alerts into Slack, your QA tool, or PagerDuty without polling.
Quality gates
Before a support persona reaches production, two automated gates run:
- Provocation test suite — role-breaking, contradictions, emotional load, cultural dissonance. Configurable, with team-authored custom tests on Team+.
- LLM-as-judge audit — five dimensions (coherence, depth, cultural fidelity, voice distinctiveness, realism) with bias detection. Cohen's kappa ≥ 0.7 against a human-rater baseline.
Both can be wired into CI: every persona refine triggers an audit, and a low score blocks the deploy.
What this unlocks for support ops
- Consistent agent voice across thousands of sessions. Drift alerts surface incidents, not customer complaints.
- A/B test brand voice variants via lineage forks — see Brand voice variants.
- Per-locale persona variants — every persona declares an ISO-639-1 language tag; drift detection runs per language.
- Auditable trail. Every reply has a
driftScore, every override has an audit log entry, every escalation has a session ID.
Tier
Pro tier or above is required for drift detection and memory retrieval. The Free tier supports basic chat without drift gating. See the tier matrix for the per-feature breakdown.
Next
- Read the Voice fingerprint concept page for the runtime detail.
- Walk through Quickstart for the chat-session basics.
- Browse the full Chat API reference.