|
| 1 | +# Voice Copilot — Project Goal |
| 2 | + |
| 3 | +## One-liner |
| 4 | +A voice copilot you drop into any complex web app. User clicks 🎙️, speaks in plain |
| 5 | +language, and the copilot **understands → navigates → executes** — confirming and |
| 6 | +collecting missing inputs by voice. The reusable, impressive artifact is the *voice |
| 7 | +layer*; the Mini-CRM is just the "victim app" that proves it works on something |
| 8 | +genuinely painful to click through. |
| 9 | + |
| 10 | +**Purpose:** portfolio piece to showcase applied voice-AI skill (intent understanding, |
| 11 | +app-state grounding, safe agentic action). |
| 12 | + |
| 13 | +## The 3 capabilities → 3 agent tools |
| 14 | +| Capability | Tool | Behavior | |
| 15 | +|---|---|---| |
| 16 | +| Understand what user *really* wants | `recall(query)` | Vectorless memory search via heavier LLM; resolves entity refs + prefs | |
| 17 | +| Navigate | `navigate(target, filters?)` | Frontend routes to page/section, highlights | |
| 18 | +| Execute | `execute(action, params)` + `collect(field)` | Runs action behind confirmation gate; voice slot-fills missing params | |
| 19 | + |
| 20 | +## Architecture (agent-as-retriever + two-tier LLM) |
| 21 | +``` |
| 22 | +🎙️ User ──▶ LiveKit Agent ── Gemini 2.5 Flash (reflexes: turn-taking, tool routing) |
| 23 | + ├─▶ recall(query) ──▶ Gemini 2.5 Pro reasons over memory tree ──▶ answer |
| 24 | + ├─▶ navigate(target) ─RPC─▶ React Mini-CRM (routes + highlights) |
| 25 | + ├─▶ collect(field) ─RPC─▶ React (voice slot-fills a form field) |
| 26 | + └─▶ execute(action) ─RPC─▶ React (Confirm card + 🔊/🔇 + voice confirm) |
| 27 | +``` |
| 28 | +- **Frontend publishes its own capability registry** (routes + typed actions) to the agent. |
| 29 | + Agent never scrapes DOM or guesses — it calls back via **LiveKit RPC**. Reliable + safe. |
| 30 | +- **Flash** = voice loop only. **2.5 Pro** = lives *behind* `recall`, does vectorless |
| 31 | + reasoning. Latency there is acceptable (only fires when Flash lacks context). |
| 32 | + |
| 33 | +## Memory = vectorless (grounded in 2025/26 SOTA) |
| 34 | +No embeddings, no vector DB. Structured, human-readable tree (JSON/markdown): |
| 35 | +session context + CRM data + persistent user prefs. `recall` hands the relevant slice |
| 36 | +to Pro and asks it to reason. Debuggable, zero infra. |
| 37 | +- Ref: PageIndex / vectorless RAG (VectifyAI, Sep 2025); agent-as-retriever (Claude Code/Cursor). |
| 38 | +- Decision: **session context + vectorless persistent prefs** for v1. |
| 39 | + |
| 40 | +## Stack (all free-tier) |
| 41 | +| Layer | Choice | |
| 42 | +|---|---| |
| 43 | +| Orchestration | LiveKit Agents (Python) — free VAD, barge-in, turn detection | |
| 44 | +| STT | Deepgram streaming | |
| 45 | +| Voice brain | Gemini 2.5 Flash (Vertex) | |
| 46 | +| Recall brain | Gemini 2.5 Pro (Vertex, behind `recall`) | |
| 47 | +| TTS | ElevenLabs (fallback: Deepgram Aura) | |
| 48 | +| Frontend | React + LiveKit client SDK (owns routing, forms, Confirm card + mute) | |
| 49 | + |
| 50 | +## Confirmation UX |
| 51 | +Visual Confirm/Cancel card **+** spoken "…confirm?" **+** mute (🔇) toggle. |
| 52 | +Navigation/read = no confirm; mutating actions = confirm. |
| 53 | + |
| 54 | +## v1 hero flows (the 90-sec demo) |
| 55 | +1. **Navigate** — "Show me Dubai leads that went cold." → filter + route, no confirm. |
| 56 | +2. **Recall + navigate** — "Open the one I talked to yesterday about the villa." → `recall` resolves entity → opens. |
| 57 | +3. **Execute + confirm** — "Move this to Won." → Confirm card + voice → executes. |
| 58 | +4. **Execute + slot-fill** — "Schedule a follow-up." → `collect` voice-fills date/note → confirm → done. |
| 59 | + |
| 60 | +## Latency target |
| 61 | +< 1.5s voice round-trip for navigate/execute. `recall` may take longer (acceptable). |
| 62 | + |
| 63 | +## Milestones |
| 64 | +- **M0** — Repo scaffold: React Mini-CRM (seeded leads) + LiveKit room + agent skeleton. |
| 65 | +- **M1** — Capability registry + `navigate` RPC working end-to-end (flow 1). |
| 66 | +- **M2** — `recall` tool + vectorless memory tree + Gemini 2.5 Pro (flow 2). |
| 67 | +- **M3** — `execute` + Confirm card + mute + voice confirm (flow 3). |
| 68 | +- **M4** — `collect` slot-filling (flow 4). Record demo video. |
| 69 | + |
| 70 | +## Open items |
| 71 | +- Gemini Vertex service-account JSON — user to provide (drop at `C:\voice-copilot\.secrets\vertex.json`, gitignored). |
| 72 | +- Deepgram + ElevenLabs API keys — free-tier signup. |
| 73 | + |
| 74 | +## Status |
| 75 | +- Goal locked 2026-07-12. |
| 76 | +- **M0 scaffold DONE** (2026-07-12): repo structure, agent skeleton (main.py + 4 tools), |
| 77 | + vectorless memory.py, token_server.py, React Mini-CRM (App.tsx + Confirm/collect cards), |
| 78 | + seed data, README, .gitignore. Creds verified: Vertex Flash+Pro reachable; vectorless |
| 79 | + `recall` resolves fuzzy refs end-to-end. |
| 80 | +- **Blocking to run:** LiveKit Cloud creds (URL/key/secret) in `agent/.env`; then |
| 81 | + `pip install -r agent/requirements.txt` + `npm install` in `web/`. |
| 82 | +- **Next: M1** — wire `navigate` RPC live (flow 1) once LiveKit creds land. |
0 commit comments