mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
fixing the README for multi-agent orchestration
This commit is contained in:
parent
e41aa0a617
commit
23154e6314
1 changed files with 14 additions and 122 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Travel Booking Agent Demo
|
||||
|
||||
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.
|
||||
A multi-agent travel booking system demonstrating Plano's intelligent agent routing and orchestration. This demo showcases two specialized agents working together to help users plan trips with weather information and flight searches.
|
||||
|
||||
## Overview
|
||||
|
||||
|
|
@ -32,18 +32,13 @@ All agents use Plano's agent router to intelligently route user requests to the
|
|||
|
||||
Create a `.env` file or export environment variables:
|
||||
|
||||
```bash
|
||||
export AEROAPI_KEY="your-flightaware-api-key" # Optional, demo key included
|
||||
```
|
||||
|
||||
### 2. Start All Agents with Docker
|
||||
> **Note:** You'll need to obtain a FlightAware AeroAPI key for live flight data. Visit [https://www.flightaware.com/aeroapi/portal](https://www.flightaware.com/aeroapi/portal) to get your API key.
|
||||
|
||||
```bash
|
||||
chmod +x start_agents.sh
|
||||
./start_agents.sh
|
||||
export AEROAPI_KEY="your-flightaware-api-key"
|
||||
```
|
||||
|
||||
Or directly:
|
||||
### 2. Start All Agents & Plano with Docker
|
||||
|
||||
```bash
|
||||
docker compose up --build
|
||||
|
|
@ -53,50 +48,16 @@ This starts:
|
|||
- Weather Agent on port 10510
|
||||
- Flight Agent on port 10520
|
||||
- Open WebUI on port 8080
|
||||
|
||||
### 3. Start Plano Orchestrator
|
||||
|
||||
In a new terminal:
|
||||
|
||||
```bash
|
||||
cd /path/to/travel_agents
|
||||
planoai up config.yaml
|
||||
# Or if installed with uv: uvx planoai up config.yaml
|
||||
```
|
||||
|
||||
The gateway will start on port 8001 and route requests to the appropriate agents.
|
||||
- Plano Proxy on port 8001
|
||||
|
||||
### 4. Test the System
|
||||
|
||||
**Option 1**: Use Open WebUI at http://localhost:8080
|
||||
Use Open WebUI at http://localhost:8080
|
||||
|
||||
**Option 2**: Send requests directly to Plano Orchestrator:
|
||||
|
||||
```bash
|
||||
curl http://localhost:8001/v1/chat/completions \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "gpt-4o",
|
||||
"messages": [
|
||||
{"role": "user", "content": "What is the weather like in Paris?"}
|
||||
]
|
||||
}'
|
||||
```
|
||||
> **Note:** The Open WebUI may take a few minutes to start up and be fully ready. Please wait for the container to finish initializing before accessing the interface. Once ready, make sure to select the **gpt-4o** model from the model dropdown menu in the UI.
|
||||
|
||||
## 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?
|
||||
|
|
@ -108,7 +69,7 @@ Assistant: [Flight information from Istanbul to Seattle]
|
|||
|
||||
The system understands context and pronouns, automatically routing to the right agent.
|
||||
|
||||
### Multi-Intent Queries
|
||||
### Multi-Intent Single Query
|
||||
```
|
||||
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]
|
||||
|
|
@ -116,20 +77,6 @@ Assistant: [Both weather_agent and flight_agent respond simultaneously]
|
|||
- 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
|
||||
|
||||
```
|
||||
|
|
@ -138,12 +85,12 @@ The orchestrator can select multiple agents simultaneously for queries containin
|
|||
Plano (8001)
|
||||
[Orchestrator]
|
||||
|
|
||||
┌────┴────┐
|
||||
↓ ↓
|
||||
Weather Flight
|
||||
Agent Agent
|
||||
(10510) (10520)
|
||||
[Docker] [Docker]
|
||||
┌────┴──-──┐
|
||||
↓ ↓
|
||||
Weather Flight
|
||||
Agent Agent
|
||||
(10510) (10520)
|
||||
[Docker] [Docker]
|
||||
```
|
||||
|
||||
```
|
||||
|
|
@ -155,58 +102,3 @@ Each agent:
|
|||
4. Streams response back to user
|
||||
|
||||
Both agents run as Docker containers and communicate with Plano via `host.docker.internal`.
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
travel_agents/
|
||||
├── config.yaml # Plano configuration
|
||||
├── docker-compose.yaml # Docker services orchestration
|
||||
├── Dockerfile # Multi-agent container image
|
||||
├── start_agents.sh # Quick start script
|
||||
├── pyproject.toml # Python dependencies
|
||||
└── src/
|
||||
└── travel_agents/
|
||||
├── __init__.py # CLI entry point
|
||||
├── weather_agent.py # Weather forecast agent (multi-day support)
|
||||
└── flight_agent.py # Flight information agent
|
||||
```
|
||||
|
||||
## Configuration Files
|
||||
|
||||
### config.yaml
|
||||
|
||||
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)
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
**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`
|
||||
|
||||
**Plano won't start**
|
||||
- Verify Plano is installed: `plano --version`
|
||||
- Ensure you're in the travel_agents directory
|
||||
- Check config.yaml is valid
|
||||
|
||||
**No response from agents**
|
||||
- Verify all containers are running: `docker compose ps`
|
||||
- Check that Plano is running on port 8001
|
||||
- Review agent logs: `docker compose logs -f`
|
||||
- Verify `host.docker.internal` resolves correctly (should point to host machine)
|
||||
|
||||
## API Endpoints
|
||||
|
||||
All agents expose OpenAI-compatible chat completion endpoints:
|
||||
|
||||
- `POST /v1/chat/completions` - Chat completion endpoint
|
||||
- `GET /health` - Health check endpoint
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue