Skip to content

numericalmachinelearning/job_hunting_multi_agent_system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Multi-Agent Job Matching System

A lightweight multi-agent workflow system that automatically searches for job postings and matches them against a candidate's CV using AI agents.

✨ Features

  • Multi-Agent Architecture: Supervisor coordinates two specialized worker agents
  • Intelligent Job Search: ReAct agent that searches across LinkedIn, Indeed, and Glassdoor
  • CV Analysis: AI-powered matching with detailed recommendations
  • In-Memory State Management: Simple state store for workflow coordination
  • Modular Design: Clean separation between agents and tools

🏗️ Architecture

┌─────────────────────────────────────────────┐
│           Supervisor Agent                  │
│  (Orchestrates workflow & manages state)    │
└──────────────┬──────────────┬───────────────┘
               │              │
       ┌───────▼──────┐  ┌────▼──────────┐
       │ JobRetriever │  │  CVAnalyst    │
       │    Agent     │  │     Agent     │
       └──────┬───────┘  └───────────────┘
              │
       ┌──────▼──────────┐
       │  Tavily Search  │
       │      Tool       │
       └─────────────────┘

📁 Project Structure

.
├── agents/
│   ├── __init__.py
│   ├── supervisor_agent.py      # Orchestrates workflow
│   ├── job_retriever_agent.py   # Searches for jobs
│   └── cv_analyst_agent.py      # Analyzes CV matches
├── tools/
│   ├── __init__.py
│   └── job_search_tools.py      # Tavily search implementation
├── main.py                      # Entry point
├── cv.txt                       # Your CV (not tracked)
├── .env                         # API keys (not tracked)
├── requirements.txt
└── README.md

🚀 Getting Started

Prerequisites

  • Python 3.8+
  • OpenAI API key
  • Tavily API key

Installation

  1. Clone the repository
git clone https://github.com/yourusername/multi-agent-job-matcher.git
cd multi-agent-job-matcher
  1. Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies
pip install -r requirements.txt
  1. Set up environment variables

Create a .env file in the root directory:

OPENAI_API_KEY=your_openai_api_key_here
TAVILY_API_KEY=your_tavily_api_key_here

Get your API keys:

  1. Create your CV file

Create a cv.txt file with your CV content:

cp cv.example.txt cv.txt
# Edit cv.txt with your information

Usage

Run the job matching system:

python main.py

The system will:

  1. Read your CV from cv.txt
  2. Search for "machine learning engineer" jobs in "San Francisco"
  3. Analyze each job against your CV
  4. Provide ranked matches with recommendations

Customization

Edit main.py to change search parameters:

# Define search parameters
job_query = "data scientist"  # Change job title
location = "New York"         # Change location

🔧 Components

Supervisor Agent

  • Manages overall workflow
  • Coordinates between worker agents
  • Maintains in-memory state
  • Provides execution logs

Job Retriever Agent

  • ReAct agent with Tavily search tool
  • Filters results from job boards
  • Returns structured job data
  • Handles search errors gracefully

CV Analyst Agent

  • Analyzes CV-job compatibility
  • Provides match scores (0-100)
  • Lists matching skills
  • Identifies missing requirements
  • Offers actionable recommendations

📊 Example Output

STARTING JOB MATCHING WORKFLOW
================================================================================

[Supervisor] Step 1: Storing CV in state...
[Supervisor] Step 2: Delegating job search to JobRetriever...
[Supervisor] Query: machine learning engineer, Location: San Francisco

[Supervisor] Retrieved 5 job postings

[Supervisor] Step 3: Delegating CV analysis to CVAnalyst...

WORKFLOW COMPLETED
================================================================================

RESULTS SUMMARY
================================================================================

Jobs Found: 5

MATCH ANALYSIS
--------------------------------------------------------------------------------
Job Rankings:

1. Senior ML Engineer at TechCorp (Match: 85/100)
   ✓ Matching: Python, TensorFlow, Production ML
   ✗ Missing: Kubernetes experience
   → Strong match - apply immediately

2. Data Scientist at StartupXYZ (Match: 72/100)
   ...

🛠️ Development

Testing Individual Agents

Each agent can be tested independently:

# Test Job Retriever
python agents/job_retriever_agent.py

# Test CV Analyst
python agents/cv_analyst_agent.py

# Test Supervisor
python agents/supervisor_agent.py

📝 Requirements

  • langchain
  • langchain-openai
  • tavily-python
  • python-dotenv
  • openai

See requirements.txt for specific versions.

🤝 Contributing

Contributions are welcome! Feel free to:

  • Add new job search sources
  • Improve matching algorithms
  • Add more worker agents
  • Enhance state management

📄 License

MIT License - feel free to use this project for your job search!

⚠️ Privacy Note

  • Never commit your cv.txt or .env files
  • Keep your API keys secure
  • This system processes data locally (CV analysis happens via API calls)

🔮 Future Enhancements

  • Add more job boards (Monster, ZipRecruiter)
  • Implement persistent state (SQLite/Redis)
  • Add resume optimization suggestions
  • Create web interface
  • Add email notifications for new matches
  • Support multiple CV formats (PDF, DOCX)

📧 Contact

Questions? Open an issue or reach out!


Happy job hunting! 🎯

About

A lightweight multi-agent workflow system that automatically searches for job postings and matches them against a candidate's CV using AI agents.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages