§ case
Saksham
Jul 2025 — presentAI · Healthcare · Backend · Senior Software Developer · Architect
Saksham is HexaHealth's production multi-agent RAG platform. It pairs Mastra AI agents with Gemini 2.5 Flash, a Pinecone vector store (768-dim, 5+ namespaces) over 10K+ indexed healthcare documents, and a real-time bidirectional voice channel over WebSocket using Gemini Live. Persistent conversational memory is backed by PostgreSQL with observational layers and 7 LLM-callable tools (symptom checker, semantic search, appointment booking). Every turn is traced with Langfuse + OpenTelemetry; access is hardened with prompt-injection detection, one-time session tokens, and IP-based rate limiting.
Mastra AIGemini 2.5 FlashGemini Live APIPineconePostgreSQLWebSocketLangfuseOpenTelemetryTypeScript
◼ Challenges
- →Sub-2s retrieval over 10K+ indexed healthcare documents
- →Real-time voice without overlapping responses across 50+ concurrent sessions
- →Production-grade security against prompt injection and abuse
◼ Solutions
- →Multi-agent RAG with Mastra + Gemini 2.5 Flash and Pinecone (768-dim, 5+ namespaces)
- →4-state turn-management machine over WebSocket using Gemini Live
- →Prompt-injection detection (0.7 threshold), 60s session tokens, IP rate-limiting (3/IP)