An AI agent that helps users:
- enter their job history, education, skills, and contact details
- paste a job description
- get an explainable qualification / match score + gap analysis
- generate a tailored resume + cover letter for that job
- download tailored outputs as PDF / DOCX, and generate LaTeX (Overleaf) code for easy editing
LLM Provider: OpenAI
Backend: FastAPI
Agent Workflow: LangChain + LangGraph
- User enters: job history, education, skills, summary, projects, contact details
- (Dev option) Use a local PDF resume → extract text → produce structured JSON
- Parse job description into structured requirements
- Compute match score with breakdown (stable and explainable)
- Identify gaps + missing evidence
- Tailored resume (ATS-friendly)
- Tailored cover letter (role-specific)
- Guardrails: do not invent experience
- Export tailored resume / cover letter as PDF and/or DOCX
- Generate LaTeX compatible with Overleaf
- FastAPI + Uvicorn
- LangChain (LLM calls, tools)
- LangGraph (workflow orchestration)
- Pydantic (strict schemas)
- PDF text extraction:
pypdf - DOCX:
python-docx - PDF:
reportlab(or docx→pdf conversion later) - Database (recommended): Postgres
- Vector DB (recommended): pgvector (inside Postgres)
.
├── backend/
│ └── app/
│ ├── main.py
│ ├── config.py
│ ├── models/
│ │ ├── __init__.py
│ │ ├── schemas_resume.py
│ │ ├── schemas_job.py
│ │ └── schemas_outputs.py
│ ├── resume/
│ │ ├── __init__.py
│ │ ├── pdf_extract.py
│ │ ├── structurer.py
│ │ └── latex_generator.py
│ ├── match/
│ │ ├── __init__.py
│ │ ├── scorer.py
│ │ └── gap_insights.py
│ ├── tailor/
│ │ ├── __init__.py
│ │ ├── resume_tailor.py
│ │ └── cover_letter_tailor.py
│ ├── export/
│ │ ├── __init__.py
│ │ ├── docx_export.py
│ │ └── pdf_export.py
│ └── agent/
│ ├── __init__.py
│ └── graph.py
├── data/
│ └── resumes/
├── .env
└── requirements.txt
Important: Ensure each package folder contains an
__init__.pyso Python imports work.
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pippip install fastapi "uvicorn[standard]" python-dotenv pydantic \
langchain langgraph openai langchain-openai \
pypdf python-docx reportlab beanie \
sqlalchemy "psycopg[binary]" pgvector alembicCreate a .env file in the project root:
OPENAI_API_KEY=your_key_here
OPENAI_CHAT_MODEL=gpt-4.1-mini
# Local dev folder for PDFs (only reads PDFs from here)
BASE_RESUME_DIR=./data/resumes
# MongoDB (resume-ai database)
MONGODB_URI=mongodb://admin:your_password@localhost:27017
MONGODB_DB_NAME=resume-ai
# Optional DB (later)
DATABASE_URL=postgresql+psycopg://user:pass@localhost:5432/resume_tailorVerify the key is visible to Python:
python -c "import os; print('OPENAI_API_KEY set?', bool(os.getenv('OPENAI_API_KEY')))"uvicorn backend.app.main:app --reload --port 8000curl http://127.0.0.1:8000/health1) Put your resume PDF in data/resumes/:
mkdir -p data/resumes
cp /path/to/your_resume.pdf data/resumes/resume.pdf2) Call the endpoint:
curl "http://127.0.0.1:8000/resume/format?pdf_path=resume.pdf"The response typically includes:
source_pdfextracted_charsresume(structured JSON)
Note: This endpoint reads only from
BASE_RESUME_DIRto avoid path traversal issues.
POST /profile— Create/update candidate profile from form input (job history, education, skills, contact)GET /profile/{id}— Fetch profile
GET /resume/format?pdf_path=resume.pdf— Local PDF → structured resume JSON
POST /job/parse— Parse job description into structured JobProfile
POST /match— Returns match score + breakdown + gaps + evidence mapping
POST /tailor/resume— Generates a tailored resume (structured + text)POST /tailor/cover-letter— Generates a tailored cover letter
GET /export/resume.pdf?run_id=...GET /export/resume.docx?run_id=...GET /export/cover-letter.pdf?run_id=...GET /export/cover-letter.docx?run_id=...
GET /export/resume.tex?run_id=...— Returns LaTeX source to paste into Overleaf
A controlled workflow is recommended (predictable + debuggable):
- Parse candidate profile (or structure resume PDF/text)
- Parse job description
- Compute deterministic match score (Python)
- Generate gap insights (LLM, structured output)
- Tailor resume (ATS-friendly, evidence-based)
- Tailor cover letter
- Validate truthfulness (no fabricated claims)
- Export: PDF/DOCX/LaTeX