# dineshp0103/triporchestrator architecture

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

- Interactive diagram: https://gitdiagram.com/dineshp0103/triporchestrator
- Repository: https://github.com/dineshp0103/triporchestrator

## Overview

TripOrchestrator is a Streamlit travel-planning assistant. A user enters a request in the chat; the app routes casual conversation to the front-door LLM or travel requests to a LangGraph supervisor, which selects specialist agents and presents their results with progress updates. The specialists cover itinerary research, forecasts, hotel search and train availability. The README documents these capabilities, while sampled code confirms supervisor-to-agent calls and key external lookups; some UI-to-router wiring and unsampled integrations are therefore shown only where documentation supports them.

Main entry points: [`agents/orchestra.py`](https://github.com/dineshp0103/triporchestrator/blob/main/agents/orchestra.py) (Graph Supervisor), [`src/triporchestrator/app.py`](https://github.com/dineshp0103/triporchestrator/blob/main/src/triporchestrator/app.py) (Chat UI), [`agents/llm_convo.py`](https://github.com/dineshp0103/triporchestrator/blob/main/agents/llm_convo.py) (Request Router), [`agents/weather_agent.py`](https://github.com/dineshp0103/triporchestrator/blob/main/agents/weather_agent.py) (Weather Agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Chat Interface"]
  node_streamlit["Chat UI<br/>[app.py]"]
  node_progress["Progress Display<br/>[app.py]"]
  node_answer["Travel Response<br/>[app.py]"]
end

subgraph group_routing["Conversation Routing"]
  node_router["Request Router<br/>[llm_convo.py]"]
  node_supervisor["Graph Supervisor<br/>[orchestra.py]"]
  node_workflow["Workflow State<br/>[orchestra.py]"]
end

subgraph group_planning["Travel Specialists"]
  node_guide["Itinerary Guide<br/>[guide.py]"]
  node_weather["Weather Agent<br/>[weather_agent.py]"]
  node_booking["Hotel Agent<br/>[booking.py]"]
  node_hotel_browser["Hotel Browser<br/>[booking.py]"]
  node_transport["Train Agent<br/>[transport.py]"]
  node_train_browser["IRCTC Browser<br/>[transport.py]"]
end

subgraph group_integrations["External Services"]
  node_chat_llm{{"Conversation LLM"}}
  node_web_search{{"Web Search"}}
  node_geocoder{{"Geocoding Service"}}
  node_weather_api{{"OpenWeather API"}}
  node_booking_site{{"Booking.com"}}
  node_irctc{{"IRCTC"}}
end

node_traveler(("Traveler"))

node_traveler -->|"submits request"| node_streamlit
node_streamlit -->|"routes chat"| node_router
node_router -->|"streams casual reply"| node_chat_llm
node_router -->|"dispatches travel"| node_supervisor
node_supervisor -->|"updates state"| node_workflow
node_supervisor -->|"invokes itinerary"| node_guide
node_supervisor -->|"invokes forecast"| node_weather
node_supervisor -->|"invokes hotel search"| node_booking
node_supervisor -->|"invokes train search"| node_transport
node_guide -->|"searches travel info"| node_web_search
node_weather -->|"resolves location"| node_geocoder
node_weather -->|"fetches forecast"| node_weather_api
node_booking -->|"uses browser engine"| node_hotel_browser
node_hotel_browser -->|"searches properties"| node_booking_site
node_transport -->|"uses browser engine"| node_train_browser
node_train_browser -->|"searches availability"| node_irctc
node_supervisor -->|"streams agent events"| node_progress
node_streamlit -->|"renders progress"| node_progress
node_streamlit -->|"displays responses"| node_answer

click node_streamlit "https://github.com/dineshp0103/triporchestrator/blob/main/src/triporchestrator/app.py"
click node_progress "https://github.com/dineshp0103/triporchestrator/blob/main/src/triporchestrator/app.py"
click node_router "https://github.com/dineshp0103/triporchestrator/blob/main/agents/llm_convo.py"
click node_supervisor "https://github.com/dineshp0103/triporchestrator/blob/main/agents/orchestra.py"
click node_workflow "https://github.com/dineshp0103/triporchestrator/blob/main/agents/orchestra.py"
click node_guide "https://github.com/dineshp0103/triporchestrator/blob/main/agents/guide.py"
click node_weather "https://github.com/dineshp0103/triporchestrator/blob/main/agents/weather_agent.py"
click node_booking "https://github.com/dineshp0103/triporchestrator/blob/main/agents/booking.py"
click node_hotel_browser "https://github.com/dineshp0103/triporchestrator/blob/main/agents/booking.py"
click node_transport "https://github.com/dineshp0103/triporchestrator/blob/main/agents/transport.py"
click node_train_browser "https://github.com/dineshp0103/triporchestrator/blob/main/agents/transport.py"
click node_answer "https://github.com/dineshp0103/triporchestrator/blob/main/src/triporchestrator/app.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_streamlit,node_progress,node_answer toneBlue
class node_router,node_supervisor,node_workflow toneAmber
class node_guide,node_weather,node_booking,node_hotel_browser,node_transport,node_train_browser toneMint
class node_chat_llm,node_web_search,node_geocoder,node_weather_api,node_booking_site,node_irctc toneRose
class node_traveler toneIndigo
```

## Components

### Chat Interface

- [Chat UI](https://github.com/dineshp0103/triporchestrator/blob/main/src/triporchestrator/app.py): `src/triporchestrator/app.py`
- [Progress Display](https://github.com/dineshp0103/triporchestrator/blob/main/src/triporchestrator/app.py): `src/triporchestrator/app.py`
- [Travel Response](https://github.com/dineshp0103/triporchestrator/blob/main/src/triporchestrator/app.py): `src/triporchestrator/app.py`

### Conversation Routing

- [Request Router](https://github.com/dineshp0103/triporchestrator/blob/main/agents/llm_convo.py): `agents/llm_convo.py`
- [Graph Supervisor](https://github.com/dineshp0103/triporchestrator/blob/main/agents/orchestra.py): `agents/orchestra.py`
- [Workflow State](https://github.com/dineshp0103/triporchestrator/blob/main/agents/orchestra.py): `agents/orchestra.py`

### Travel Specialists

- [Itinerary Guide](https://github.com/dineshp0103/triporchestrator/blob/main/agents/guide.py): `agents/guide.py`
- [Weather Agent](https://github.com/dineshp0103/triporchestrator/blob/main/agents/weather_agent.py): `agents/weather_agent.py`
- [Hotel Agent](https://github.com/dineshp0103/triporchestrator/blob/main/agents/booking.py): `agents/booking.py`
- [Hotel Browser](https://github.com/dineshp0103/triporchestrator/blob/main/agents/booking.py): `agents/booking.py`
- [Train Agent](https://github.com/dineshp0103/triporchestrator/blob/main/agents/transport.py): `agents/transport.py`
- [IRCTC Browser](https://github.com/dineshp0103/triporchestrator/blob/main/agents/transport.py): `agents/transport.py`

### External Services

- **Conversation LLM**
- **Web Search**
- **Geocoding Service**
- **OpenWeather API**
- **Booking.com**
- **IRCTC**

### Other components

- **Traveler**

## Connections

- Traveler → Chat UI: submits request (evidence: `README.md`)
- Chat UI → Request Router: routes chat (evidence: `README.md`)
- Request Router → Conversation LLM: streams casual reply (evidence: `agents/llm_convo.py`)
- Request Router → Graph Supervisor: dispatches travel (evidence: `README.md`)
- Graph Supervisor → Workflow State: updates state (evidence: `agents/orchestra.py`)
- Graph Supervisor → Itinerary Guide: invokes itinerary (evidence: `agents/orchestra.py`)
- Graph Supervisor → Weather Agent: invokes forecast (evidence: `agents/orchestra.py`)
- Graph Supervisor → Hotel Agent: invokes hotel search (evidence: `agents/orchestra.py`)
- Graph Supervisor → Train Agent: invokes train search (evidence: `agents/orchestra.py`)
- Itinerary Guide → Web Search: searches travel info (evidence: `agents/guide.py`)
- Weather Agent → Geocoding Service: resolves location (evidence: `agents/weather_agent.py`)
- Weather Agent → OpenWeather API: fetches forecast (evidence: `agents/weather_agent.py`)
- Hotel Agent → Hotel Browser: uses browser engine (evidence: `agents/booking.py`)
- Hotel Browser → Booking.com: searches properties (evidence: `agents/booking.py`)
- Train Agent → IRCTC Browser: uses browser engine (evidence: `agents/transport.py`)
- IRCTC Browser → IRCTC: searches availability (evidence: `agents/transport.py`)
- Graph Supervisor → Progress Display: streams agent events (evidence: `agents/orchestra.py`)
- Chat UI → Progress Display: renders progress (evidence: `README.md`)
- Chat UI → Travel Response: displays responses (evidence: `README.md`)
