An intelligent multi-agent recruitment system that automates candidate discovery, evaluation, and outreach using AI.
- Hybrid Candidate Search - Combines LinkedIn API with MongoDB for efficient candidate discovery
- AI Evaluation - GPT-powered candidate scoring with relevance grading (A/B/C/D)
- Smart Filtering - Location-based and skill-based candidate relevance matching
- Multi-Channel Outreach - LinkedIn and email campaign management
- REST API - Full API for integration with external systems
# Clone and setup
git clone <repository-url>
cd Recruitment-agent
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your credentialsCreate a .env file with:
# OpenAI
OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4
# MongoDB
MONGO_URI=mongodb+srv://...
MONGO_DATABASE=AIcruiter
# LinkedIn (Unipile)
UNIPILE_API_KEY=...
UNIPILE_ACCOUNT_ID=...Start API Server:
python main.py api --port 8000Access:
- API Docs: http://localhost:8000/docs
- Health Check: http://localhost:8000/health
curl -X POST "http://localhost:8000/api/search/candidates" \
-H "Content-Type: application/json" \
-d '{
"project_id": "1234567890",
"search_criteria": {
"keywords": ["Developer", "Python"],
"location": "Netherlands",
"job_title": "Software Engineer"
},
"target_count": 50
}'curl "http://localhost:8000/api/search/candidates/{project_id}"curl -X POST "http://localhost:8000/api/evaluation/evaluate" \
-H "Content-Type: application/json" \
-d '{
"project_id": "1234567890",
"candidate_ids": ["candidate_1", "candidate_2"]
}'Recruitment-agent/
├── main.py # Application entry point
├── agents/ # Core agents
│ ├── database_agent.py # Database operations
│ ├── recruitment_executive.py
│ └── sourcing_manager_unified.py
├── sub_agents/ # Specialized agents
│ ├── candidate_serching_agent.py
│ ├── candidate_evaluation_agent.py
│ └── profile_scraping_agent.py
├── src/
│ ├── application/ # Use cases & orchestrators
│ ├── domain/ # Domain models
│ ├── infrastructure/ # External services
│ └── presentation/ # API routes & CLI
├── tools/ # LinkedIn & database tools
├── config/ # Configuration
└── test/ # Test suite
┌─────────────────────────────────────────────────┐
│ REST API / CLI │
└─────────────────────┬───────────────────────────┘
│
┌─────────────────────▼───────────────────────────┐
│ RecruitmentExecutiveAgent │
│ (Main Orchestrator) │
└─────────────────────┬───────────────────────────┘
│
┌─────────────┼─────────────┐
▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────┐
│ Sourcing │ │Evaluation │ │ Outreach │
│ Manager │ │ Agent │ │ Manager │
└─────┬─────┘ └───────────┘ └───────────┘
│
▼
┌───────────────────────────────────────────────┐
│ CandidateSearchingAgent │
│ (Hybrid: MongoDB + LinkedIn Search) │
└─────────────────────┬─────────────────────────┘
│
┌─────────────┴─────────────┐
▼ ▼
┌───────────────┐ ┌───────────────┐
│ MongoDB │ │ LinkedIn API │
│ (prospects) │ │ (Unipile) │
└───────────────┘ └───────────────┘
Candidates are scored (0-100) based on:
| Factor | Points | Description |
|---|---|---|
| Location | 40 | Match with target location |
| Job Title | 30 | Keywords in title/headline |
| Skills | 20 | Matching required skills |
| Profile | 10 | Profile completeness |
Grades:
- A (90+): Excellent match
- B (70-89): Good match
- C (50-69): Moderate match
- D (30-49): Low match
- F (<30): Filtered out
pytest test/ -v# Format
black .
# Lint
flake8 .- Python 3.11+
- FastAPI - REST API framework
- MongoDB - Database
- LangChain - AI agent framework
- OpenAI GPT - Language model
- Unipile - LinkedIn API provider
MIT