Skip to content

prasad-yashdeep/JobSearchAgent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Job Search Agent

A multi-agent job search system using OpenAI Agents SDK to find and prioritize job opportunities from LinkedIn.

Features

  • 4 Specialized Agents: Discovery, Enricher, Ranker, and Manager (orchestrator)
  • Smart Scoring: Relevance (title + skills + keywords) and Priority (recency + competition + referral opportunities)
  • Metadata Extraction: Recruiter contact info, post engagement, company connections
  • Scheduled Runs: APScheduler for automated daily/weekly searches
  • Markdown Reports: Human-readable output with job details and apply links

Architecture

                    +------------------------+
                    |   Job Search Manager   |
                    |      (Orchestrator)    |
                    +------------------------+
                              |
          +-------------------+-------------------+
          |                   |                   |
          v                   v                   v
  +---------------+   +---------------+   +---------------+
  | Job Discovery |   | Job Enricher  |   | Job Ranker    |
  |    Agent      |   |    Agent      |   |    Agent      |
  +---------------+   +---------------+   +---------------+
          |                   |                   |
          v                   v                   v
  [LinkedIn MCP]      [LinkedIn MCP]      [Custom Tools]

Prerequisites

  • Python 3.11+
  • uv (recommended) or pip
  • Node.js 18+ (for LinkedIn MCP server)
  • HarvestAPI Key (for LinkedIn data access)
  • OpenAI API Key (for agents)

Installation

1. Clone the repository

git clone https://github.com/yourusername/JobSearchAgent.git
cd JobSearchAgent

2. Install uv (if not already installed)

# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Or with Homebrew
brew install uv

3. Create virtual environment and install dependencies

# Create virtual environment
uv venv .venv

# Activate it
source .venv/bin/activate  # macOS/Linux
# or
.venv\Scripts\activate     # Windows

# Install dependencies
uv pip install -e ".[dev]"

4. Install LinkedIn MCP Server

# Clone the LinkedIn MCP server
git clone https://github.com/Jing-yilin/linkedin-mcp-server.git
cd linkedin-mcp-server

# Install dependencies and build
npm install
npm run build

# Note the path to the build output
# e.g., /path/to/linkedin-mcp-server/build/index.js

5. Get API Keys

HarvestAPI Key (for LinkedIn data)

  1. Go to HarvestAPI
  2. Sign up and get your API key
  3. This provides access to LinkedIn job listings, posts, profiles, and company data

OpenAI API Key

  1. Go to OpenAI Platform
  2. Create an API key with access to GPT-4

6. Configure Environment Variables

# Copy the example env file
cp .env.example .env

# Edit .env with your API keys

Required variables in .env:

# API Keys (required)
HARVESTAPI_API_KEY=your_harvestapi_key_here
OPENAI_API_KEY=your_openai_api_key_here

# LinkedIn MCP Server path (required)
LINKEDIN_MCP_PATH=/path/to/linkedin-mcp-server/build/index.js

# Optional
PROXY_URL=                    # HTTP/HTTPS proxy if needed

7. Configure Your Profile

Edit data/user_profile.json with your information:

  • Name, email, location
  • Education and graduation date
  • Skills (primary and secondary)
  • Work experience
  • Target roles and levels

Usage

Run a Single Job Search

uv run python -m job_search_agent

Or with custom profile:

uv run python -m job_search_agent --profile /path/to/your_profile.json

Run with Daily Schedule (9 AM every day)

uv run python -m job_search_agent --schedule daily --time 09:00

Run with Weekly Schedule (Monday at 9 AM)

uv run python -m job_search_agent --schedule weekly --time 09:00 --day mon

CLI Options

usage: python -m job_search_agent [-h] [--profile PATH] [--output PATH]
                                   [--schedule {daily,weekly}] [--time HH:MM]
                                   [--day {mon,tue,wed,thu,fri,sat,sun}] [-v]

options:
  --profile PATH        Path to user profile JSON file (default: data/user_profile.json)
  --output PATH         Output directory for reports (default: ./output)
  --schedule {daily,weekly}
                        Run on a schedule instead of once
  --time HH:MM          Time to run scheduled searches (default: 09:00)
  --day DAY             Day of week for weekly schedule (default: mon)
  -v, --verbose         Enable verbose logging

Output

Reports are saved to the output/ directory as Markdown files:

# Job Search Results

**Generated:** 2026-01-17 14:30

## Summary

| Metric | Value |
|--------|-------|
| Total Jobs Found | 127 |
| After Filtering | 34 |
| High Priority (score > 100) | 12 |
| With Referral Opportunity | 5 |

## Top Opportunities

### 1. AI Engineer at OpenAI
**OpenAI** | San Francisco, CA

| Relevance | Priority | Competition | Posted |
|-----------|----------|-------------|--------|
| 95% | 142.5 | low | 2d ago |

**Recruiter:** [Jane Smith](https://linkedin.com/in/janesmith) - [email protected] | *actively recruiting*

[Apply Here](https://linkedin.com/jobs/view/123456)

Scoring Algorithm

Relevance Score (0-1)

  • Title match (40%): Job title contains target role keywords
  • Skill match (40%): Overlap between required skills and user skills
  • Description keywords (20%): AI/ML keywords in job description

Priority Score (0-200+)

Base: relevance_score * 100
+ Recency bonus: max(0, 30 - post_age_days * 5)
+ Low competition: +20 if <5 comments, +10 if <15, +5 if <30
+ Active recruiter: +10
+ Has connection: +15

Running Tests

uv run pytest tests/ -v

Project Structure

JobSearchAgent/
├── pyproject.toml              # Dependencies & project config
├── .env.example                # Environment template
├── data/
│   └── user_profile.json       # Your profile
├── output/                     # Generated reports
├── src/job_search_agent/
│   ├── main.py                 # CLI entry point
│   ├── scheduler.py            # APScheduler for scheduled runs
│   ├── config.py               # Settings management
│   ├── agents/
│   │   ├── manager.py          # Orchestrator agent
│   │   ├── discovery.py        # Job search agent
│   │   ├── enricher.py         # Metadata extraction agent
│   │   └── ranker.py           # Scoring and ranking agent
│   ├── tools/
│   │   └── scoring.py          # Relevance & priority algorithms
│   ├── models/
│   │   ├── job.py              # Job, Recruiter, Company models
│   │   └── user_profile.py     # User profile model
│   ├── mcp/
│   │   └── linkedin_server.py  # LinkedIn MCP integration
│   └── output/
│       └── formatter.py        # Report generation
└── tests/
    └── test_scoring.py         # Scoring function tests

Troubleshooting

"HARVESTAPI_API_KEY environment variable is required"

Make sure you've created .env file with your API key:

cp .env.example .env
# Edit .env with your actual API key

LinkedIn MCP Server connection failed

  1. Verify the LINKEDIN_MCP_PATH points to the correct build/index.js
  2. Make sure Node.js is installed: node --version
  3. Rebuild the MCP server: cd linkedin-mcp-server && npm run build

Rate limiting errors

The LinkedIn API has rate limits. If you encounter them:

  • Wait a few minutes before retrying
  • Consider using a proxy (PROXY_URL in .env)
  • Reduce search frequency

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages