DEV Community

LeoJulieta
LeoJulieta

Posted on

How HiringNow Supercharges AI Job‑Application Bots

HiringNow Boosts Searches for AI‑Powered Job‑Application Bots

Introduction

Job hunting used to be a manual marathon—scraping listings, tweaking resumes, and hitting “apply” over and over. Today AI job agents like HiringNow let you automate that entire workflow, and Google Trends shows search interest for “AI job agent” and “apply for jobs automatically” up 300 % in the last six months. In this guide you’ll get a hands‑on walkthrough of the full architecture, a ready‑to‑run Python script, cloud‑deployment tips, prompt engineering tricks, legal safeguards, cost comparisons, and an A/B testing checklist.


Architecture Overview

┌─────────────┐      ┌─────────────────┐      ┌─────────────────────┐
│ Job Scraper │───► │ LLM Prompt Engine│───► │ Application Submitter│
└─────┬───────┘      └───────┬───────────┘      └───────┬─────────────┘
      │                      │                        │
      ▼                      ▼                        ▼
  Scheduler            Prompt Store            Response Logger
Enter fullscreen mode Exit fullscreen mode
  • Job Scraper – pulls listings from LinkedIn, Indeed, or niche boards via public APIs or headless browsers.
  • LLM Prompt Engine – formats the posting, feeds it to an LLM, and receives a customized cover letter and resume excerpt.
  • Application Submitter – fills web forms, uploads files, and handles CAPTCHAs with a human‑in‑the‑loop fallback.
  • Scheduler – runs the pipeline on a configurable cadence (e.g., every 2 h).
  • Response Logger – stores status codes, email replies, and analytics in a PostgreSQL table.

Step‑by‑Step Python Tutorial

Prerequisites: Python 3.10+, requests, beautifulsoup4, openai, selenium, and a PostgreSQL instance.

1. Install dependencies

pip install requests beautifulsoup4 openai selenium psycopg2-binary python-dotenv
Enter fullscreen mode Exit fullscreen mode

2. Load environment variables

# .env
OPENAI_API_KEY=sk-...
PG_URL=postgresql://user:pass@localhost/hiringnow
PROXY_POOL=https://my-proxy-service.com/api/proxies
Enter fullscreen mode Exit fullscreen mode
from dotenv import load_dotenv
import os
load_dotenv()
Enter fullscreen mode Exit fullscreen mode

3. Scrape a job posting (example: Indeed)

import requests
from bs4 import BeautifulSoup
import random
import time

def fetch_indeed_job(job_id: str) -> dict:
    url = f"https://www.indeed.com/viewjob?jk={job_id}"
    headers = {"User-Agent": "Mozilla/5.0"}
    resp = requests.get(url, headers=headers, timeout=10)
    soup = BeautifulSoup(resp.text, "html.parser")
    title = soup.find("h1", {"class": "jobsearch-JobInfoHeader-title"}).text.strip()
    description = soup.find("div", {"id": "jobDescriptionText"}).text.strip()
    return {"title": title, "description": description, "url": url}
Enter fullscreen mode Exit fullscreen mode

4. Generate a tailored cover letter with OpenAI

import openai

def tailor_cover(job: dict, resume_text: str) -> str:
    prompt = f"""You are a professional career coach. Write a concise (150‑200 word) cover letter for the following role.

Job Title: {job['title']}
Job Description: {job['description']}

Candidate Resume (relevant sections only):
{resume_text}

Make sure to highlight the candidate’s experience with Python, data analysis, and project leadership."""
    response = openai.ChatCompletion.create(
        model="gpt-4o-mini",
        messages=[{"role": "user", "content": prompt}],
        temperature=0.7,
        max_tokens=350,
    )
    return response.choices[0].message.content.strip()
Enter fullscreen mode Exit fullscreen mode

5. Submit the application with Selenium

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys

def submit_application(job_url: str, cover_letter: str, resume_path: str):
    options = webdriver.ChromeOptions()
    options.add_argument("--headless")
    # Rotate residential proxy
    proxy = random.choice(requests.get(os.getenv("PROXY_POOL")).json())
    options.add_argument(f'--proxy-server={proxy}')
    driver = webdriver.Chrome(options=options)

    driver.get(job_url)
    time.sleep(random.uniform(5, 12))          # human‑like delay

    # Fill cover letter
    driver.find_element(By.NAME, "coverLetter").send_keys(cover_letter)

    # Upload resume
    driver.find_element(By.NAME, "resume").send_keys(resume_path)

    # Click submit
    driver.find_element(By.XPATH, "//button[contains(text(),'Submit')]").click()
    time.sleep(3)

    # Capture result
    status = driver.current_url
    driver.quit()
    return status
Enter fullscreen mode Exit fullscreen mode

6. Orchestrate the pipeline

import psycopg2

def run_job(job_id: str, resume_path: str):
    job = fetch_indeed_job(job_id)
    with open(resume_path, "r") as f:
        resume_text = f.read()
    cover = tailor_cover(job, resume_text)
    result = submit_application(job["url"], cover, resume_path)

    # Log to PostgreSQL
    conn = psycopg2.connect(os.getenv("PG_URL"))
    cur = conn.cursor()
    cur.execute(
        """
        INSERT INTO applications (job_id, url, status, applied_at)
        VALUES (%s, %s, %s, NOW())
        """,
        (job_id, job["url"], result),
    )
    conn.commit()
    cur.close()
    conn.close()
Enter fullscreen mode Exit fullscreen mode

Schedule run_job with cron, Airflow, or a simple while True loop with time.sleep(7200).


Deploying to the Cloud

Provider Recommended Service Cost (approx.) Why
AWS ECS Fargate + S3 for resume storage $0.10 / hour (pay‑as‑you‑go) Serverless containers, easy VPC for proxy traffic
Google Cloud Cloud Run (container) + Cloud SQL $0.08 / hour Autoscaling to zero, built‑in IAM
Azure Container Apps + Azure Database for PostgreSQL $0.09 / hour Integrated monitoring via Azure Monitor

Dockerfile (minimal)

FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["python", "-m", "scheduler"]
Enter fullscreen mode Exit fullscreen mode

Push to your registry, then point the cloud service to the image. Set environment variables securely via the provider’s secret manager.


Prompt Engineering Tips

Goal Prompt Pattern Example
Resume bullet extraction “Extract the three most relevant bullet points from the following resume section for a data‑science role.” Extract the three most relevant bullet points...
Tone control “Write the cover letter in a confident, but not arrogant, tone.” Add tone: confident to the system message.
Length constraint “Limit the output to 180 words.” Include max_words: 180 in the user prompt.

Best practice: Keep the system message static (career‑coach role) and vary only the job‑specific details. This reduces token usage and improves consistency.


Legal & Compliance Checklist

  1. GDPR / CCPA – Store personal data (resume, cover letters) encrypted at rest; delete after 30 days of successful application unless the user opts to keep it.
  2. Platform TOS – Review LinkedIn, Indeed, and niche board policies; most forbid “automated bulk submissions.” Mitigate by limiting daily submissions per platform (≤ 20) and adding a manual review step for each.
  3. Disclosure – If an employer asks, provide a brief note: “Application generated with AI assistance; all information is accurate.”
  4. Data Residency – For EU candidates, run the scraper and LLM calls from EU‑based VMs to avoid cross‑border transfers.

Cost Comparison of Popular LLMs (per 1 k tokens)

Provider Model Input Cost Output Cost Typical Latency
OpenAI gpt‑4o‑mini $0.0005 $0.0015 120 ms
Anthropic claude‑3.5‑sonnet $0.0010 $0.0030 200 ms
Cohere command‑r‑plus $0.0012 $0.0036 150 ms
Local (Llama‑3‑8B) — $0 (self‑hosted) $0 300 ms (GPU)

Herramienta mencionada: Groq Cloud

Top comments (0)