Skip to content

muneeb-rashid-cyan/AI-Job-Application-Agent-Azure-WebApps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎯 LangGraph Job Coach β€” Azure WebApps Deployment

A production-grade multi-agent LLM application built with LangGraph, deployed on Azure Web App via Azure Container Registry (ACR) with full Azure DevOps CI/CD pipeline.


πŸ“Œ Project Overview

Smart Job Application Coach is an end-to-end LLMOps project that leverages a 3-agent sequential LangGraph pipeline to help job seekers analyze their resume against a job description, get tailored resume advice, and generate a personalized cover letter β€” all powered by GPT-4o with structured outputs.

This project demonstrates:

  • Multi-agent orchestration using LangGraph
  • Structured LLM outputs using Pydantic models
  • Production API with FastAPI
  • Full containerization with Docker
  • LLMOps deployment on Azure Web App via ACR
  • Automated CI/CD pipeline with Azure DevOps

πŸ“Έ Demo

App Demo


πŸ—οΈ Architecture

User (Browser)
      β”‚
      β–Ό
FastAPI Backend (Azure Web App)
      β”‚
      β–Ό
LangGraph Sequential Pipeline
      β”‚
      β”œβ”€β”€β–Ά Agent 1: Skill Gap Analyzer
      β”‚         └── Reads resume + JD
      β”‚         └── Returns structured SkillGapAnalysis
      β”‚
      β”œβ”€β”€β–Ά Agent 2: Resume Advisor
      β”‚         └── Takes gap analysis
      β”‚         └── Returns section-by-section ResumeAdvice
      β”‚
      └──▢ Agent 3: Cover Letter Writer
                └── Takes resume + JD + gap analysis
                └── Returns personalized CoverLetter

πŸ€– Agent Design

Agent Role Input Output
Skill Gap Analyzer Compares resume vs JD Resume + JD SkillGapAnalysis
Resume Advisor Suggests improvements Gap analysis + Resume ResumeAdvice
Cover Letter Writer Writes cover letter All prior context CoverLetter

Shared LangGraph State (TypedDict)

class JobCoachState(TypedDict):
    resume_text: str
    job_description: str
    applicant_name: str
    gap_analysis: Optional[SkillGapAnalysis]
    resume_advice: Optional[ResumeAdvice]
    cover_letter: Optional[CoverLetter]
    error: Optional[str]

Each agent receives the full shared state as a dict and returns only the keys it updates β€” LangGraph merges them automatically.


πŸ› οΈ Tech Stack

Layer Technology
LLM Framework LangGraph + LangChain
LLM Model GPT-4o (gpt-4o-2024-08-06)
Structured Output Pydantic v2
Backend API FastAPI
Frontend Vanilla HTML/JS (single file)
Containerization Docker
Container Registry Azure Container Registry (ACR)
Cloud Deployment Azure Web App (Linux Container)
CI/CD Azure DevOps Pipelines
Package Manager uv

πŸ“ Project Structure

LangGraph-Job-Coach-Azure-WebApps/
β”‚
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ main.py                  # FastAPI app & endpoints
β”‚   β”œβ”€β”€ graph.py                 # LangGraph pipeline definition
β”‚   β”‚
β”‚   β”œβ”€β”€ agents/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ skill_gap.py         # Agent 1 β€” Skill Gap Analyzer
β”‚   β”‚   β”œβ”€β”€ resume_advisor.py    # Agent 2 β€” Resume Advisor
β”‚   β”‚   └── cover_letter.py      # Agent 3 β€” Cover Letter Writer
β”‚   β”‚
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   └── schemas.py           # Pydantic models & LangGraph State
β”‚   β”‚
β”‚   └── static/
β”‚       └── index.html           # Frontend UI
β”‚
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ azure-pipelines.yml
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ .env.example
└── README.md

βš™οΈ CI/CD Pipeline

Automated pipeline via Azure DevOps triggered on every push to main or dev.

Push to Repo
     β”‚
     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  STAGE 1 β€” CI               β”‚
β”‚  β”œβ”€β”€ Login to ACR            β”‚
β”‚  β”œβ”€β”€ Build Docker Image      β”‚
β”‚  └── Push Image to ACR       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚
     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  STAGE 2 β€” CD               β”‚
β”‚  β”œβ”€β”€ Deploy to Azure Web App β”‚
β”‚  β”œβ”€β”€ Set environment vars    β”‚
β”‚  β”œβ”€β”€ Restart Web App         β”‚
β”‚  └── Health Check /health    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  • Docker image tagged with both BuildId and latest
  • CD stage only runs if CI succeeds (condition: succeeded('CI'))
  • Health check hits /health endpoint β€” pipeline fails if response is not 200
  • OPENAI_API_KEY injected securely from Azure DevOps variable group (never stored in code or image)

πŸ”Œ API Endpoints

Method Endpoint Description
GET / Frontend UI
GET /health Health check
POST /analyze Run full 3-agent pipeline

/analyze Request Body

{
  "resume_text": "Full resume text...",
  "job_description": "Job description text...",
  "applicant_name": "John Doe"
}

/analyze Response

{
  "gap_analysis": {
    "missing_technical_skills": ["..."],
    "missing_soft_skills": ["..."],
    "experience_gaps": ["..."],
    "matching_strengths": ["..."],
    "overall_match_score": 72,
    "summary": "..."
  },
  "resume_advice": {
    "suggestions": ["..."],
    "priority_actions": ["..."],
    "keywords_to_add": ["..."]
  },
  "cover_letter": {
    "subject_line": "...",
    "body": "...",
    "key_selling_points": ["..."]
  }
}

πŸƒ Run Locally

Prerequisites

  • Python 3.11+
  • uv package manager
  • Docker Desktop
  • OpenAI API key

Setup

# Clone repo
git clone https://github.com/<your-username>/LangGraph-Job-Coach-Azure-WebApps.git
cd LangGraph-Job-Coach-Azure-WebApps

# Create and activate virtual environment
uv venv --python 3.11
.venv\Scripts\Activate.ps1      # Windows
source .venv/bin/activate        # Linux/Mac

# Install dependencies
uv pip install -e .

# Set environment variable
cp .env.example .env
# Edit .env and add your OPENAI_API_KEY

# Run the app
uvicorn app.main:app --reload --port 8000

Open http://localhost:8000

Run with Docker

docker build -t job-coach:latest .

docker run -p 8000:8000 \
  -e OPENAI_API_KEY=your-key-here \
  job-coach:latest

☁️ Azure Deployment

Infrastructure Used

  • Azure Container Registry (ACR) β€” stores Docker images
  • Azure App Service Plan β€” Linux B1 tier
  • Azure Web App β€” pulls container from ACR and runs it

Deploy via CLI

# Login to ACR
az acr login --name <your-acr-name>

# Tag and push image
docker tag job-coach:latest <your-acr-name>.azurecr.io/job-coach:latest
docker push <your-acr-name>.azurecr.io/job-coach:latest

# Create App Service Plan
az appservice plan create \
  --name <plan-name> \
  --resource-group <your-resource-group> \
  --is-linux \
  --sku B1

# Create Web App
az webapp create \
  --resource-group <your-resource-group> \
  --plan <plan-name> \
  --name <your-webapp-name> \
  --deployment-container-image-name <your-acr-name>.azurecr.io/job-coach:latest

# Configure container settings
az webapp config container set \
  --resource-group <your-resource-group> \
  --name <your-webapp-name> \
  --container-image-name <your-acr-name>.azurecr.io/job-coach:latest \
  --container-registry-url https://<your-acr-name>.azurecr.io

# Set environment variables
az webapp config appsettings set \
  --resource-group <your-resource-group> \
  --name <your-webapp-name> \
  --settings OPENAI_API_KEY="<your-key>" WEBSITES_PORT=8000

πŸ” Environment Variables

Variable Description
OPENAI_API_KEY OpenAI API key for GPT-4o
WEBSITES_PORT Port exposed by container (8000)

Create a .env file from the provided template:

cp .env.example .env

🧠 Key LLMOps Concepts Demonstrated

  • Structured outputs β€” every agent returns a validated Pydantic model, not raw text
  • State management β€” TypedDict shared state flows through all agents with automatic merging
  • Sequential agent pipeline β€” strict data dependency enforced by LangGraph edges
  • LLM initialization at request time β€” avoids env var loading race conditions at startup
  • Containerized deployment β€” reproducible environment from dev to production
  • Secret management β€” API keys injected via Azure DevOps variable groups, never in code or image

πŸ“„ License

MIT License

About

Production-grade multi-agent LLM app built with LangGraph & FastAPI, containerized with Docker, deployed on Azure Web App via ACR with full Azure DevOps CI/CD pipeline.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors