This project is an AI-powered food ordering assistant that processes restaurant menu images and user preferences to suggest suitable dishes. It leverages OCR, LLMs, and a modular agent-based workflow.
food_order_fast.mp4
https://www.youtube.com/watch?v=i-naPJrn21Y
- Extracts dish names and prices from menu images using OCR.
- Understands user dietary preferences and restrictions.
- Enriches dish information (ingredients, calories, tags).
- Suggests dishes based on menu and user preferences.
- Modular agent/sub-agent architecture for extensibility.
- Custom session management for user conversations.
- Callback hooks for agent and tool execution logging.
food_order/
├── main.py
├── food_order/
│ ├── agent.py
│ ├── runner.py
│ ├── core/
│ ├── prompt.py
│ ├── services/
│ ├── sub_agents/
│ └── tools/
└── data/
└── rest_2_menu.png
-
Clone the repository
git clone <repo-url> cd food_order -
Install dependencies
Ensure you have Python 3.8+ and install required packages:pip install -r requirements.txt -
Configure environment
- Create a
.envfile inside the food_order folder same as.env.exampleand put your key openAI key there - Place your menu image in
data/rest_2_menu.pngor update the path inmain.py. - Set up any required API keys for Google ADK, LiteLLM, or OCR tools as needed.
- Create a
Run Using adk-web:
adk web
or
Run the main script:
python main.py
You can modify the user preference text in main.py to test different scenarios.
- The system uses a custom session service (
CustomSessionService) for managing user sessions. - Agent and tool callbacks are used for logging and can be customized in
food_order/tools/callbacks/. - The menu image and user preferences are both required for the workflow.
-
Agents and Tools:
Add or modify agents infood_order/sub_agents/and tools infood_order/tools/to extend functionality. -
Prompts:
Update prompt templates infood_order/prompt.pyfor different extraction or enrichment logic. -
Callbacks:
Customize agent and tool callbacks for logging or side effects infood_order/tools/callbacks/.
MIT License