# pruthvirajk2026/travel-planning-multi-agent-system architecture

> Architecture diagram of the GitHub repository pruthvirajk2026/travel-planning-multi-agent-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pruthvirajk2026/travel-planning-multi-agent-system
- Repository: https://github.com/pruthvirajk2026/travel-planning-multi-agent-system

## Overview

This is a FastAPI travel-planning web app. A traveler submits destination, dates, party size, budget, and preferences through the browser; the API validates the request and invokes a LangGraph workflow. The workflow branches into destination research, itinerary, accommodation, and transport stages, then aggregates results and estimates a total using the selected mock flight and hotel. The README documents weather, places, maps, and news capabilities; the tools currently return mock data rather than live service results. Edges reflect the shown routes, calls, and graph wiring.

Main entry points: [`app/graph.py`](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/graph.py) (Supervisor), [`app/main.py`](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/main.py) (FastAPI routes), [`static/index.html`](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/static/index.html) (Planning form), [`app/models.py`](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/models.py) (Request validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Web interface"]
  node_browser["Planning form<br/>[index.html]"]
end

subgraph group_api["API and validation"]
  node_api["FastAPI routes<br/>[main.py]"]
  node_request["Request validation<br/>[models.py]"]
end

subgraph group_workflow["Planning workflow"]
  node_planner["Plan invocation<br/>[graph.py]"]
  node_supervisor["Supervisor<br/>[graph.py]"]
  node_research["Destination research<br/>[graph.py]"]
  node_itinerary["Itinerary planning<br/>[graph.py]"]
  node_accommodation["Accommodation planning<br/>[graph.py]"]
  node_transport["Transport planning<br/>[graph.py]"]
  node_aggregator["Response aggregation<br/>[graph.py]"]
end

subgraph group_tools["Mock travel tools"]
  node_research_tools["Weather, places, maps, news<br/>[tools.py]"]
  node_hotel_tool["Mock hotel search<br/>[tools.py]"]
  node_flight_tool["Mock flight search<br/>[tools.py]"]
  node_transit_tool["Mock transit directions<br/>[tools.py]"]
end

node_traveler(("Traveler"))
node_trip_plan["Readable trip plan"]

node_traveler -->|"enters trip details"| node_browser
node_browser -->|"submits plan request"| node_api
node_api -->|"validates payload"| node_request
node_api -->|"calls generate_plan"| node_planner
node_planner -->|"starts workflow"| node_supervisor
node_supervisor -->|"dispatches"| node_research
node_supervisor -->|"dispatches"| node_itinerary
node_supervisor -->|"dispatches"| node_accommodation
node_supervisor -->|"dispatches"| node_transport
node_research -->|"calls research tools"| node_research_tools
node_accommodation -->|"searches hotels"| node_hotel_tool
node_transport -->|"searches flights"| node_flight_tool
node_transport -->|"gets directions"| node_transit_tool
node_research -->|"contributes state"| node_aggregator
node_itinerary -->|"contributes state"| node_aggregator
node_accommodation -->|"contributes state"| node_aggregator
node_transport -->|"contributes state"| node_aggregator
node_aggregator -->|"returns final plan"| node_planner
node_planner -->|"returns plan"| node_api
node_api -.->|"serves plan response"| node_browser

click node_browser "https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/static/index.html"
click node_api "https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/main.py"
click node_request "https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/models.py"
click node_planner "https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/graph.py"
click node_supervisor "https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/graph.py"
click node_research "https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/graph.py"
click node_itinerary "https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/graph.py"
click node_accommodation "https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/graph.py"
click node_transport "https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/graph.py"
click node_aggregator "https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/graph.py"
click node_research_tools "https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/tools.py"
click node_hotel_tool "https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/tools.py"
click node_flight_tool "https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/tools.py"
click node_transit_tool "https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/tools.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_browser toneBlue
class node_api,node_request toneAmber
class node_planner,node_supervisor,node_research,node_itinerary,node_accommodation,node_transport,node_aggregator toneMint
class node_research_tools,node_hotel_tool,node_flight_tool,node_transit_tool toneRose
class node_traveler,node_trip_plan toneIndigo
```

## Components

### Web interface

- [Planning form](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/static/index.html): `static/index.html`

### API and validation

- [FastAPI routes](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/main.py): `app/main.py`
- [Request validation](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/models.py): `app/models.py`

### Planning workflow

- [Plan invocation](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/graph.py): `app/graph.py`
- [Supervisor](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/graph.py): `app/graph.py`
- [Destination research](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/graph.py): `app/graph.py`
- [Itinerary planning](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/graph.py): `app/graph.py`
- [Accommodation planning](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/graph.py): `app/graph.py`
- [Transport planning](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/graph.py): `app/graph.py`
- [Response aggregation](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/graph.py): `app/graph.py`

### Mock travel tools

- [Weather, places, maps, news](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/tools.py): `app/tools.py`
- [Mock hotel search](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/tools.py): `app/tools.py`
- [Mock flight search](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/tools.py): `app/tools.py`
- [Mock transit directions](https://github.com/pruthvirajk2026/travel-planning-multi-agent-system/blob/main/app/tools.py): `app/tools.py`

### Other components

- **Traveler**
- **Readable trip plan**

## Connections

- Traveler → Planning form: enters trip details (evidence: `README.md`)
- Planning form → FastAPI routes: submits plan request (evidence: `README.md`)
- FastAPI routes → Request validation: validates payload (evidence: `app/main.py`)
- FastAPI routes → Plan invocation: calls generate_plan (evidence: `app/main.py`)
- Plan invocation → Supervisor: starts workflow (evidence: `app/graph.py`)
- Supervisor → Destination research: dispatches (evidence: `app/graph.py`)
- Supervisor → Itinerary planning: dispatches (evidence: `app/graph.py`)
- Supervisor → Accommodation planning: dispatches (evidence: `app/graph.py`)
- Supervisor → Transport planning: dispatches (evidence: `app/graph.py`)
- Destination research → Weather, places, maps, news: calls research tools (evidence: `app/graph.py`)
- Accommodation planning → Mock hotel search: searches hotels (evidence: `app/graph.py`)
- Transport planning → Mock flight search: searches flights (evidence: `app/graph.py`)
- Transport planning → Mock transit directions: gets directions (evidence: `app/graph.py`)
- Destination research → Response aggregation: contributes state (evidence: `app/graph.py`)
- Itinerary planning → Response aggregation: contributes state (evidence: `app/graph.py`)
- Accommodation planning → Response aggregation: contributes state (evidence: `app/graph.py`)
- Transport planning → Response aggregation: contributes state (evidence: `app/graph.py`)
- Response aggregation → Plan invocation: returns final plan (evidence: `app/graph.py`)
- Plan invocation → FastAPI routes: returns plan (evidence: `app/main.py`)
- FastAPI routes → Planning form: serves plan response (evidence: `README.md`)
