Your personal 24/7 online medical assistant.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
This project aims to develop an Agentic AI voice assistant for medical offices that automates routine patient requests both on the phone and online. Using real-time voice transcription and intelligent decision-making, the system can autonomously handle common tasks like scheduling appointments, refilling prescriptions, finding available doctors, or redirecting calls—helping reduce the administrative burden on healthcare professionals. Designed during the last week of the STEM Immersion phase of the Massachusetts Institute of Technology (MIT) Introduction to Technology, Engineering, and Science (MITES) for the Quest for Autonomy class.
To get a local copy up and running follow these simple steps.
We recommend you create a Conda Environment but it's not required.
conda create --name PulseLine python=3.12
conda activate PulseLineYou will need ngrok for this project if you'd like others to access it. Download and create a account before following the instructions to create a auth token before continuing.
You will also need PostgreSQL for this project. Download it, create a database, make a table with the following headers:
- Patient ID
- First Name
- Last Name
- Date of Birth
- Gender
- Phone Number
- Address
- Insurance Provider
- Last Visit Date
- Primary Diagnosis
- Allergies
- Prescription
- Emergency Contact Name
- Emergency Contact Number
- Next Visit Date
- Doctor
Make sure to fill in all the columns. We recommend using a spreadsheet software that exports into a common file type for this.
You will also need Twilio for this project if you'd like others to call in. Follow the instructions to create an account before going to the console and under the left side bar, under manage, click active numbers and register a number.
This is an example of how to list things you need to use the software and how to install them. This project was created using python 3.12.0 64x bit.
pip install -r requirements.txt- Get a free API Key at GroqCloud
- Clone the repo
git clone https://github.com/PulseLine-Agent/PulseLine.git
- Create a .env file in the main folder
- Enter your API key in
.envGROQ_API_KEY = ENTER_YOUR_API_KEY OPENAI_API_KEY = ENTER_YOUR_API_KEY USER = ENTER_POSTGRESQL_USER PASSWORD = ENTER_POSTGRESQL_PASSWORD DATABASE = ENTER_POSTGRESQL_DATABASE_NAME HOST = ENTER_POSTGRESQL_HOST
- Change git remote url to avoid accidental pushes to base project
git remote set-url origin PulseLine-Agent/PulseLine git remote -v
To run the project, follow the following steps.
- Run server.py.
python server.py- Open a separate terminal and make your localhost public.
ngrok http 8000- With the address ngrok gives you, go to Twilio's console's active numbers and under your number, you should see a text box on the same row as "A call comes in" named URL. There, put your forwarding address (i.e., https://0bb469d47dfd.ngrok-free.app).
Congratulations, you now have a running project! To access the model, either call into the active number or use the forwarding address!
To see evaluations, please head to 'eval.py' to see how your agent fares.
- On-call Personal Assistant
- Online Personal Assistant
- Frontend Online
- Call-in Online
- Mock Database
- Medical Professional Transfer
- Multi-language Support
- Chinese
- Spanish
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
We'll do our best to return feedback and incorporate your changes into our project!
Distributed under the MIT License. See LICENSE.md for more information.
Jesse Wang - LinkedIn - jessewang2158@gmail.com - +1(860)-266-9870
Mohammad Islam - LinkedIn - mohammadzislam08@gmail.com - +1(818)-232-6936
Our thanks to python-dotenv, Twilio's great guide on building a voice assistant, Best-README-Template, GroqStreamChain, as well as OpenAI's Realtime API for helping us make this project possible. This project would not have been possible without these authors' great libraries.
Additionally, thanks to Freepik for providing the website's background image.
If you'd like to read our report on the application, the link can be found here