Building an AI Voice Agent for Life's Most Sensitive Moments
Empathy developers share architectural lessons from building a production voice agent that helps users practice sensitive family conversations about estate planning and wills.

Building a voice agent for emotionally sensitive moments breaks foundational UX assumptions. At Empathy, we developed a conversational AI product designed to help users prepare for difficult conversations—such as discussing estate planning, wills, or power of attorney decisions with family members. While the documentation phase is critical, the subsequent human conversations are often harder to navigate. A voice agent allows users to practice these scenarios safely beforehand.
Moving Beyond Prompts: Deterministic Guardrails
During early internal hackathons, our team built a simple proof-of-concept using basic context, a prompt, and a voice loop with minimal guardrails. While promising, scaling this to production revealed two major failure modes: responses lacking sufficient empathy, and the model inadvertently drifting into offering unauthorized legal advice. To mitigate this, we established a core architectural principle: any decision that can be made deterministically outside the model must not be left to the model.
We divided system responsibilities across dedicated layers. Business logic dictates available conversation paths, a dedicated context layer filters necessary background information, system prompts guide conversational tone, and platform guardrails enforce strict boundaries. This multi-layered architecture ensures that probabilistic generation never overrides regulatory or safety boundaries.
Context Architecture and Evaluation Frameworks
Context management proved to be as crucial as prompt engineering. Instead of passing raw internal data structures to the model, we built an aggregation layer that compiles a minimal, pre-processed context snapshot for each session. This ensures traceability, allowing our engineering teams to review exact system states during post-mortem debugging.
Testing non-deterministic generative systems requires a triple-layered evaluation framework consisting of automated tests for regression, human evaluation for empathy and nuance, and synthetic agents simulating large-scale user scenarios. Combined with perceived latency optimization—such as real-time audio waveform animations and gradual state transitions—these engineering practices bridge the gap between AI flexibility and production-grade reliability.





