You are helping me build the following AI agent workflow. ## Goal WhatsApp Voice Assistant Agent: Accepts WhatsApp voice commands to schedule calendar events, send emails, or query a knowledge base via an automated AI agent. ## Specification - What it does: Send voice messages via WhatsApp to instantly schedule your calendar events, send emails, or find answers from our knowledge base without typing a word. You receive clear audio confirmations directly in the chat as your requests are handled automatically. - Trigger: Triggered by an event (Event ยท on WhatsApp voice message) - Autonomy: Fully hands-off - Expected setup effort: a few focused days - Tools/services involved: - Twilio: WhatsApp voice input and output routing - VAPI: Voice processing and intent interpretation - n8n: Workflow orchestration and MCP server execution - Google Calendar: Scheduling events via voice commands - Gmail: Sending confirmation and reminder emails ## Known pitfalls, handle each one explicitly in your implementation 1. Twilio media streams can drop during poor network conditions, so implement a retry mechanism in the WebSocket connection. 2. Voice latency accumulates across multiple hops, optimize payload sizes and use parallel processing where possible to keep response times under three seconds. 3. Supabase queries may return unstructured text that confuses the intent router, so sanitize and truncate knowledge base results before feeding them into the LLM context. ## Reference implementation https://n8n.io/workflows/8284 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/whatsapp-voice-assistant-agent/ via usecasesforagents.com