Restaurant customer service
Guide the restaurant customer through the three key stages: starters, main course, and dessert. The agent accesses the menu from Google Drive and is able to adapt to the user's requests.
graph TD
%%{init: {'theme': 'mc','layout': 'elk'}}%%
GoogleGenerativeAIModel-jufh8[Gemini]
style GoogleGenerativeAIModel-jufh8 stroke:#a170ff
GDriveFilesComponent-g8fwu[<div><img alt="logo" src="/_astro/google_drive.wKmDsV2c.svg" style="height: 20px !important;width: 20px !important"/></div>Google Drive File Manager]
style GDriveFilesComponent-g8fwu stroke:#a170ff
ChatInput-p6m3d[<div><img alt="logo" src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Input]
style ChatInput-p6m3d stroke:#a170ff
ChatOutput-yxmzc[<div><img alt="logo" src="/_astro/messages-square.BaSDmT6g.svg" style="height: 20px !important;width: 20px !important"/></div>Chat Output]
style ChatOutput-yxmzc stroke:#a170ff
TelegramMessage-17wff[Telegram Message]
style TelegramMessage-17wff stroke:#a170ff
AdvancedAgent-38qxe[Agent2]
style AdvancedAgent-38qxe stroke:#a170ff
ChatInput-p6m3d -.- AdvancedAgent-38qxe
linkStyle 0 stroke:#a170ff
AdvancedAgent-38qxe -.- ChatOutput-yxmzc
linkStyle 1 stroke:#a170ff
GoogleGenerativeAIModel-jufh8 -.- AdvancedAgent-38qxe
linkStyle 2 stroke:#a170ff
GDriveFilesComponent-g8fwu -.- AdvancedAgent-38qxe
linkStyle 3 stroke:#a170ff
TelegramMessage-17wff -.- AdvancedAgent-38qxe
linkStyle 4 stroke:#a170ff
🧩 Overview
The workflow provides an AI‑powered virtual waiter that guides customers through a three‑stage dining experience (starter, main course, dessert).
It retrieves the current menu from Google Drive, uses a Gemini language model to interpret customer requests, confirms orders step‑by‑step, and notifies kitchen staff via Telegram.
⚙️ Main Features
- Context‑aware conversation – the agent remembers previous items and confirms each order before moving to the next stage.
- Dynamic menu retrieval – the latest menu is fetched from a Google Drive file on every interaction.
- Multi‑step order confirmation – each dish is confirmed with a summary before proceeding.
- Automated notifications – once an order is confirmed, a Telegram message is sent to the kitchen.
- Tool‑enabled agent – the agent can call external services (Drive, Telegram) while staying within the same chat flow.
🔄 Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Chat Input | Receives the customer’s message in the playground chat. | User text (e.g., “recupera el menu desde google drive”) | Message object |
| Gemini Model | Provides a Gemini language model that the agent uses for reasoning. | Model selection (Gemini 2.5 Flash) | Language model instance |
| Advanced Agent | Processes the conversation, calls tools, and generates the reply. | User prompt, Gemini model, Tool list | Response message |
| Google Drive File Manager | Retrieves the menu file from Google Drive. | File selection (by ID or name) | File content (menu text) |
| Telegram Message | Sends a notification to the kitchen when an order is confirmed. | Text of notification, chat ID | Telegram response (status) |
| Chat Output | Displays the agent’s reply back to the playground user. | Response message | Message object shown to user |
🧠 Notes
- The workflow requires valid Google API credentials and a Telegram bot token.
- The menu file must be stored in Google Drive and correctly referenced in the Drive tool configuration.
- The Gemini model is configured with a maximum of 4096 output tokens; exceeding this will truncate the reply.
- The agent’s memory can be toggled; enabling it allows stateful conversations across multiple turns.
- Telegram notifications are sent only after the agent confirms the order; if the order is modified, the notification is updated accordingly.
- The system prompt hard‑codes the restaurant rules, ensuring consistent behavior across interactions.