GoodFoods Agent
GoodFoods Reservation Assistant Powered by Agentic AI • Built with Pydantic Tools and Streamlit :)
Install / Use
npx skills add GaurPeeyush/GoodFoods-AgentInstalls into whichever agent you are using.
README
GoodFoods Reservation System
Overview
GoodFoods is a conversational AI that helps users discover restaurants and book tables across Bangalore. It uses OpenAI function-calling to search restaurants and confirm reservations via a FastAPI backend, wrapped in a modern Streamlit chat UI.
Repository Structure
app_goodfoods.py: Streamlit frontend (chat UI, live agent trace, theming)agent/conversation_engine.py: Agent core (OpenAI calls, tool handling)agent/toolkit.py: Tool definitions (OpenAI function schemas)agent/prompt_library.py: System prompts and few-shot examplesdata/service_api.py: FastAPI backend (search and reservation endpoints)data/restaurant_list.json: Restaurant catalogdata/bookings_list.json: Stored reservationsstart.py: One-command launcher (starts API then UI)
Sample Converstions
Insufficient information
<img width="1704" height="836" alt="Screenshot 2025-11-02 at 10 04 10 PM" src="https://github.com/user-attachments/assets/5a55ff7e-0088-402e-bda9-5c021c653e5b" />Cuisine based
<img width="1704" height="1006" alt="Screenshot 2025-11-02 at 10 02 04 PM" src="https://github.com/user-attachments/assets/75891c43-a24a-44f4-82a2-f1b17ffc6cf1" />Incorrect information
<img width="1386" height="918" alt="Screenshot 2025-11-02 at 10 17 41 PM" src="https://github.com/user-attachments/assets/a7d52be9-9a6a-44fd-99cb-fb87de25e2d0" />Guardrail (Max party size check)
<img width="1389" height="918" alt="Screenshot 2025-11-02 at 10 05 28 PM" src="https://github.com/user-attachments/assets/790df4b6-122a-48dc-803c-d99efc330834" />Setup Instructions
- Python 3.9+ recommended
- Install dependencies:
pip install -r requirements.txt
- Configure environment:
- Create
.envwithOPENAI_API_KEY=YOUR_KEY
- Create
- Optional data edits:
- Update
data/restaurant_list.jsonfor your venues
- Update
- Run the stack:
python start.py
How It Works (High-Level)
- UI collects user input and maintains
st.session_state.messages. - First model call (tools enabled) plans and may return tool calls.
- Tools are executed via FastAPI and results appended to the chat.
- Second model call (tools disabled) generates the final assistant reply.
- The “Agent thinking & tool activity (live)” panel shows plan, tool args, results, and finalization.
Tools (Function-Calling)
lookup_dining_options:- Inputs: any of name, location, cuisine, operating_hours, operating_days, capacities
- Output: ranked restaurant matches (or curated top list if empty query)
confirm_table_booking:- Inputs: restaurant_id, orderer_name, orderer_contact, party_size, reservation_date, reservation_time
- Output: reservation confirmation with
order_id(or capacity/validation error)
Documentation of Prompt Engineering Approach
- Purpose framing + brand context (GoodFoods in Bangalore)
- Clear “Typical Task” flow: discover → decide → collect details → confirm
- Tool descriptions with when-to-use, required fields, and guardrails
- Few-shot examples to steer behavior (handling missing info, capacity issues)
- Inline constraints (don’t hallucinate, avoid placeholders, friendly tone)
Business Strategy Summary
- Problem: Manual reservation workflows are slow and costly.
- Solution: AI agent that handles discovery and booking end-to-end, 24/7.
- Value:
- Increase conversion (guided flows + quick suggestions)
- Reduce staffing costs (self-serve bookings)
- Improve CX (consistent answers, instant confirmations)
- KPIs: conversion rate, bookings completed, average time-to-book, deflection from human agents.
Assumptions
- Users intend to discover/book GoodFoods restaurants in Bangalore.
- Prototype uses JSON files as data stores (no external DB).
- Single-tenant brand and city context (GoodFoods Bangalore).
Limitations
- No sequential/parallel multi-tool planning within a single model turn (tools are executed sequentially between turns).
- No dedicated date/time validation tool; relies on prompt guidance and backend checks.
- No cancellation or modification of existing reservations.
- Basic phone validation; no OTP verification.
Future Enhancements
- Parallel/Sequential tool strategies inside the agent loop for faster decisions.
- Separate DB schema and endpoints for menus, enabling food/menu Q&A and upsell flows.
- Proper date/time interpretation service (holidays, closures, slotting).
- Reservation lifecycle: edit/cancel, notifications, reminders, no-show handling.
- Authentication for staff dashboards and rate limiting/spam controls.
Current Technical Implementation
- LLM: OpenAI GPT-4o via
openaiSDK - Tool Calling: OpenAI function-calling → FastAPI endpoints
- Guardrails: function-text leakage detection and placeholder checks
- Frontend: Streamlit chat UI with live trace (
app_goodfoods.py) - Data: JSON-based catalog and booking store (prototype)
- Launcher:
start.pybootsdata/service_api.pythenapp_goodfoods.py
API Endpoints
POST /restaurants/search→search_restaurant_informationPOST /reservations→make_new_order
Example Conversations
See agent/prompt_library.py few-shot examples for guided flows (missing info, capacity, validation).
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.6kCommit, push, and open a PR
