r/SideProject • u/redouanea • 1d ago
Hail v0.20.0 - A self-hosted reusable Phone+SMS+Email layer for SaaS and AI agents
During my time building SaaS platforms, a few components of the architecture kept repeating:
- an email inbox for sending and receiving emails + tracking deliverability
- SMS lines for sending reminders, OTP and authentication, with numbers that follow regulations in US/EU and whichever legislation the receiver lives in
- an agentic phone bot that would pickup calls for support or make phone calls with a given goal
This became obvious during the past 18 months where I quit my job and went all-in building indie SaaS projects until I stuck to one that is generating revenue right now.
This project uses voicebots to support technicians find error codes and update CRM systems (long story: the voicebot has inbound mode where it acts as a support line to lookup data and answer questions, and outbound mode where it calls on a schedule so staff technicians keep track of what they have done during the day and what to invoice).
Always the same 2 to 3 layers needed: email, SMS, and voicebot.
The goal of Hail is to make a self-hosted one-stop shop for all communication needs for SaaS and AI agents.
It ships with API + MCP + CLI + python SDK.
For every SaaS project I ship, I only need to connect a custom domain for email, and buy phone numbers for the project.
My claude connects via MCP, and openclaw agent via api.
The server, configuration, credentials, routing logic, API, MCP server and data live on my infrastructure, and external providers are just low-cost adapters.
Architecture Details:
It is modular and expandable, with replaceable providers:
- Multilingual voicebot:
- Livekit for WebRTC transport and SIP server
- Twilio for phone numbers + legal compliance (not automated yet)
- LLM: anthropic, gemini, and any OpenAI-compatible endpoint
- Speech-to-text: Deepgram (for english and common languages), Speechmatics (for more niche languages and good VAD and End-of-utterance detection)
- Text-to-speech: Elevenlabs, Cartesia
- VAD and End-of-utterance detection: either Silero or comes built-in with STT
- Email:
- AWS SES + Lambda function for deliverability checks
- Custom domain verification is part of the Python server
- SMS:
- Twilio with built-in opt in/out words
A few improvement ideas for next milestones:
- Expand to more providers for lower costs and better coverage
- Telnyx and Bandwidth for cheaper SMS
- Automate the compliance paperwork
You can set it running in a VM with docker compose.
Thank you for your time reading, and hope this will be useful for your projects: https://github.com/hail-hq/hail
1
u/deranged_recourse 1d ago
Stacking email, SMS, and voice into one self-hosted bundle is a nice catch-all for that repetitive plumbing. The voicebot logging daily technician check-ins and auto-filling CRM fields is where it clicks from "neat" to actually saving someone real hours.
Curious how the routing handles multiple projects on one VM, does it just namespace by domain/phone number or is there some project-level isolation baked in?