Metadata-Version: 2.4
Name: jobagent
Version: 1.0.22
Summary: Autonomous Multi-Platform AI Job Application Agent for LinkedIn and Naukri
Author-email: Yaswanth Asapu <yaswanth901@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/yaswanth901/jobagent
Keywords: job-application,job-agent,linkedin,naukri,automation,playwright,ai,gemini
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: playwright>=1.40.0
Requires-Dist: pydantic>=2.5.0
Requires-Dist: pydantic-settings>=2.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: SQLAlchemy>=2.0.0
Requires-Dist: aiosqlite>=0.19.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: reportlab>=4.0.0
Requires-Dist: pypdf>=3.0.0
Requires-Dist: google-genai>=0.1.0
Requires-Dist: fastapi>=0.100.0
Requires-Dist: uvicorn>=0.20.0
Provides-Extra: openai
Requires-Dist: openai>=1.0.0; extra == "openai"
Provides-Extra: all
Requires-Dist: google-genai>=0.1.0; extra == "all"
Requires-Dist: openai>=1.0.0; extra == "all"
Dynamic: license-file

# ⚡ JobAgent - Autonomous Multi-Platform AI Job Application Agent

[![PyPI version](https://img.shields.io/pypi/v/jobagent.svg?color=blue)](https://pypi.org/project/jobagent/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Playwright](https://img.shields.io/badge/Playwright-Chromium-green.svg)](https://playwright.dev/)

An autonomous AI agent designed to search, evaluate, match technical skills, dynamically fill application forms, and submit job applications across **LinkedIn Easy Apply** and **Naukri.com Quick Apply**.

Equipped with a **Web UI Control Center**, **Interactive Conversational AI Chat**, **ATS Resume Reviewer**, **Multi-Page Pagination**, and **Strict Technical Skill Matching**.

---

## 📌 IMPORTANT NOTES FOR NEW USERS (READ BEFORE FIRST RUN)

> [!IMPORTANT]
> 1. **Zero Credential / Password Storage**:
>    JobAgent **never** asks for, accesses, or saves your LinkedIn or Naukri passwords in plaintext or files. Authentication occurs strictly inside a visible Playwright Chromium browser window.
>
> 2. **One-Time Platform Sign-In (Option `[1]` / `jobagent --signin`)**:
>    When you first launch `jobagent`, choose **Option `[1] 🔑 Sign In / Verify Platform Accounts`** (or run `jobagent --signin`). A visible browser opens allowing you to log into LinkedIn and/or Naukri once (including entering your 2FA/OTP if enabled).
>    Your authenticated session cookies and security tokens are **permanently saved** inside your local user data directory (`.browser_context/`). All subsequent runs reuse these saved sessions without asking you to log in again.
>
> 3. **Automatic Playwright Browser Installation**:
>    JobAgent features self-healing browser launching. If Playwright's Chromium browser is missing on your machine (common on new `pip` installs or Python 3.14+), JobAgent detects this and downloads Chromium binaries automatically on first startup. You do not need to run manual terminal commands.
>
> 4. **Safe DRY-RUN Mode Available**:
>    If you want to test the entire automation pipeline safely without actually submitting applications, toggle **Safe DRY-RUN Mode** (`--dry-run` or select `Yes` when prompted). The agent will search, evaluate, load jobs, and fill out forms up to the final review step, then cleanly dismiss the dialog.
>
> 5. **Candidate Profile as Single Source of Truth**:
>    During the first-time setup wizard, JobAgent parses your resume PDF, extracts your technical skills, experience, designation, and target roles, and saves your profile to `candidate_profile.json`. You can update your resume PDF anytime via Option `[8]` or edit preferences via Option `[7]`.

---

## 🚀 Quick Start (Under 60 Seconds)

### 1. Install via pip
```bash
pip install --upgrade jobagent
```

### 2. Launch JobAgent
Run in any terminal (PowerShell, Command Prompt, macOS/Linux Terminal):
```bash
jobagent
```

On your first run:
1. JobAgent guides you through an onboarding wizard to configure your resume, target roles, location, and CTC preferences.
2. Select Option **`[1]`** to log into your LinkedIn / Naukri accounts once.
3. Select Option **`[2]`** to start applying, Option **`[5]`** to launch the Web UI Dashboard, or Option **`[3]`** to chat with the agent!

---

## 🎮 Interactive Menu Options

When you run `jobagent`, you are greeted with the interactive assistant:

```text
=====================================================
           AI Job Application Agent CLI              
  Autonomous Multi-Platform Applications: LinkedIn & Naukri 
=====================================================

What would you like to do?
  [1] 🔑 Sign In / Verify Platform Accounts (Save LinkedIn & Naukri login permanently)
  [2] 🚀 Direct Apply to Jobs (LinkedIn, Naukri, or Both)
  [3] 💬 Chat with Agent (Search & apply, update details, ask questions)
  [4] 📋 View All Applied Jobs (Full history, links & status)
  [5] 🖥️  Launch Professional Web UI Dashboard
  [6] 📄 Run AI ATS Resume Review & Gap Analysis
  [7] ✏️  Edit Candidate Profile & Preferences
  [8] 📎 Update Resume PDF
  [9] 📊 View Session History & Memory Rules
  [0] 🚪 Exit
```

---

## 💻 CLI Command Line Shortcuts

You can also run specific modes directly via CLI flags:

| Command | Action |
|---|---|
| `jobagent` | Launch interactive menu |
| `jobagent --signin` | Open visible browser to sign into LinkedIn/Naukri and save session |
| `jobagent --ui` | Launch Web UI Control Center at `http://127.0.0.1:8000` |
| `jobagent --chat` | Start interactive conversational chat mode |
| `jobagent --applied-jobs` | View full history table of applied jobs (with local timestamps) |
| `jobagent --review-resume` | Run AI ATS Resume Review & Gap Analysis |
| `jobagent --keyword "SDET" --location "Hyderabad" --max-jobs 10` | Direct search & apply |
| `jobagent --keyword "QA" --dry-run` | Run in safe simulation mode (no submissions) |
| `jobagent --auto-approve` | Autonomous mode (skips manual confirmation step) |

---

## 🧠 Core Architecture Highlights

### 1. Strict Technical Skill Matching & Incompatible Stack Gate
- **50% Technical Skills | 30% Experience Fit | 20% Role Relevance**.
- Detects incompatible programming languages and frameworks (e.g. skips Python/C# postings if candidate's core stack is Java/Selenium/Playwright).
- Requires at least 50% technical match before proceeding; non-matching posts are automatically skipped and logged with clear reasoning.

### 2. LinkedIn Multi-Page Search Pagination & Query Precision
- Supports paginating across pages (`start=0, 25, 50, 75...`) to process up to 100+ job applications.
- Enriches short queries (e.g. expanding `"QA"` to `'"QA" OR "Quality Assurance" OR "SDET" OR "Test Automation"'`) to eliminate irrelevant postings.
- Deep scrolling ensures up to 25 job cards per page are extracted.

### 3. Dynamic Form Filling & Memory Engine
- Traverses multi-step Easy Apply and Quick Apply modals.
- Intelligently maps text fields, dropdowns, radio buttons, numbers, and resume uploads.
- Remembers previously answered employer questions (e.g., notice period, CTC, work authorization) in local memory so you never answer the same question twice.

### 4. Human-in-the-Loop (HITL) Gate
- Pause before submitting each job application to inspect candidate CTC, notice period, and match breakdown, or enable **Auto-Apply** for 100% autonomous operation.

---

## 🛠️ Troubleshooting & FAQs

### Q: Why is LinkedIn asking for login again?
Run Option **`[1] 🔑 Sign In / Verify Platform Accounts`** (or `jobagent --signin`). Sign into LinkedIn completely in the open browser. Once verified, session cookies are saved to `.browser_context/` and persist indefinitely across all future runs.

### Q: What happens if LinkedIn prompts for 2FA or CAPTCHA?
JobAgent detects security challenges, pauses automation, and displays an alert in the console. You can approve the prompt on your mobile LinkedIn app or solve the CAPTCHA in the open browser. The agent automatically detects verification and resumes where it left off.

### Q: How do I change my target location, role, or CTC?
- Select Option **`[7] ✏️  Edit Candidate Profile & Preferences`** from the interactive menu.
- Or select Option **`[8] 📎 Update Resume PDF`** to upload an updated resume.

### Q: Do I need an OpenAI or Gemini API Key?
An API key is **optional**. If you supply `GEMINI_API_KEY` or `OPENAI_API_KEY`, JobAgent uses LLM semantic reasoning. If left empty, JobAgent's built-in offline NLP heuristics perform deterministic extraction and matching automatically.

---

## 📄 License
MIT License. Created & maintained by [Yaswanth Asapu](mailto:yaswanth901@gmail.com).
