An enterprise-grade, AI-powered recruitment pipeline that automates the entire candidate lifecycle: from resume ingestion and parsing to intelligent screening and automated interview scheduling.
The Employee Recruiter Agent is a sophisticated autonomous system built on LangGraph. It orchestrates a multi-step workflow designed to reduce the overhead of technical recruiting. By leveraging LLMs (Groq/Gemini) and asynchronous task processing, it ensures high throughput and stateful execution.
- 📄 Intelligent Parsing: Automatically extracts structured JSON data from PDF resumes using specialized LLM prompts.
- 🎯 Advanced Screening: Scores candidates against job descriptions with objective justification.
- 🧠 Autonomous Decisioning: Uses configurable thresholds to decide between scheduling interviews or sending rejections.
- ⏱️ Asynchronous Processing: Handles heavy LLM tasks in the background using Redis and RQ.
- 💾 State Persistence: Maintains workflow state across restarts using MongoDB.
The system follows a directed acyclic graph (DAG) structure managed by LangGraph:
graph TD
START((Start)) --> Load[Load Resume]
Load --> Parse[Parse Resume]
Parse --> Screen[Screen Candidate]
Screen --> Decide{Decision}
Decide -->|Score >= Threshold| Schedule[Schedule Interview]
Decide -->|Score < Threshold| Reject[Send Rejection]
Schedule --> Invite[Send Invite]
Invite --> END((End))
Reject --> END
- API Layer: FastAPI handles incoming requests and provides job status monitoring.
- Worker Layer: RQ (Redis Queue) processes the LangGraph workflows asynchronously.
- Persistence Layer: MongoDB stores the state of each recruitment "thread".
- Core Framework: LangGraph, LangChain Community
- API Framework: FastAPI, Uvicorn
- Task Queue: Redis, RQ (Python-RQ)
- Database: MongoDB (State Checkpointing)
- LLM Providers: Groq (Default), Google Gemini (Optional)
- Document Processing: PDFMiner
Ensure you have the following installed and running:
- Python 3.10+
- Redis Server (
brew install redisordocker run -p 6379:6379 redis) - MongoDB (Local or Atlas)
-
Clone the repository:
git clone https://github.com/yourusername/EmployeeRecuiterAgent.git cd EmployeeRecuiterAgent -
Initialize Environment: Using
uv(recommended) orpip:python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt -
Configure Environment Variables: Create a
.envfile from the example:cp .env.example .env
Required variables:
GROQ_API_KEY=your_groq_api_key MONGODB_URI=mongodb://localhost:27017/recruiter_agent REDIS_URL=redis://localhost:6379
The project includes a Makefile and an orchestration script for professional management:
# Option 1: Start everything (API + Worker)
make run
# Option 2: Individually manage services
make api # Start FastAPI only
make worker # Start RQ Worker onlyAlternatively, use the startup script directly:
chmod +x start.sh
./start.shThis project adheres to professional development standards:
- Logging: Integrated Python
loggingthroughout for better observability. - Robust Env: Specialized shell parsing in
start.shto handle complex.envvalues. - Clean Code: Type hinting and structured error handling in all core utilities.
- Workflow: Automated service management with automated cleanup on exit.
| Command | Description |
|---|---|
make install |
Install all dependencies |
make test |
Run the pytest suite |
make clean |
Remove logs and temporary Python files |
Execute the workflow and wait for the final result.
Endpoint: POST /execute_workflow
Payload:
{
"candidate_info": {
"name": "Jane Doe",
"email": "jane@example.com",
"phone": "+123456789",
"resume_url": "https://example.com/resume.pdf"
},
"thread_id": "unique-session-id-001",
"job_spec": {
"title": "Senior Software Engineer",
"description": "Expert in Python, FastAPI, and AI agents.",
"required_skills": ["Python", "LangChain"]
}
}Enqueue the workflow and get a job_id.
Endpoint: POST /rq/workflow
Response:
{
"status": "ok",
"job_id": "550e8400-e29b-41d4-a716-446655440000"
}Monitor the progress of a background job.
Endpoint: GET /rq?job_id=<job_id>
The graph logic is defined in queues/graph.py. You can adjust the threshold in the decide node or add new nodes for additional steps (e.g., background checks, coding tests).
Run the test suite:
pytest tests/This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ for the recruitment community.
