01 / SAKSHAM
A multi-agent RAG platform with real-time voice, built for healthcare workflows.
Mastra-orchestrated agents on Gemini 2.5 Flash, a Pinecone vector store across five namespaces, and a bidirectional voice channel that doesn't trip over itself under load.
Healthcare assistants need accurate answers under 2 seconds against 10K+ indexed documents, plus a real-time voice channel where overlapping responses are not acceptable. Existing patterns either lose latency to retrieval or lose stability the moment voice gets bidirectional.
Multi-agent RAG on Mastra AI with Gemini 2.5 Flash. Retrieval runs over Pinecone (768-dim embeddings across 5+ namespaces). Persistent conversational memory lives in PostgreSQL with observational layers and 7 LLM-callable tools (symptom checker, semantic search, appointment booking). Voice streams over WebSocket using Gemini Live API, gated by a 4-state turn-management machine. Langfuse + OpenTelemetry trace every turn end-to-end.
- 4-state turn-management machine eliminated overlapping-response bugs in voice
- Prompt-injection detection at 0.7 threshold; one-time session tokens with 60s TTL
- IP-based rate limiting at 3 connections/IP — production-safe defaults
- Per-turn tracing in Langfuse + OpenTelemetry; nothing ships without an eval path
Sub-2s retrieval over 10K+ healthcare documents. 50+ concurrent voice sessions sustained; voice latency down 40%. Unauthorized access cut 95% via the layered security controls.