note: this code is licensed under NPOSL-3.0 (non-profit, no commercial use)
Donna screens your calls, rejecting the spam and preserving your sanity by sending callers your scheduling / Calendly link when you're busy. Using the latest Realtime API from OpenAI in conjunction with function calling to Google Calendar and Twilio, Donna knows when you're busy in real time and can handle multiple callers at once in 85 different languages!
Virtual.Assistant.Agency.mp4
Monorepo Stack:
- FastAPI backend written in Python
- processes phone calls and audio streaming between both Twilio and OpenAI usings websockets
- powers both inbound and outbound calls to and from Donna
- reads from Google Calendar
- sends scheduling text messages
- reports live call status
- Next.js frontend written in Typescript
/statuspage that visualizes calls in real-time- integration with EdgeDB to handle user preferences and (in the future) semantic searching over previous conversations
.env file:
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_PHONE_NUMBER= ←dedicated Twilio number
HARVEY_PHONE_NUMBER= ←your cell phone
STREAM_URL= ←backend websockets URL
OPENAI_API_KEY=
CALENDLY_URL= ←meeting scheduling link of your choiceYou'll need a dedicated Twilio phone number and to either deploy the server or run it locally through a tunnel (ie via ngrok) to expose the API to Twilio.
We used Poetry to handle Python dependencies on the backend and pnpm for the frontend.
- clone the repo
cd frontendpnpm install && pnpm devto start the frontend- navigate to
localhost:3000/statusto view the live status page cd ../backendpoetry installpoetry shellnow, you can run our custom scripts:forformatto run Ruff formattinglorlintto run Mypy and Ruff lintingflto run bothdevto start the dev server
- call Donna!