An intelligent, multi-agent system for planning your travel, built with the @iqai/adk library.
Flights • Hotels • Smart Assistance
Welcome! This project is an AI-powered travel assistant designed to make trip planning a breeze. It uses a sophisticated, hierarchical agent system to handle different aspects of your journey. You can ask it to find flights, search for hotels, and it will intelligently figure out the details for you.
- Hierarchical Agent System: A main
root_travel_agentorchestrates tasks, delegating to specialized agents. ✈️ Flight Agent: Finds the best flight options for your trip.- Searches for available flights between cities.
- Analyzes flight prices to find good deals.
- 🏨 Hotel Agent: Helps you find the perfect place to stay.
- Searches for hotels at your destination.
- Provides detailed information about specific hotels.
- 📍 Smart Location Handling: Automatically converts city names (like "Paris") into IATA codes (like "CDG") needed for flight and hotel searches.
Ready to try it out? Here’s how to get the agent running on your local machine.
git clone https://github.com/YOUR_USERNAME/iq-flights.git
cd iq-flightsThis project uses pnpm for fast and efficient package management. This will install all the necessary packages listed in package.json.
pnpm installYou can also use this template directly by copying the files, but using the CLI is recommended for best results.
Default (Production/Development) Route
To run your agent in production or for standard development, use:
pnpm devFast Iteration & Agent Setup (ADK CLI)
For rapid prototyping, interactive testing, or initial agent setup, use the ADK CLI:
adk run # Interactive CLI chat with your agents
adk web # Web interface for easy testing and demonstrationThe main agent code lives in index.ts where the subagents live inside the agents folder. The agents/agent.ts file is compatible with the ADK CLI for easy testing.
├── src/
│ ├── agents/
│ │ ├── agent.ts # Root agent (ADK CLI compatible)
│ │ ├── joke-agent/ # Joke-telling sub-agent
│ │ │ ├── agent.ts
│ │ │ └── tools.ts
│ │ └── weather-agent/ # Weather information sub-agent
│ │ ├── agent.ts
│ │ └── tools.ts
│ ├── env.ts # Environment variable validation
│ └── index.ts # Main execution entry point
Make sure to configure your environment variables:
cp .env.example .envThis starter includes:
- GitHub Actions: CI/CD pipeline
- 📦 PNPM: Fast package manager
- 🤖 ADK CLI: Interactive testing with
adk runandadk web
Traditional Testing: Run pnpm dev to execute the sample questions.
Interactive Testing with ADK CLI:
- Install:
npm install -g @iqai/adk-cli - Run:
adk runfor CLI chat oradk webfor web interface - Perfect for development, testing, and demonstrating your agent's capabilities
- Create new agents in the
src/agents/directory - Add tools to your agents in the
tools/subdirectory - Configure services in the
src/services/directory - Update environment variables in
src/env.ts
If you encounter any issues or have questions: