An AI-powered pizza ordering agent with a modern React frontend and a FastAPI backend, using Google Gemini (AI Studio) for natural dialog.
- Step-by-step, conversational pizza ordering agent
- Menu, toppings, sides, and dietary preferences
- Order summary and transcript download
- Modern React frontend, FastAPI backend
- Uses Google Gemini (AI Studio) LLM via API
- Python 3.8+
- Node.js 16+
- Google Gemini API key (from Google AI Studio)
- (macOS, Windows, or Linux)
git clone https://github.com/aishvayy/PizzaDeliveryAgent.gitcd backend
python3 -m pip install -r requirements.txt- Create a
.envfile in thebackend/directory with this line:GEMINI_API_KEY=your_actual_gemini_api_key_here - The backend uses
python-dotenvto load this key automatically.
uvicorn main:app --reloadcd ../frontend
npm install
npm run dev- Open http://localhost:5173 in your browser.
- Click “Show Menu” to view the pizza menu.
- Chat with the agent to place your order.
- After completing your order, download the order summary (JSON) and transcript (TXT).
backend/ # FastAPI backend, menu, Gemini LLM integration
frontend/ # React frontend (Vite)
- CORS errors: Make sure the backend is running and CORS is enabled (already set up in
main.py). - Gemini errors: Ensure your API key is valid and you have access to the Gemini models.
- Port conflicts: Default backend is on
8000, frontend on5173.
# Python
__pycache__/
*.pyc
# Node
node_modules/
dist/
# Mac
.DS_Store
# Env
.env
- Google Gemini (AI Studio) for LLM
- FastAPI
- React
Video of the working dialog:
Pizza.Agent.1.1.mp4
Transcript is available upon hitting the download button, attached transcript for the demo conversation can be found here: (https://github.com/user-attachments/files/21471049/transcript.txt)
Screenshot of the order saved in a structured JSON format, available on the backend on the /order/sessionId path: 