Challenge 02 - Build Your MVP

< Previous Challenge - Home - Next Challenge >

Introduction

It’s time to build the first version of WanderAI’s Travel Planner service! In this challenge, you will create a Flask web application that leverages the Microsoft Agent Framework to generate personalized travel itineraries.

Your application will accept user travel preferences through a web form and use an AI agent to create beautiful, customized trip plans. The agent will have access to tools that provide real-time information like weather data and current date/time.

Description

You need to build a Flask web application with the following components:

User Interface:

Backend:

Output:

Components to Build

Your application needs these key pieces:

Environment Setup

Your application needs the following environment variables configured in a .env file:

Starter Code

A starter code file web_app.py with implementation guidance comments is provided in the Resources folder. This file outlines the structure you need to implement but leaves the core logic for you to figure out.

Use your knowledge from Challenge 01 or use a tool like GitHub Copilot to complete the tasks.

The files in your Codespace provide the necessary resources and structure to help you get started. These are not complete implementations but rather scaffolds to guide you in building the application. You will need to fill in the logic for the Flask routes, agent setup, and tool functions based on your understanding of the concepts covered in Challenge 01.

List of existing files in the Codespace:

Success Criteria

To complete this challenge successfully, you should be able to:

Once you have met these criteria, you will have successfully built the MVP for WanderAI’s Travel Planner service! Leverage the run.sh script to start your application. The first time you run it, it will install dependencies and set up the environment. Initially, no .env file will exist, so the script will create one and terminate. Add your API keys and other required environment variables listed above. Run the script again to start the Flask server.

If everything is set up correctly, you should see output indicating the Flask app is running on http://localhost:5002. Open that URL in your web browser to access the travel planner form.

WanderAI MVP Homepage

Once you enter your travel preferences and submit the form, the AI agent will process your request and generate a personalized travel itinerary. The results page will display the recommended destinations, activities, accommodations, and other details in a user-friendly format.

WanderAI MVP Travel Plan Result

Learning Resources

Tips

Advanced Challenges (Optional)