Commit Graph

15 Commits

Author SHA1 Message Date
tocmo0nlord
ceea3d151c Fix mid-call silence: keep momentum after acknowledgments
A caller gave their insurance; AVA replied with a bare acknowledgment ("staff
will verify your coverage") and stopped, with no follow-up question. Both sides
then waited -> dead air (pipeline idle, no GPU/LLM activity, matching flat
memory/wattage). Caller had to break the silence with "what questions do you
have?". Root cause: the one-sentence brevity rule made AVA end a booking turn on
a dead-end statement.

Fix: prompt now requires, until the booking is complete, that every turn end
with the next question — acknowledgment + next question in the same turn (e.g.
insurance ack -> immediately ask day/time). Verified 4/4. Documented in CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 16:34:25 +00:00
tocmo0nlord
d7bfe2dbe8 Deterministic phone confirmation safety net + docs
EndCallProcessor now guarantees the callback number is confirmed on booking
calls: the 8B reads it back only ~half the time, so if a closing is reached on a
booking call (booking keyword seen) without the agent having spoken the number
(phone_marker absent from its replies), the hang-up is suppressed and a scripted
confirmation line (caller-ID spelled out) is injected as a TTSSpeakFrame first.
The agent's own readback satisfies the gate (no double-ask); info-only calls are
never asked for a number. Runtime-tested all four paths (inject / no-inject /
info-only / inject-then-end).

CLAUDE.md: document the safety net, the "never claim a booking" rule, the direct
phone-confirm phrasing, and the insurance "never say we accept" rule.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 15:52:22 +00:00
tocmo0nlord
856f9c284d Docs: Phase 1 change log + gate status
Document all post-revert Phase 1 changes (Whisper base->medium, lifespan LLM
warmup/pin keep_alive=-1, num_ctx 8192, call workflow, TTS digit/name spelling,
capture-and-defer dates, insurance never-suggest/guess, broadened symptom reason
capture, hang-up grace, office selection). Mark gate items: AVC-side termination,
AudioHeartbeat, zombie-free, JSON visibility = done; capacity gating, 10-call
consecutive run, and latency re-measure = still need live testing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 14:41:01 +00:00
tocmo0nlord
ba36ae6891 Log/surface the reason, pin LLM warm for latency, doc insurance rule
- Reason visibility: the reason WAS extracted ("disintegrated eyes") but only
  lived in the Odoo description note. Add it to the post-call log line and to
  the Odoo lead title so it's visible at a glance.
- Latency: split the timing — Whisper is ~0.1s, latency is LLM-side. The ~3s
  tail was cold model reloads after Ollama's keep-alive expired. server.py now
  warms + pins the model on startup (keep_alive=-1, ollama ps UNTIL=Forever),
  removing cold first-turn stalls. Whisper size left alone (not the bottleneck).
- CLAUDE.md: insurance rule (never suggest/guess the plan), latency note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 04:24:10 +00:00
tocmo0nlord
667cf87202 Docs: add Call Workflow section (ordered call script)
Document AVA's directed call script — reason first, location, caller info
(address by name), verify phone by readback near the end, wrap up with "anything
else?" — and the gated closing (Goodbye only after the anything-else question).
Note the 8B reliability ceiling on step ordering.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 03:44:31 +00:00
tocmo0nlord
0605025113 Set AGENT_NAME_SPOKEN=Eva (example) and document name/phone behaviour
- .env.example: add AGENT_NAME_SPOKEN=Eva.
- CLAUDE.md: note the agent-name respelling (AVA -> Eva, "EE-vuh"), that the
  caller-ID is injected pre-spelled (model mangles raw digits), and that the
  phone is confirmed near the END of the call, not led with.

(.env itself is gitignored; AGENT_NAME_SPOKEN=Eva set there and live.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 02:33:08 +00:00
tocmo0nlord
24d4efd7ed Docs: office-selection rule (confirm match, don't offer others)
Note in the Call Data Capture table that AVA confirms a matching office and
moves on rather than offering/comparing other offices — the fix for the
"I'm in Kendall" -> "Hollywood or Miami?" off-script behavior.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 01:55:56 +00:00
tocmo0nlord
46409bd51a Docs: SpokenKokoroTTSService number normalization
Document the TTS number-reading fix in the "already solved" section: phone
numbers, street numbers, and zips are spoken digit-by-digit (no "dash"/parens,
country code dropped); dates/times left natural. tts_normalize() holds the rules.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 04:20:43 +00:00
tocmo0nlord
b31f685d91 Raise model num_ctx to 8192 to fix mid-call silence
Long calls overflowed the 4096-token window mid-conversation, forcing Ollama to
truncate + re-evaluate the full context each turn = multi-second stalls / dead
air. Rebuilt activeblue-avc:latest with num_ctx 8192 (rollback tag
activeblue-avc:pre-ctx8k). Combined with removing the 45-day calendar injection,
this keeps long calls well under the window. Doc: context row, Modelfile
reference, and a root-cause note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 03:53:41 +00:00
tocmo0nlord
08d9db4f09 Docs: dates are capture-and-defer (in-call computation removed)
Update the call-capture section to reflect the fix — AVA takes the day/time in
the caller's words and defers exact-date confirmation to staff; the 45-day
calendar injection and in-call date validation were removed after a real call
derailed and the 8B model proved unable to compute dates reliably. Post-call
resolved_date is best-effort/staff-verified only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 03:20:57 +00:00
tocmo0nlord
199d16c630 Document call data capture, date validation, and hang-up grace pause
- New "Call Data Capture & Date Validation" section: the six captured fields
  (full name, phone confirm/alternate, office, reason, insurance log-only,
  validated preferred date/time), how each is logged, and the per-call calendar
  injection that drives date pushback.
- EndCallProcessor note: HANGUP_DELAY_SECS grace pause; Phase 1 gate result.
- .env reference: add HANGUP_DELAY_SECS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 03:01:49 +00:00
tocmo0nlord
93620be9bb Update CLAUDE.md: Phase 1 keeps Whisper STT + Twilio Auth Token
Reframe Change 1/2/3 to record the actual decisions instead of the trialed
swaps: Deepgram and the Twilio Standard API Key were both evaluated and
reverted. Document why the API Key cannot replace the Auth Token (Twilio signs
webhooks with the Auth Token). Update the .env reference, Phase 1 checklist,
dependencies, and open items accordingly; gate zombie-check uses ps/pgrep
(bare process, not Docker).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 01:09:50 +00:00
tocmo0nlord
004ef3bdc0 Update CLAUDE.md: Gitea URLs + keep repo name consistent as avc-phone-ai
Adds the full Gitea repo URL to the infrastructure table and the monitoring
dashboard line, and keeps the repository-structure tree root as avc-phone-ai
to match the rest of the doc.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 23:57:57 +00:00
tocmo0nlord
204865b733 Fix repo name references to avc-phone-ai in CLAUDE.md
Header, structure tree, and footer pointed at avc-phone-agent; the actual
Gitea repo is avc-phone-ai. The avc-phone-agent-prod Twilio API key name is
left unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 22:46:48 +00:00
4bf72b9616 Upload files to "/" 2026-06-23 20:45:56 +00:00