A conversational voice agent that collects insurance information from patients, performs STEDI eligibility checks, and communicates patient copay information for office visits.
This application uses LiveKit Workflows to create a voice agent that:
- Collects patient information (first name, last name, insurance member ID)
- Sends this information to the STEDI eligibility API
- Analyzes the insurance response to determine:
- If the insurance is active
- If STC 98 (office visits) is covered
- If the provider is in-network
- What the copay amount is
- Communicates the results to the patient in a natural, conversational manner
- Python 3.10+
- LiveKit account
- STEDI API key
- ElevenLabs API key
- Deepgram API key
- OpenAI API key
- Clone this repository
- Install the required dependencies:
pip install -r requirements.txt
- Create a
.env
file in the project root with the following variables:
LIVEKIT_API_KEY=your_livekit_api_key
LIVEKIT_API_SECRET=your_livekit_api_secret
OPENAI_API_KEY=your_openai_api_key
ELEVENLABS_API_KEY=your_elevenlabs_api_key
DEEPGRAM_API_KEY=your_deepgram_api_key
STEDI_API_KEY=your_stedi_api_key
To run the Insurance LiveKit Agent:
python main.py
This will start the LiveKit agent which will:
- Initialize the necessary plugins (OpenAI, ElevenLabs, Deepgram)
- Set up the conversation workflow
- Begin the patient interaction process
main.py
: Entry point for the applicationmodels.py
: Data models for insurance session informationstedi_api.py
: Integration with STEDI eligibility APIutils.py
: Utility functionsagents/
: Directory containing agent implementationscollect_info_agent.py
: Agent that collects patient informationeligibility_agent.py
: Agent that processes eligibility results