An AI-powered dinner recommendation and cooking assistant that helps you decide what to cook and provides expert cooking tips and guidance.
The Dinner Decision Agent is an interactive Python application that uses Claude AI to:
- Suggest random dinner recipes from a curated database
- Provide detailed cooking tips and techniques
- Answer questions about recipes in real-time
- Save your favorite recipes for easy reference
- Have interactive conversations about cooking
Start the application and get a random recipe suggestion from the database, complete with:
- Ingredients list
- Step-by-step instructions
- Cuisine type
- Difficulty level
- Prep and cook times
- Serving size
Claude provides personalized cooking advice including:
- Techniques for perfect execution
- Pro tips and tricks
- Ingredient substitutions
- Timing hacks
- Flavor enhancement suggestions
Ask the AI chef any questions about the recipe:
- Ingredient adjustments
- Cooking method variations
- Dietary accommodations
- Pairing suggestions
- Troubleshooting tips
- Save recipes you love for later
- View all your favorite recipes anytime
- Prevent duplicate saves
- Persistent storage in
favorites.json
- Python 3.7+
- Anthropic API key
- macOS, Linux, or Windows
cd /path/to/Dinner\ Deciderpython3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtAdd your Anthropic API key to your shell configuration:
For macOS/Linux (zsh):
echo "export ANTHROPIC_API_KEY='your-api-key-here'" >> ~/.zshrc
source ~/.zshrcFor macOS/Linux (bash):
echo "export ANTHROPIC_API_KEY='your-api-key-here'" >> ~/.bash_profile
source ~/.bash_profileFor Windows (PowerShell):
[Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "your-api-key-here", "User")Replace your-api-key-here with your actual Anthropic API key from https://console.anthropic.com
source venv/bin/activate # Activate virtual environment
python dinner_agent.pyOnce the application starts, you'll see a recipe and cooking tips. Use these commands:
| Command | Action |
|---|---|
favorite |
Add the current recipe to your favorites |
favorites |
View all your saved favorite recipes |
new |
Get a different random recipe |
exit |
Quit the application |
| Any text | Ask the AI chef a question about the recipe |
π³ Welcome to the Dinner Decision Agent!
I've randomly selected a delicious dinner option for you:
============================================================
π½οΈ BEEF TACOS
...
π‘ Cooking Tips from Your AI Chef:
[AI provides helpful cooking tips]
Feel free to ask any questions about this recipe!
Type 'exit' to quit, 'new' for a different recipe,
'favorite' to add this recipe to your favorites, or
'favorites' to view all your favorite recipes.
You: how can I make the beef more flavorful?
Chef: [AI responds with suggestions]
You: favorite
β
Added 'Beef Tacos' to your favorites!
You: favorites
============================================================
β YOUR FAVORITE RECIPES (1)
============================================================
1. Beef Tacos (Mexican - Easy)
You: exit
π Happy cooking! Enjoy your meal!
Dinner Decider/
βββ dinner_agent.py # Main application
βββ recipes.json # Database of available recipes
βββ favorites.json # Your saved favorite recipes (auto-created)
βββ requirements.txt # Python dependencies
βββ README.md # This file
The main Python script containing:
- Recipe loading and selection logic
- Anthropic API integration
- Favorites management functions
- Interactive conversation loop
Contains a collection of recipes with:
- Recipe name and cuisine type
- Difficulty level
- Prep and cook times
- Ingredients list
- Step-by-step instructions
- Serving size
Automatically created and maintained by the application. Stores all your favorite recipes with complete details for quick access and persistence.
Python package dependencies:
anthropic>=0.7.0- Anthropic API clientlangchain>=0.1.0- LLM frameworkpython-dotenv>=1.0.0- Environment variable management
- Startup: Application loads recipes from
recipes.jsonand initializes the Anthropic client - Selection: Randomly picks a recipe and displays it
- AI Tips: Sends recipe to Claude for cooking advice and tips
- Conversation: Maintains conversation history to answer follow-up questions
- Storage: Saves favorites to
favorites.jsonfor persistence - Loop: Continues until user exits or requests a new recipe
- Ensure you've added your API key to your shell config
- Reload your shell:
source ~/.zshrc(or.bash_profile) - Verify with:
echo $ANTHROPIC_API_KEY
- Ensure your virtual environment is activated
- Run:
pip install -r requirements.txt
- Your API key may have limited model access
- Try using a different model in the code or check your API plan
- Verify write permissions in the project directory
- Check that
favorites.jsonexists and is valid JSON
This application uses:
- Provider: Anthropic
- Model: Claude 3 Opus
- Free Trial: Available at https://console.anthropic.com
Potential features to add:
- Dietary restriction filtering
- Cuisine preference selection
- Recipe difficulty filters
- Cooking time preference
- Ingredient availability checking
- User recipe contributions
- Export favorites to PDF
- Meal planning integration
This project is provided as-is for personal use.
For issues with:
- Application: Check troubleshooting section above
- Anthropic API: Visit https://console.anthropic.com/docs
- Python: Ensure Python 3.7+ is installed
Happy Cooking! π¨βπ³π©βπ³