AI Recipe Generator Agent
Build an intelligent AI agent for recipe recommendations that creates personalized cooking suggestions based on available ingredients, dietary preferences, and time constraints. This example demonstrates how to build an AI agent using VoltAgent framework with MCP (Model Context Protocol) integration to access external data sources like Exa for comprehensive culinary information.
Try these prompts to interact with your recipe AI agent:
- "What’s a one-pan dinner I can make with salmon, zucchini, and quinoa?”
- “Suggest a low-carb lunch using eggs, avocado, and spinach.”
- “I need a gluten-free dinner with beef, peppers, and rice.”
- “Show me a no-bake dessert with peanut butter and oats.”
- “I only have 15 minutes—what can I make with eggs, cheese, and bread?
Usage
1. Create a new VoltAgent AI agent app
Initialize a new AI agent project with the recipe creator example.
npm create voltagent-app@latest -- --example with-recipe-generator
You can find the source code of this example here.
2. Configure API keys
After signing up for Exa, get your API key from dashboard.exa.ai/api-keys.
Create a .env file in your project root:
OPENAI_API_KEY=your-openai-api-key
EXA_API_KEY=your-exa-api-key
3. Run the agent
Start the development server.
cd my-agent-app && npm run dev
Once your server starts successfully, you'll see the following output in your terminal:
════════════════════════════════════════════
VOLTAGENT SERVER STARTED SUCCESSFULLY
════════════════════════════════════════════
✓ HTTP Server: http://localhost:3141
VoltOps Platform: https://console.voltagent.dev