Welcome to Outback Bar! Powered by SignalWire's AI Agent framework, Max, your virtual bartender at Outback Bar, takes drink orders, manages tabs, and provides personalized service through natural voice conversations.
- Natural Voice Interaction: Talk to Max like a real bartender
- Full Drink Menu: Cocktails, beer, wine, and non-alcoholic options
- Tab Management: Real-time tracking of orders and running total
- Happy Hour: Automatic 20% discount on cocktails (4-7 PM)
- Drink Customization: Order doubles, specify ice preferences, etc.
- Responsible Service: Built-in monitoring and service limits
- Real-time Updates: Live UI updates as orders are placed
- Cocktails ($10-13): Margarita, Old Fashioned, Mojito, Martini, and more
- Beer ($6-8): IPA, Lager, Stout, Wheat Beer, Pale Ale
- Wine ($9-11): House Red/White, Prosecco, Pinot Noir, Sauvignon Blanc
- Non-Alcoholic ($0-6): Mocktails, sodas, juices, water
- Python 3.8+
- SignalWire account with AI Agent access
- Node.js (for frontend development)
- Clone the repository:
cd bartender
- Install Python dependencies:
pip install -r requirements.txt
- Configure environment:
cp .env.example .env
# Edit .env with your SignalWire credentials
- Update the SignalWire token:
Edit
web/app.js
and replace the token:
const STATIC_TOKEN = 'your_signalwire_token_here';
python bartender_agent.py
The server will start on port 3030 by default.
Open your browser to: http://localhost:3030
# SignalWire Configuration
SIGNALWIRE_PROJECT_ID=your_project_id
SIGNALWIRE_TOKEN=your_token
SIGNALWIRE_SPACE=your_space.signalwire.com
# Server Configuration
HOST=0.0.0.0
PORT=3030
# Bar Settings
HAPPY_HOUR_START=16 # 4 PM
HAPPY_HOUR_END=19 # 7 PM
HAPPY_HOUR_DISCOUNT=0.20 # 20% off
# Service Limits
MAX_DRINKS_PER_HOUR=2
MAX_TOTAL_DRINKS=5
Ordering Drinks:
- "I'll have a margarita"
- "Can I get a double old fashioned?"
- "What beers do you have on tap?"
- "I'd like something fruity and refreshing"
Tab Management:
- "What's my tab?"
- "Can you review my order?"
- "I'm ready to close out"
- "Add a 20% tip"
Happy Hour:
- "Is it happy hour?"
- "What's on special?"
- Built on SignalWire's AgentBase class
- Implements SWAIG functions for drink operations
- Uses TF-IDF for fuzzy drink matching (optional)
- Manages conversation flow through state contexts
- Sends real-time events to frontend
- Single-page application with real-time updates
- WebRTC connection for voice communication
- Responsive design for mobile and desktop
- Visual feedback for all operations
- Bar-themed UI with elegant styling
add_drink
: Add drinks to customer's tabremove_drink
: Remove items from tabreview_tab
: Display current tab statuscheck_happy_hour
: Check happy hour statusclose_tab
: Process payment and close tab
- greeting: Welcome and initial order
- taking_order: Main ordering phase
- closing_tab: Payment processing
- tab_closed: Post-payment state
Events sent from backend to frontend for UI updates:
drink_added
: New drink added to tabdrink_removed
: Item removed from tabtab_review
: Full tab synctab_closed
: Payment completedhappy_hour_status
: Happy hour status update
Edit the DRINKS
dictionary in bartender_agent.py
:
"C011": {
"name": "Espresso Martini",
"price": 14.00,
"description": "Vodka, coffee liqueur, espresso",
"abv": 20,
"category": "cocktail"
}
Adjust times and discount in .env
:
HAPPY_HOUR_START=15 # 3 PM
HAPPY_HOUR_END=20 # 8 PM
HAPPY_HOUR_DISCOUNT=0.25 # 25% off
Edit the personality section in bartender_agent.py
:
self.prompt_add_section(
"Personality",
"Your custom personality description here..."
)
The agent uses audio files for ambient feedback:
/pouring.mp3
- When adding drinks/clearing.mp3
- When removing items/calculating.mp3
- When reviewing tab/payment.mp3
- When processing payment
Place these files in your SignalWire assets directory.
Built-in safety features include:
- Maximum 5 drinks per customer session
- Maximum 2 drinks per hour monitoring
- Automatic water suggestions after 3 alcoholic drinks
- Service refusal when limits are reached
- Verify SignalWire credentials in
.env
- Check token in
web/app.js
is valid - Ensure port 3030 is not in use
- Check firewall settings
- Allow microphone permissions in browser
- Check SignalWire project has voice enabled
- Verify WebRTC connection established
- Check browser console for errors
- Verify user events are being sent (check server logs)
- Ensure WebSocket connection is active
GET /
- Main web UIGET /api/menu
- Returns drink menu JSONGET /api/happy-hour
- Current happy hour statusGET /api/info
- System informationPOST /swml
- SignalWire webhook endpointPOST /swml/swaig
- SWAIG function endpointGET /health
- Health check endpoint
Contributions are welcome! Areas for improvement:
- Additional drink recipes
- Payment integration (Stripe/Square)
- Loyalty program features
- Drink recommendation engine
- Multi-language support
This project is based on the Holy Guacamole architecture and is provided for educational and demonstration purposes.
- Built with SignalWire AI Agents
- Inspired by the Holy Guacamole implementation
- Uses SignalWire's WebRTC for real-time communication
Need Help? Check the SignalWire Documentation or open an issue.