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
/status
page 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 choice
You'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 frontend
pnpm install && pnpm dev
to start the frontend- navigate to
localhost:3000/status
to view the live status page cd ../backend
poetry install
poetry shell
now, you can run our custom scripts:f
orformat
to run Ruff formattingl
orlint
to run Mypy and Ruff lintingfl
to run bothdev
to start the dev server
- call Donna!