Autonomous backend system that semantically evaluates resumes, identifies top candidates, proposes interviews, sends them for HR approval, and—only after approval—automatically schedules Google Calendar meetings and emails candidates.
This backend powers the full product.
Frontend repo: https://github.com/parv18050212/ai-recruiter-app
git clone https://github.com/parv18050212/hr_agent
cd hr_agent
python3 -m venv .venv
source .venv/bin/activate # Windows: .\.venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # Add DATABASE_URL, keys, etc.
# Add Google OAuth credentials.json in root
python get_token.py # Creates token.json after browser auth
uvicorn hr_agent.app.main:app --reloadOpen → http://127.0.0.1:8000/docs
- Upload PDF
- Text extracted + embedded using Google Gemini
- Stored inside Postgres pgvector
- Compared against job vectors → similarity score
- LangGraph pipeline interprets candidate-job match
- If strong match → create
PENDINGinterview record
Agent cannot book interviews automatically.
HR must approve via /pending-interviews/{id}/approve.
After approval:
- Google Calendar booking
- Meet link creation
- Automated Gmail email to candidate
/my-applications/{email}
HR feedback stored for future model improvements.
┌───────────────────────────────┐
│ React UI │
│ (candidate + HR dashboards) │
└──────────────┬────────────────┘
│
▼
┌───────────────────┐
│ FastAPI │
│ REST + Handlers │
└───────┬───────────┘
│
┌─────────────────────┼─────────────────────┐
▼ ▼ ▼
[Resume Parser] [Gemini Embeddings] [LangGraph Agent]
Extract text Store vectors in Decide fit → propose
in Python Postgres(pgvector) interview
┌───────────────────┐
│ HR Approval UI │
└─────────┬─────────┘
▼
[Google Calendar API]
[Gmail Automated Emails]
- FastAPI (REST API)
- LangChain + LangGraph (agent workflow)
- Gemini Embeddings
- PostgreSQL + pgvector
- Google Calendar API
- Gmail API
- Python 3.10+
- Uvicorn
- Pydantic
- SQLAlchemy
.env.example includes:
DATABASE_URL="postgresql://user:pass@host/db"
GOOGLE_API_KEY="AIza..."
LANGCHAIN_TRACING_V2=true
LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
LANGCHAIN_API_KEY="lsv2_..."
GOOGLE_OAUTH_CREDENTIALS="credentials.json"CREATE EXTENSION IF NOT EXISTS vector;- Google Cloud Console → Create Project
- Enable:
- Google Calendar API
- Gmail API
- OAuth → External → Add test users
- Create Desktop OAuth Client → download credentials.json
- Place file in project root
- Run:
python get_token.pyGenerates token.json.
curl -X POST "http://127.0.0.1:8000/jobs" -H "Content-Type: application/json" -d '{"title":"Backend Engineer","description":"Python + FastAPI","location":"Remote"}'curl -X POST "http://127.0.0.1:8000/jobs/1/candidates" -F "name=Parv" -F "[email protected]" -F "resume=@/path/resume.pdf"curl http://127.0.0.1:8000/pending-interviewscurl -X POST http://127.0.0.1:8000/pending-interviews/42/approvecurl http://127.0.0.1:8000/my-applications/[email protected]- Agent never books without HR approval
- Google token.json required only once
- Vector dims depend on embedding model
- Minimal PII stored
- Embeddings cached where possible
- ATS integrations (Greenhouse / Lever)
- Better UI for HR review
- Full audit logging
- Explainability layer for ranking
- Multi-round interview planning
MIT License.
Feel free to fork, extend, or deploy.