# touhi99/genai-job-agents architecture

> Architecture diagram of the GitHub repository touhi99/genai-job-agents, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/touhi99/genai-job-agents
- Repository: https://github.com/touhi99/genai-job-agents

## Overview

##### Project Type and Purpose
- This is a full-stack AI agent application (with a focus more on backend processing) that orchestrates multiple components to search for jobs, assess resumes, and generate cover letters.
- Key use cases include querying the unofficial LinkedIn API, matching candidates with jobs based on resumes, and generating cover letters through LLMs.

##### File Structure
- Top-level files such as app.py, agents.py, llms.py, data_loader.py, prompts.py, search.py, and tools.py indicate clear separation of concerns:
- app.py: Likely the entry point to start the UI (via Streamlit) which ties all components together.
- agents.py: Contains the logic for the multi-agent system—matching the illustrated “supervisor,” “analyzer,” “generator,” and “searcher” roles.
- llms.py and prompts.py: Manage interactions with language models and prompt design.
- data_loader.py: Responsible for handling data input (for example, user resumes or job listings).
- search.py: Likely wraps the LinkedIn search functionality.
- tools.py: Could include various helper functions or integration utilities.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Layer
    subgraph "Frontend Layer"
        UI["UI (Streamlit)"]:::frontend
    end

    %% Data Handling
    subgraph "Data Handling"
        DataLoader["Data Loader"]:::data
    end

    %% Agent Pipeline
    subgraph "Agent Pipeline"
        Start["__start__"]:::pipeline
        Supervisor["Supervisor Agent"]:::pipeline
        Analyzer["Analyzer"]:::pipeline
        Generator["Generator"]:::pipeline
        Searcher["Searcher"]:::pipeline
        End["__end__"]:::pipeline
    end

    %% LLM Integration
    subgraph "LLM Integration"
        LLMs["LLMs"]:::integration
        Prompts["Prompts"]:::integration
    end

    %% External Services
    subgraph "External Services"
        OpenAI["OpenAI API"]:::external
        LinkedIn["LinkedIn API"]:::external
        Langchain["Langchain Service"]:::external
    end

    %% Helper Utilities
    subgraph "Helper Utilities"
        Utility["Utility Functions"]:::utility
    end

    %% Connections
    UI -->|"initiates"| DataLoader
    DataLoader -->|"feeds data to"| Start
    Start -->|"delegates to"| Supervisor
    Supervisor -->|"analyzes"| Analyzer
    Supervisor -->|"generates"| Generator
    Supervisor -->|"searches"| Searcher
    Generator -->|"calls"| LLMs
    LLMs -->|"uses"| Prompts
    Prompts -->|"invokes"| OpenAI
    Searcher -->|"queries"| LinkedIn
    Supervisor -->|"orchestrates"| Langchain
    Analyzer -->|"finalizes"| End
    Generator -->|"finalizes"| End
    Searcher -->|"finalizes"| End
    End -->|"returns result to"| UI
    Supervisor ---|"utilizes"| Utility

    %% Click Events
    click UI "https://github.com/touhi99/genai-job-agents/blob/main/app.py"
    click DataLoader "https://github.com/touhi99/genai-job-agents/blob/main/data_loader.py"
    click Supervisor "https://github.com/touhi99/genai-job-agents/blob/main/agents.py"
    click LLMs "https://github.com/touhi99/genai-job-agents/blob/main/llms.py"
    click Prompts "https://github.com/touhi99/genai-job-agents/blob/main/prompts.py"
    click LinkedIn "https://github.com/touhi99/genai-job-agents/blob/main/search.py"
    click Utility "https://github.com/touhi99/genai-job-agents/blob/main/tools.py"

    %% Styles
    classDef frontend fill:#a6cee3,stroke:#1f78b4,stroke-width:2px;
    classDef data fill:#b2df8a,stroke:#33a02c,stroke-width:2px;
    classDef pipeline fill:#fb9a99,stroke:#e31a1c,stroke-width:2px;
    classDef integration fill:#fdbf6f,stroke:#ff7f00,stroke-width:2px;
    classDef external fill:#cab2d6,stroke:#6a3d9a,stroke-width:2px;
    classDef utility fill:#ffff99,stroke:#b15928,stroke-width:2px;
```
