Answer owner rollout
How to roll the shared tool-calling agent into text and Voice without flipping visitors early, plus soak and transport exit criteria.
ChatAI can answer substantive text and Voice turns with either the legacy prepareAnswer path or the shared tool-calling agent (packages/rag/src/agent). Defaults stay on legacy until you flip instance flags. This page is the operator checklist for soak, visitor release, and when GPT-Live's transitional transport is no longer acceptable.
Defaults (safe)
| Flag | Default | Effect |
|---|---|---|
ANSWER_OWNER_TEXT | legacy | Text uses prepareAnswer |
ANSWER_OWNER_VOICE | legacy | Voice uses prepareAnswer → commentary → gate |
TEXT_AGENT_VISITOR_RELEASE | false | Widget/API visitors stay on legacy text even if text owner is agent |
VOICE_AGENT_VISITOR_RELEASE | false | Widget visitors stay on legacy Voice even if voice owner is agent |
Playground/owner sessions may use agent when the matching owner flag is agent, without visitor release. Mid-turn flag flips do not switch the path for an in-flight turn (snapshot at turn start).
Rollout stages
Do text before Voice. Prefer an allowlist of assistant ids before instance-wide enablement.
- Shadow (optional):
ANSWER_OWNER_TEXT=shadow_agent(and later Voice). Production stays legacy; a background agent run writesstatus=shadowusage withpath: shadow_agent. No visitor output, history, or customer charge from the shadow path. - Playground agent:
ANSWER_OWNER_TEXT=agentwith visitor release stillfalse. Exercise shared fixtures and reported conversations. Confirmdebug.answerOwner === "agent"via Dashboard → Conversations → Export JSON (sanitized per-messagedebug; not an in-playground download). - Voice playground agent:
ANSWER_OWNER_VOICE=agentafter text looks healthy. Same gate rules: validated speakable text only, then commentary, then open gate. On connect, the server speaks the assistant welcome once (session.started→ commentary + gate). Exports includemodality: "voice"and slimdebug.voicewhen present. - Visitor release: set
TEXT_AGENT_VISITOR_RELEASE=true/VOICE_AGENT_VISITOR_RELEASE=trueonly after soak acceptance below. Independent per channel. - Widen allowlists then clear them when ready for all assistants on that channel.
Rollback: set the channel flag back to legacy. In-flight turns keep their snapshot; new turns use legacy immediately.
Soak acceptance (before visitor release)
Keep defaults until these hold on staging (or a narrow production allowlist):
- Shared fixtures green on text: ack, yes-after-offer, how-are-you, greeting+ask, overview, off-topic (no invite-loop phrasing).
- Evidence: Layer B rejects bad citations; Layer C fail-closed when unavailable; unsupported-but-cited claims do not ship as verified.
- Purpose: suggested / instructions-derived / unconfigured still enforce; high-confidence out-of-scope → domain limitation; uncertain with verified evidence keeps the draft.
- Billing: one production reservation settle per turn; shadow rows never increment customer hosted balance under
HOSTED_USAGE_ENFORCEMENT=enforce. - Voice: no factual commentary append before validation; social path unchanged; widget visitors still legacy until
VOICE_AGENT_VISITOR_RELEASE. - Metrics present on agent turns:
t_agent_draft_ms,t_verify_ms,t_purpose_ms,t_validated_ready_ms(debug / internal).
Playground Voice mic soak checklist
With ANSWER_OWNER_TEXT=agent, ANSWER_OWNER_VOICE=agent, and visitor release still false, run once on a real mic in the owner playground. Store the conversation, then Dashboard → Conversations → Export JSON.
- Connect Voice → hear the assistant welcome once (no double-speak on reattach).
- Say “Hey, what’s good” and “How is it going first of all” → short social replies; no domain-limitation redirect loop.
- Ask a missing in-domain fact (e.g. “How old is he” when age is not in sources) → not-in-knowledge wording; no “Feel free to ask…”.
- Ask “Okay, what’s their latest” then quickly “the new project” (same breath or short continuation) → one knowledge turn (or a rewritten query that includes the Purpose subject / project sense); when the KB has project docs, answer cites projects/ChatAI — not a domain-limitation line with sources attached.
- Export JSON on that agent turn shows
modality: "voice",debug.answerOwner: "agent", and rewrittendebug.question/ slimdebug.searchQueries(strings only). - Ask “Help me bake a cake” → domain limitation; no cake recipe; outcome stays out of scope.
- Soft ASR noise alone (e.g. inhale/laugh tags) → no redirect turn / no canned help spam.
- Confirm widget/API visitors still use legacy while
VOICE_AGENT_VISITOR_RELEASE/TEXT_AGENT_VISITOR_RELEASEremainfalse.
Do not flip visitor release until this checklist passes on staging (or a narrow production allowlist).
GPT-Live transport exit criteria
GPT-Live client-delegation + playback gate is a transitional transport. Validated server text is not the spoken audio: commentary is paraphrased, so heard claims can diverge.
Treat these as transport replacement triggers (measure on real mic / staging transcripts):
| Failure mode | Why it matters |
|---|---|
| Ungated factual speech | Visitor hears model audio before ChatAI validates / opens the gate |
| Paraphrase distortion | Heard transcript asserts facts not in the validated payload |
| Grounding control loss | Model invents or expands beyond passages/profile evidence after gate open |
| Sideband cannot block audio | Server cannot prevent residual spontaneous speech on the media path |
Acceptance for keeping the transport: compare validated commentary payload to the heard transcript on Orb / Dock / Guided; mismatches are fidelity failures, not “already safe because the server validated.”
This checklist does not migrate Voice to a new provider by itself — it only says when to stop treating the current transport as good enough.
Legacy retirement checklist
Do not remove prepareAnswer / scope-router ownership until all of the following are true:
- Text production traffic uses
ANSWER_OWNER_TEXT=agent(or allowlist covering production assistants) with visitor release on, soak metrics healthy - Voice production uses
ANSWER_OWNER_VOICE=agentthe same way, or an explicit decision to keep Voice on legacy longer - Shared fixtures remain green on both channels
- Shadow soak (if used) no longer needed for the cutover decision
- No nested call from the agent into
prepareAnswer/generateGuardedAnswerexists - Docs and env reference describe only the surviving path (or document legacy as deprecated)
Until then, legacy remains the production path for legacy and for the production side of shadow_agent.