The Receptionist AI Agent is a virtual assistant designed to collect caller information and facilitate communication via Slack, SMS, and email. It uses the SignalWire SWAIG framework for centralized API functionality. This agent enhances productivity by notifying relevant team members through integrated communication tools.
- Information Collection:
- Collect and confirm caller's name, contact number, and reason for the call.
- Slack Notifications:
- Send caller information to a designated Slack channel.
- SMS Communication:
- Send SMS messages to callers with call details or instructions.
- Email Handling:
- Send email notifications via Mailgun.
- Method: POST
- Content-Type:
application/json
- Authentication: Basic Auth (username/password from
.env
).
Description: Sends an email notification using Mailgun.
- Parameters:
{ "type": "object", "properties": { "to_email": { "type": "string", "description": "Recipient email address." }, "subject": { "type": "string", "description": "Email subject." }, "body": { "type": "string", "description": "Email body." } }, "required": ["to_email", "subject", "body"] }
Description: Sends an SMS message to a caller.
- Parameters:
{ "type": "object", "properties": { "phone_number": { "type": "string", "description": "Recipient phone number in E.164 format." }, "message": { "type": "string", "description": "SMS message body." } }, "required": ["phone_number", "message"] }
Description: Sends a message to a specified Slack channel.
- Parameters:
{ "type": "object", "properties": { "channel": { "type": "string", "description": "Slack channel ID where the message will be posted." }, "message": { "type": "string", "description": "Slack message body." } }, "required": ["channel", "message"] }
-
Clone the Repository:
git clone <repository-url> cd receptionist-ai
-
Set Up Virtual Environment:
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Create
.env
File: Add the following environment variables:HTTP_USERNAME=<basic-auth-username> HTTP_PASSWORD=<basic-auth-password> SLACK_BOT_TOKEN=<slack-bot-token> SLACK_CHANNEL_ID=<slack-channel-id> MAILGUN_API_KEY=<mailgun-api-key> MAILGUN_DOMAIN=<mailgun-domain> MAILGUN_FROM_NAME=<sender-name> MAILGUN_FROM_EMAIL=<sender-email> SIGNALWIRE_API_KEY=<signalwire-api-key> SIGNALWIRE_SPACE=<signalwire-space> SIGNALWIRE_FROM_NUMBER=<signalwire-phone-number> PROJECT_ID=<signalwire-project-id> AUTH_TOKEN=<signalwire-auth-token> PORT=5000 DEBUG=True
-
Run the Application:
python app.py
Send a POST request to /swaig
with the required parameters for the desired function.
{
"function": "send_email_notification",
"argument": {
"to_email": "[email protected]",
"subject": "Test Email",
"body": "This is a test email from the Receptionist AI Agent."
}
}
{
"function": "send_sms_notification",
"argument": {
"phone_number": "+1234567890",
"message": "Hello, this is a test message from Receptionist AI Agent."
}
}
{
"function": "notify_slack_channel",
"argument": {
"channel": "C01ABCDEFG",
"message": "New call received from +1234567890. Reason: General inquiry."
}
}
- Ensure the
.env
file is correctly configured with valid credentials. - Use the provided SWAIG functions for seamless integration with email, SMS, and Slack services.
- Call Transcription: Add support for automatic transcription of calls.
- Extended Email Functionality: Allow file attachments in email notifications.
- Analytics: Integrate with analytics services for tracking call statistics.