This project demonstrates how to build an AI-powered customer service agent using Azure Communication Services, Azure OpenAI with realtime capabilities, Semantic Kernel, and Azure AI Search for product information retrieval. See rag-flow.mmd for call flow with services involved.
- Automated phone call answering with natural conversation
- AI-powered agent using Azure OpenAI's realtime capabilities
- Intelligent product search using Azure AI Search
- Secure secrets management with Azure Key Vault
- WebSocket-based audio streaming
Before deploying this application, make sure you have:
- An Azure subscription with access to:
- Azure Communication Services
- Azure OpenAI Service
- Azure AI Search
- Azure Key Vault
- Azure App Service
- A properly configured search index with product data
- A phone number in Azure Communication Services
Never upload your .env
file to GitHub or any public repository! This file contains sensitive credentials and API keys.
Instead:
- Create a
.env
file locally based on the template in the deployment guide - Fill in your own values for each environment variable
- Keep this file secure and only on your local development machine
call_automation.py
- Main application with realtime audio capabilitiessearch_plugin.py
- Semantic Kernel plugin for Azure AI Searchrequirements.txt
- Python dependenciesstartup.txt
- App startup command for Azure App Serviceweb.config
- IIS configuration for WebSocket supportdeploy.sh
- Deployment script for creating Azure resources.gitignore
- Prevents sensitive files from being uploadeddeployment-guide.md
- Detailed deployment instructionsproducts.json.example
- JSON array of sample outdoor consumer productsrag-flow.mmd
- Mermaid visualization of call and app flow
Follow the step-by-step instructions in the deployment guide to set up and deploy the application. Note - you will see errors after the app deploys; this is a quick WIP project. Feel free to clone and fix!
To run the application locally (have not tested this):
- Create a
.env
file with your Azure credentials (see deployment guide) - Install dependencies:
pip install -r requirements.txt
- Run with:
hypercorn call_automation:app --bind 0.0.0.0:8080
This project is licensed under the MIT License - see the LICENSE file for details.
This project is based on code from the Microsoft Semantic Kernel repository, specifically the call automation demo in the Python samples. The original code is copyright Microsoft Corporation and is used under the MIT License.
Code files borrowed from the original repository maintain their original copyright notices and MIT license.