2025-12-22 18:05:49 -08:00
# Travel Booking Agent Demo
2025-12-23 17:14:50 -08:00
A production-ready multi-agent travel booking system demonstrating Plano's intelligent agent routing. This demo showcases two specialized agents working together to help users plan trips with weather information and flight searches.
2025-12-22 18:05:49 -08:00
## Overview
2025-12-23 17:14:50 -08:00
This demo consists of two intelligent agents that work together seamlessly:
2025-12-22 18:05:49 -08:00
2025-12-23 17:14:50 -08:00
- **Weather Agent** - Real-time weather conditions and multi-day forecasts for any city worldwide
2025-12-22 18:05:49 -08:00
- **Flight Agent** - Live flight information between airports with real-time tracking
2025-12-23 17:14:50 -08:00
All agents use Plano's agent router to intelligently route user requests to the appropriate specialized agent based on conversation context and user intent. Both agents run as Docker containers for easy deployment.
2025-12-22 18:05:49 -08:00
## Features
- **Intelligent Routing**: Plano automatically routes requests to the right agent
- **Conversation Context**: Agents understand follow-up questions and references
2025-12-23 17:14:50 -08:00
- **Real-Time Data**: Live weather and flight data from public APIs
- **Multi-Day Forecasts**: Weather agent supports up to 16-day forecasts
2025-12-22 18:05:49 -08:00
- **LLM-Powered**: Uses GPT-4o-mini for extraction and GPT-4o for responses
- **Streaming Responses**: Real-time streaming for better user experience
## Prerequisites
2025-12-23 17:14:50 -08:00
- Docker and Docker Compose
2025-12-22 18:05:49 -08:00
- [Plano CLI ](https://docs.planoai.dev ) installed
2025-12-23 17:14:50 -08:00
- OpenAI API key
2025-12-22 18:05:49 -08:00
## Quick Start
2025-12-23 17:14:50 -08:00
### 1. Set Environment Variables
2025-12-22 18:05:49 -08:00
Create a `.env` file or export environment variables:
```bash
export AEROAPI_KEY="your-flightaware-api-key" # Optional, demo key included
```
2025-12-23 17:14:50 -08:00
### 2. Start All Agents with Docker
2025-12-22 18:05:49 -08:00
```bash
chmod +x start_agents.sh
./start_agents.sh
```
2025-12-23 17:14:50 -08:00
Or directly:
```bash
docker compose up --build
```
2025-12-22 18:05:49 -08:00
This starts:
- Weather Agent on port 10510
- Flight Agent on port 10520
2025-12-23 17:14:50 -08:00
- Open WebUI on port 8080
2025-12-22 18:05:49 -08:00
2025-12-23 17:14:50 -08:00
### 3. Start Plano Orchestrator
2025-12-22 18:05:49 -08:00
In a new terminal:
```bash
2025-12-23 17:14:50 -08:00
cd /path/to/travel_agents
2025-12-23 19:26:51 -08:00
planoai up config.yaml
2025-12-26 11:21:42 -08:00
# Or if installed with uv: uvx planoai up config.yaml
2025-12-22 18:05:49 -08:00
```
The gateway will start on port 8001 and route requests to the appropriate agents.
2025-12-23 17:14:50 -08:00
### 4. Test the System
2025-12-22 18:05:49 -08:00
2025-12-23 17:14:50 -08:00
**Option 1**: Use Open WebUI at http://localhost:8080
**Option 2**: Send requests directly to Plano Orchestrator:
2025-12-22 18:05:49 -08:00
```bash
2025-12-23 17:14:50 -08:00
curl http://localhost:8001/v1/chat/completions \
2025-12-22 18:05:49 -08:00
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [
{"role": "user", "content": "What is the weather like in Paris?"}
]
}'
```
## Example Conversations
### Weather Query
```
User: What's the weather in Istanbul?
Assistant: [Weather Agent provides current conditions and forecast]
```
### Flight Search
```
User: What flights go from London to Seattle?
Assistant: [Flight Agent shows available flights with schedules and status]
```
### Multi-Agent Conversation
```
User: What's the weather in Istanbul?
Assistant: [Weather information]
User: Do they fly out from Seattle?
Assistant: [Flight information from Istanbul to Seattle]
```
The system understands context and pronouns, automatically routing to the right agent.
### Multi-Intent Queries
```
User: What's the weather in Seattle, and do any flights go direct to New York?
Assistant: [Both weather_agent and flight_agent respond simultaneously]
- Weather Agent: [Weather information for Seattle]
- Flight Agent: [Flight information from Seattle to New York]
```
The orchestrator can select multiple agents simultaneously for queries containing multiple intents.
## Agent Details
### Weather Agent
- **Port**: 10510
- **API**: Open-Meteo (free, no API key)
- **Capabilities**: Current weather, multi-day forecasts, temperature, conditions, sunrise/sunset
### Flight Agent
- **Port**: 10520
- **API**: FlightAware AeroAPI
- **Capabilities**: Real-time flight status, schedules, delays, gates, terminals, live tracking
## Architecture
```
2025-12-23 17:14:50 -08:00
User Request
↓
Plano (8001)
[Orchestrator]
|
┌────┴────┐
↓ ↓
Weather Flight
Agent Agent
(10510) (10520)
[Docker] [Docker]
```
2025-12-22 18:05:49 -08:00
```
Each agent:
2025-12-23 17:14:50 -08:00
1. Extracts intent using GPT-4o-mini (with OpenTelemetry tracing)
2025-12-22 18:05:49 -08:00
2. Fetches real-time data from APIs
3. Generates response using GPT-4o
4. Streams response back to user
2025-12-23 17:14:50 -08:00
Both agents run as Docker containers and communicate with Plano via `host.docker.internal` .
2025-12-22 18:05:49 -08:00
## Project Structure
```
2025-12-23 17:14:50 -08:00
travel_agents/
2025-12-23 18:37:58 -08:00
├── config.yaml # Plano configuration
2025-12-23 17:14:50 -08:00
├── docker-compose.yaml # Docker services orchestration
├── Dockerfile # Multi-agent container image
├── start_agents.sh # Quick start script
2025-12-22 18:05:49 -08:00
├── pyproject.toml # Python dependencies
└── src/
└── travel_agents/
├── __init__ .py # CLI entry point
2025-12-23 17:14:50 -08:00
├── weather_agent.py # Weather forecast agent (multi-day support)
└── flight_agent.py # Flight information agent
2025-12-22 18:05:49 -08:00
```
2025-12-23 17:14:50 -08:00
## Configuration Files
2025-12-23 18:37:58 -08:00
### config.yaml
2025-12-23 17:14:50 -08:00
Defines the two agents, their descriptions, and routing configuration. The agent router uses these descriptions to intelligently route requests.
### docker-compose.yaml
Orchestrates the deployment of:
- Weather Agent (builds from Dockerfile)
- Flight Agent (builds from Dockerfile)
- Open WebUI (for testing)
- Jaeger (for distributed tracing)
2025-12-22 18:05:49 -08:00
## Troubleshooting
2025-12-23 17:14:50 -08:00
**Docker containers won't start**
- Verify Docker and Docker Compose are installed
- Check that ports 10510, 10520, 8080 are available
- Review container logs: `docker compose logs weather-agent` or `docker compose logs flight-agent`
2025-12-22 18:05:49 -08:00
**Plano won't start**
- Verify Plano is installed: `plano --version`
2025-12-23 17:14:50 -08:00
- Ensure you're in the travel_agents directory
2025-12-23 18:37:58 -08:00
- Check config.yaml is valid
2025-12-22 18:05:49 -08:00
**No response from agents**
2025-12-23 17:14:50 -08:00
- Verify all containers are running: `docker compose ps`
2025-12-22 18:05:49 -08:00
- Check that Plano is running on port 8001
2025-12-23 17:14:50 -08:00
- Review agent logs: `docker compose logs -f`
- Verify `host.docker.internal` resolves correctly (should point to host machine)
2025-12-22 18:05:49 -08:00
## API Endpoints
All agents expose OpenAI-compatible chat completion endpoints:
- `POST /v1/chat/completions` - Chat completion endpoint
- `GET /health` - Health check endpoint