# shaheennabi/production-ready-tripplanner-multi-ai-agents-project architecture

> Architecture diagram of the GitHub repository shaheennabi/production-ready-tripplanner-multi-ai-agents-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project
- Repository: https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project

## Overview

##### Project type and purpose
- This is a modular, full-stack AI pipeline application (“TripPlanner Multi-AI Agents”) that uses Taskflow AI to orchestrate multiple AI agents.
- Purpose: take a single user query (destination + preferences) and, via a Streamlit UI, produce a complete trip report by calling specialized agents (web research, travel info, reporter).

##### File structure
- Top-level:
- “demo.py” or “deployment/app.py” – entrypoint for the UI/pipeline
- “src/agentic/agents/…” – definitions of three agents
- “src/agentic/tools/…” – five tool modules
- “.github/workflows/deploy.yml”, “Dockerfile”, “scripts.sh” – CI/CD and containerization
- Pattern: layered modular design – UI layer, orchestrator, agent components, tool plugins, external API integrations, deployment pipeline.

##### Readme insights
- Describes a “main pipeline” that wires together agents via Taskflow AI.
- Lists three agents: Web Research Agent, Travel Agent, Reporter Agent.
- Lists five tools: SerperSearch, WikiArticles, WikiImages, SearchFlights, GetWeatherData.
- Shows a deployment pipeline: GitHub Actions → Docker → AWS ECR → EC2.

##### Components
a. Main components:
- User Interface (Streamlit app in demo.py / deployment/app.py)
- Pipeline Orchestrator (Taskflow AI core)
- Agents:
- Web Research Agent
- Travel Agent
- Reporter Agent
- Tools / Plugins:
- Serper Search
- Wikipedia Article Search
- Wikipedia Image Search
- Flight Search (Amadeus)
- Weather Fetch (Weather.com)
- External Services / APIs: OpenAI, Serper API, Wikipedia API, Amadeus API, Weather.com API
- CI/CD & Deployment: GitHub Actions, Docker, AWS ECR, EC2 self-hosted runner
b. Relationships & Interaction:
- UI submits user input to Pipeline Orchestrator
- Orchestrator instantiates Agents in sequence (Web → Travel → Reporter)
- Each Agent calls its Tools, which in turn call external APIs
- Reporter Agent aggregates outputs and returns final report to UI
- On code push, GitHub Actions builds Docker image, pushes to AWS ECR, and deploys container to EC2
c. Architectural patterns & principles:
- Modular “plugin” pattern: each Agent is a self-contained module with its own tools
- Layered design: UI / Orchestrator / Agents / Tools / External Services
- Separation of concerns: Agents focus on a single domain, Tools abstract external API interactions
- CI/CD pipeline ensures reproducible, containerized deployment
d. Key technologies & frameworks:
- Python 3.10+, Taskflow AI
- Streamlit (UI)
- Docker, GitHub Actions
- AWS ECR & EC2
- Third-party APIs: OpenAI, SerperSearch, WikipediaTools, Amadeus, Weather.com

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% UI Layer
    subgraph "UI Layer"
        direction TB
        UI1["Streamlit UI (demo.py)"]:::ui
        UI2["Streamlit UI (deployment/app.py)"]:::ui
    end

    %% Orchestrator Layer
    subgraph "Orchestrator Layer"
        direction TB
        Orch["Pipeline Orchestrator\n(Taskflow AI)"]:::orchestrator
        Utils["Main Utils\n(src/agentic/utils/main_utils.py)"]:::orchestrator
    end

    %% Agents Layer
    subgraph "Agents"
        direction TB
        WebAgent["Web Research Agent\n(src/agentic/agents/web_research_agent.py)"]:::agent
        TravelAgent["Travel Agent\n(src/agentic/agents/travel_agent.py)"]:::agent
        ReporterAgent["Reporter Agent\n(src/agentic/agents/reporter_agent.py)"]:::agent
    end

    %% Tools Layer
    subgraph "Tools / Plugins"
        direction TB
        Serper["Serper Search\n(src/agentic/tools/serper_search.py)"]:::tool
        WikiArticles["Wikipedia Article Search\n(src/agentic/tools/search_articles.py)"]:::tool
        WikiImages["Wikipedia Image Search\n(src/agentic/tools/search_images.py)"]:::tool
        Flights["Flight Search\n(src/agentic/tools/search_flights.py)"]:::tool
        Weather["Weather Fetch\n(src/agentic/tools/get_weather_data.py)"]:::tool
    end

    %% External APIs
    subgraph "External Services / APIs"
        direction TB
        OpenAI["OpenAI API"]:::external
        SerperAPI["Serper API"]:::external
        WikiAPI["Wikipedia API"]:::external
        AmadeusAPI["Amadeus API"]:::external
        WeatherAPI["Weather.com API"]:::external
    end

    %% CI/CD & Deployment
    subgraph "CI/CD & Deployment"
        direction TB
        GH["GitHub Actions\n(.github/workflows/deploy.yml)"]:::ci
        Docker["Docker Build\n(Dockerfile / scripts.sh)"]:::ci
        ECR[(AWS ECR)]:::external
        EC2["EC2 Self-Hosted Runner"]:::ci
    end

    %% Connections
    UI1 -->|user request| Orch
    UI2 -->|user request| Orch
    Orch -->|invoke WebResearchAgent| WebAgent
    Orch -->|invoke TravelAgent| TravelAgent
    Orch -->|invoke ReporterAgent| ReporterAgent

    WebAgent -->|use Serper Search| Serper
    WebAgent -->|use Wiki Articles| WikiArticles
    WebAgent -->|use Wiki Images| WikiImages
    TravelAgent -->|use Flight Search| Flights
    TravelAgent -->|use Weather Fetch| Weather
    ReporterAgent -->|aggregate outputs| UI1

    Serper -->|HTTP GET| SerperAPI
    WikiArticles -->|HTTP GET| WikiAPI
    WikiImages -->|HTTP GET| WikiAPI
    Flights -->|HTTP GET| AmadeusAPI
    Weather -->|HTTP GET| WeatherAPI

    %% CI/CD Flow
    GH -->|build| Docker
    Docker -->|push image| ECR
    ECR -->|deploy| EC2

    %% Click Events
    click UI1 "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/blob/main/demo.py"
    click UI2 "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/blob/main/deployment/app.py"
    click Orch "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/blob/main/demo.py"
    click Utils "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/blob/main/src/agentic/utils/main_utils.py"
    click WebAgent "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/blob/main/src/agentic/agents/web_research_agent.py"
    click TravelAgent "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/blob/main/src/agentic/agents/travel_agent.py"
    click ReporterAgent "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/blob/main/src/agentic/agents/reporter_agent.py"
    click Serper "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/blob/main/src/agentic/tools/serper_search.py"
    click WikiArticles "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/blob/main/src/agentic/tools/search_articles.py"
    click WikiImages "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/blob/main/src/agentic/tools/search_images.py"
    click Flights "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/blob/main/src/agentic/tools/search_flights.py"
    click Weather "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/blob/main/src/agentic/tools/get_weather_data.py"
    click GH "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/blob/main/.github/workflows/deploy.yml"
    click Docker "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/tree/main/Dockerfile"
    click Docker "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/blob/main/scripts.sh"
    click UI2 "https://github.com/shaheennabi/production-ready-tripplanner-multi-ai-agents-project/blob/main/deployment/app.py"

    %% Styles
    classDef ui fill:#AEDFF7,stroke:#036; 
    classDef orchestrator fill:#C8F7C5,stroke:#063;
    classDef agent fill:#BFEFFF,stroke:#036;
    classDef tool fill:#FDDC99,stroke:#A65;
    classDef external fill:#E0E0E0,stroke:#666;
    classDef ci fill:#D3C0EB,stroke:#630;
```
