Travel Planner Agent
This guide provides the necessary steps to run the Travel Planner Agent using the NVIDIA AIQ Toolkit and other required tools. Follow the instructions below to set up your environment, configure necessary APIs, and run both the UI and backend components.
Prerequisites Ensure the following tools and packages are installed:
-
Node.js (for the UI component)
-
npm (for managing Node.js packages)
-
Python (for the backend)
-
AIQ Toolkit (for backend processing)
-
uv command line tool
You can install the required dependencies by following the installation steps for the NVIDIA AIQ Toolkit at NVIDIA AIQ Toolkit Installation. https://docs.nvidia.com/aiqtoolkit/latest/quick-start/installing.html
Setting Up the UI
- Navigate to the aiqtoolkit-opensource-ui directory:
cd AIQToolkit/external/aiqtoolkit-opensource-ui
npm i
npm run dev
This will host the UI at a local address (usually http://localhost:3000 or http://localhost:3001). Note the URL where the UI is being served.
Setting Up the Backend
- Navigate to the AIQToolkit directory in another terminal:
cd AIQToolkit
- Install Prerequisites
uv venv --seed .venv
source .venv/bin/activate
uv sync --all-groups --all-extras
uv pip install -e '.[langchain]'
- Install the backend component for flight details:
Run the following command to install the new component:
uv pip install -e examples/flight_details
- Export API Keys
Before running the application, export the required API keys and environment variables. Please make sure to delete the keys once used. The BASE_PATH should be updated until "to" for your directory.
export MEM0_API_KEY=
export NVIDIA_API_KEY=
export AVIATION_STACK_ACCESS_KEY=
export OPENWEATHER_API_KEY=
export AMADEUS_DEV_CLIENT_ID=
export AMADEUS_DEV_SECRET=
export BASE_PATH=/absolute/path/to/AIQToolkit/examples/flight_details/aviation.db
Explanation of Keys:
MEM0_API_KEY: API key for the MEM0 service.
NVIDIA_API_KEY: API key for the NVIDIA services.
AVIATION_STACK_ACCESS_KEY: Key to access Aviation Stack API for flight data.
OPENWEATHER_API_KEY: Key for OpenWeatherMap API for geolocation data.
AMADEUS_DEV_CLIENT_ID: Client ID for Amadeus API
AMADEUS_DEV_SECRET: Secret for Amadeus API
BASE_PATH: The absolute path to your local database containing flight details where you unzipped the downloaded source code
- Start the backend:
Launch the backend server using the aiq serve command:
aiq serve --config_file examples/flight_details/configs/config.yml --host 0.0.0.0 --port 8000
Start Chatting with the Travel Planner Agent Open the UI in your browser at http://localhost:3000 (or the appropriate port).
Interact with the Travel Planner Agent to get flight details, activities, tours, hotel bookings and more!