RoomieServe AI
Revolutionizing room service management with SignalWire's AI Agent technology
On this page, you'll find a full breakdown of the prompts used, along with all the functions. The functions are written in Perl. To quickly access all relevant files, please visit the GitHub repository.
Dial +1 (240) 376-6643
and watch your room service request show up live on
roomieserve.signalwire.me.
GitHub Repository
View the project and clone it to your development environment from the GitHub repository.
How it works
SignalWire's newest AI demo showcases a room service management tool, RoomieServe AI, developed using SignalWire's AI Agent. RoomieServe is designed for use in hotels and hospitals to improve the efficiency and accuracy of room service orders, showcasing another of the many diverse applications of this powerful AI innovation.
This AI solution is built on SignalWire's cutting-edge AI Agent technology. By putting an AI Agent to work handling room service orders in spoken language, RoomieServe shows how the SignalWire AI Gateway and AI Agent can improve efficiency and reliability in previously manual and resource-intensive operations.
Dynamic Database Integration
RoomieServe AI is designed to automatically update the interaction prompt according to the menu inventory database. This dynamic integration allows RoomieServe to act as a fully autonomous Room Service Manager, offering customers the most current menu items based on their SKU (Stock Keeping Unit).
This feature keeps RoomieServe 100% up to date with inventory, facilitating a seamless ordering experience for guests and patients without manual intervention.
As configured, RoomieServe streamlines the ordering process by providing specific item pricing upon request. This demonstrates the power and flexibility of AI Agents in balancing convenience with user-friendliness.
Understanding Roomie's Capabilities
RoomieServe structures data efficiently using metadata tables in the AI Agent to avoid SQL latnecy. Every piece of information used by the app is systematically stored within these tables, from menu specifics to SKUs and pricing.
Shopping cart functionality is also integrated in the metadata framework, serving as a temporary data repository while the AI Agent is active. This innovative approach drastically reduces the need for direct database interactions, significantly enhancing response times and the smoothness of interactions with the AI.
By capitalizing on SignalWire's AI Agent technology, RoomieServe AI not only demonstrates the immense potential of metadata in AI-driven applications but also elevates the standard of room service. This blend of SignalWire's technology with advanced metadata management exemplifies a forward-thinking strategy in enhancing guest and patient service, making RoomieServe AI a pioneering solution in the realm of AI-assisted room service ordering.
Try it out
1. Setup a company table
Get started by creating a table named roomie_company
with fields for company ID, creation timestamp, name, contact number, and email.
We then insert a record for a company named 'Chateau AI-luxe' with its contact details.
The id
field auto-increments, and created
automatically records the current timestamp.
CREATE TABLE IF NOT EXISTS roomie_company (
id SERIAL PRIMARY KEY,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
name VARCHAR(255) NOT NULL,
number VARCHAR(255),
email VARCHAR(255)
);
INSERT INTO roomie_company (name, number, email) VALUES ('Chateau AI-luxe', '+100000000', 'roomserve@example.com');
2. Create a menu
The following SQL code snippet first checks if a custom enum type meal_type
exists and creates it if not,
including values for different meal categories.
It then creates a roomie_menu
table with details including
ID,
timestamp,
company ID,
SKU,
price,
description,
and category,
linking to roomie_company
via a foreign key.
Lastly, our SQL inserts multiple records into roomie_menu, detailing various menu items including their company association, names, descriptions, SKUs, prices, and categories.
DO $$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM pg_type WHERE typname = 'item_type'
) THEN
CREATE TYPE item_type AS ENUM ('Breakfast', 'Lunch', 'Dinner', 'Beverage');
END IF;
END$$;
CREATE TABLE IF NOT EXISTS roomie_menu (
id SERIAL PRIMARY KEY,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
roomie_company_id INTEGER NOT NULL,
sku VARCHAR(255) NOT NULL UNIQUE,
price NUMERIC DEFAULT 0.00,
name VARCHAR(255) NOT NULL,
description TEXT,
category item_type,
FOREIGN KEY (roomie_company_id) REFERENCES roomie_company(id) ON DELETE CASCADE
);
INSERT INTO roomie_menu (roomie_company_id, name, description, sku, price, category) VALUES
(1, 'French Toast', 'Classic French Toast served with maple syrup and fresh berries.', 'CFT001', 15, 'Breakfast'),
(1, 'Avocado Toast', 'Multigrain bread topped with smashed avocado, poached egg, and a sprinkle of chili flakes.', 'AVT002', 12, 'Breakfast'),
(1, 'Eggs Benedict', 'Poached eggs on an English muffin with ham and hollandaise sauce.', 'EGB003', 16, 'Breakfast'),
(1, 'Caesar Salad', 'Crisp romaine lettuce, Parmesan cheese, croutons, and a creamy Caesar dressing.', 'CSR004', 10, 'Lunch'),
(1, 'Grilled Chicken Caesar', 'Caesar Salad topped with grilled chicken.', 'CSG005', 14, 'Lunch'),
(1, 'Shrimp Caesar Salad', 'Caesar Salad topped with shrimp.', 'CSS006', 16, 'Lunch'),
(1, 'Quinoa Bowl', 'Quinoa & Roasted Vegetable Bowl mixed with a light lemon vinaigrette.', 'QRB007', 13, 'Lunch'),
(1, 'Club Sandwich', 'Classic triple-layered sandwich with turkey, bacon, lettuce, tomato, and mayonnaise, served with fries.', 'CLB008', 14, 'Lunch'),
(1, 'Grilled Salmon', 'Grilled Salmon with a dill sauce, served alongside asparagus and quinoa.', 'GSM009', 25, 'Dinner'),
(1, 'Ribeye Steak', '8 oz. steak served with mashed potatoes and seasonal vegetables.', 'RBS010', 30, 'Dinner'),
(1, 'Pasta Primavera', 'Sautéed seasonal vegetables tossed with pasta in a light garlic and olive oil sauce.', 'PSP011', 18, 'Dinner'),
(1, 'Coffee', 'Freshly brewed, available in decaf or regular.', 'COF012', 4, 'Beverage'),
(1, 'Herbal Tea', 'A soothing selection of herbal teas.', 'TEH013', 3, 'Beverage'),
(1, 'Green Tea', 'Refreshing and aromatic green tea.', 'TEG014', 3, 'Beverage'),
(1, 'Black Tea', 'Robust and full-bodied black tea.', 'TEB015', 3, 'Beverage'),
(1, 'Coke', 'A classic favorite cola.', 'COK016', 2, 'Beverage'),
(1, 'Pepsi', 'A sweeter alternative cola.', 'PEP017', 2, 'Beverage'),
(1, 'Dr. Pepper', 'A unique blend of 23 flavors for an unmistakable taste.', 'DRP018', 2, 'Beverage'),
(1, 'Ribeye Steak Rare', 'Ribeye Steak cooked to a rare temperature.', 'RBR019', 30, 'Dinner'),
(1, 'Ribeye Steak Medium Rare', 'Ribeye Steak cooked to a medium rare temperature.', 'RBM020', 30, 'Dinner'),
(1, 'Ribeye Steak Medium', 'Ribeye Steak cooked to a medium temperature.', 'RBM021', 30, 'Dinner'),
(1, 'Ribeye Steak Medium Well', 'Ribeye Steak cooked to a medium well temperature.', 'RBW022', 30, 'Dinner'),
(1, 'Ribeye Steak Well Done', 'Ribeye Steak cooked to a well done temperature.', 'RBW023', 30, 'Dinner');
3. Setup an orders table
The below SQL first creates a custom enum type order_status
if it doesn't already exist, with values to represent different stages of an order. Then, it creates a roomie_orders
table to store order details.
DO $$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM pg_type WHERE typname = 'order_status'
) THEN
CREATE TYPE order_status AS ENUM ('Pending', 'Processing', 'Sent', 'Delivered', 'Cancelled');
END IF;
END$$;
CREATE TABLE IF NOT EXISTS roomie_orders (
id SERIAL PRIMARY KEY,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
roomie_company_id INTEGER NOT NULL,
notes VARCHAR(255),
phone VARCHAR(255) NOT NULL,
status order_status NOT NULL,
FOREIGN KEY (roomie_company_id) REFERENCES roomie_company(id) ON DELETE CASCADE
);
CREATE TABLE IF NOT EXISTS roomie_orders_items (
id SERIAL PRIMARY KEY,
order_id INTEGER NOT NULL,
sku VARCHAR(255) NOT NULL,
qty INTEGER NOT NULL,
price NUMERIC NOT NULL,
FOREIGN KEY (order_id) REFERENCES roomie_orders(id) ON DELETE CASCADE
);
4. Setup summary and post_prompt table.
CREATE TABLE IF NOT EXISTS ai_summary (
id SERIAL PRIMARY KEY,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
convo_id TEXT,
summary TEXT
);
CREATE TABLE IF NOT EXISTS ai_post_prompt (
id SERIAL PRIMARY KEY,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
data JSONB
);
Function reference
Function | Arguments | Description |
---|---|---|
add_items | skus[] | Adds items to the order based on SKUs. |
delete_items | skus[] | Removes items from the order based on SKUs. |
order_total | null | Provides a summary and total price of the order, utilizing metadata details for calculation. |
place_order | notes , phone | Commits the order into the roomie_orders table, transferring details from the metadata. |
This table succinctly outlines the necessary functions for the SWAIG (SignalWire AI Agent), detailing the arguments required for each function and their respective purposes within the room service ordering process.