added the readme, code, requirements.txt

This commit is contained in:
Madhu 2024-12-21 12:27:05 +05:30
parent abc0c10e55
commit 0504c5c288
4 changed files with 133 additions and 9 deletions

View file

@ -1,4 +0,0 @@
# Environment variables and secrets
.env
.env.*
*.env

View file

@ -0,0 +1,103 @@
# AI Recruitment Agent Team
An Agentic recruitment system built on phidata and Streamlitthat automates the technical hiring proces which helps the lives of recruiters easy. The agent team consists of multiple specialized agents working together to handle resume analysis, interview scheduling with zoom and candidate communications.
## Demo
## Features
- **Automated Resume Analysis**
- Skills Matching based on the role requirements - [AI/ML Engineer, Frontend Engineer, Backend Engineer]
- Experience Assessment- If the resume clears 70% of the requirements, the candidate is selected for the next round
- **Automated Communications**
- Acceptance Email and a Technical Interview Email
- Rejection Feedback
- Interview Scheduling with Zoom
- **Intelligent Scheduling**
- Automated Zoom Meeting Setup
- Timezone Management
- Calendar Integration
- Reminder System
## Important Things to do before running the application
- Create/Use a new Gmail account for the recruiter
- Enable 2-Step Verification and generate an App Password for the Gmail account
- The App Password is a 16 digit code (use without spaces) that should be generated here - [Google App Password](https://support.google.com/accounts/answer/185833?hl=en) Please go through the steps to generate the password - it will of the format - 'afec wejf awoj fwrv' (remove the spaces and enter it in the streamlit app)
- Create/ Use a Zoom account and go to the Zoom App Marketplace to get the API credentials :
[Zoom Marketplace](https://marketplace.zoom.us)
- Go to Developer Dashboard and create a new app - Select Server to Server OAuth and get the credentials, You see 3 credentials - Client ID, Client Secret and Account ID
- After that, you need to add a few scopes to the app - so that the zoom link of the candidate is sent and created through the mail.
- The Scopes are meeting:write:invite_links:admin, meeting:write:meeting:admin, meeting:write:meeting:master, meeting:write:invite_links:master, meeting:write:open_app:admin, user:read:email:admin, user:read:list_users:admin, billing:read:user_entitlement:admin, dashboard:read:list_meeting_participants:admin [last 3 are optional]
## How to Run
1. **Setup Environment**
```bash
# Clone the repository
git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
cd ai_agent_tutorials/ai_recruitment_agent_team
# Install dependencies
pip install -r requirements.txt
```
2. **Configure API Keys**
- OpenAI API key for GPT-4o access
- Zoom API credentials (Account ID, Client ID, Client Secret)
- Email App Password of Recruiter's Email
3. **Run the Application**
```bash
streamlit run ai_recruitment_agent_team.py
```
## System Components
- **Resume Analyzer Agent**
- Skills matching algorithm
- Experience verification
- Technical assessment
- Selection decision making
- **Email Communication Agent**
- Professional email drafting
- Automated notifications
- Feedback communication
- Follow-up management
- **Interview Scheduler Agent**
- Zoom meeting coordination
- Calendar management
- Timezone handling
- Reminder system
- **Candidate Experience**
- Simple upload interface
- Real-time feedback
- Clear communication
- Streamlined process
## Technical Stack
- **Framework**: Phidata
- **Model**: OpenAI GPT-4o
- **Integration**: Zoom API, EmailTools Tool from Phidata
- **PDF Processing**: PyPDF2
- **Time Management**: pytz
- **State Management**: Streamlit Session State
## Disclaimer
This tool is designed to assist in the recruitment process but should not completely replace human judgment in hiring decisions. All automated decisions should be reviewed by human recruiters for final approval.
## Future Enhancements
- Integration with ATS systems
- Advanced candidate scoring
- Video interview capabilities
- Skills assessment integration
- Multi-language support

View file

@ -13,10 +13,8 @@ from phi.model.openai import OpenAIChat
from phi.tools.email import EmailTools
from phi.tools.zoom import ZoomTool
from phi.utils.log import logger
from dotenv import load_dotenv
from streamlit_pdf_viewer import pdf_viewer
load_dotenv()
class CustomZoomTool(ZoomTool):
@ -93,7 +91,7 @@ def init_session_state() -> None:
defaults = {
'candidate_email': "", 'openai_api_key': "", 'resume_text': "", 'analysis_complete': False,
'is_selected': False, 'zoom_account_id': "", 'zoom_client_id': "", 'zoom_client_secret': "",
'email_sender': "", 'email_passkey': "", 'company_name': ""
'email_sender': "", 'email_passkey': "", 'company_name': "", 'current_pdf': None
}
for key, value in defaults.items():
if key not in st.session_state:
@ -362,7 +360,23 @@ def main() -> None:
role = st.selectbox("Select the role you're applying for:", ["ai_ml_engineer", "frontend_engineer", "backend_engineer"])
with st.expander("View Required Skills", expanded=True): st.markdown(ROLE_REQUIREMENTS[role])
resume_file = st.file_uploader("Upload your resume (PDF)", type=["pdf"])
# Add a "New Application" button before the resume upload
if st.button("📝 New Application"):
# Clear only the application-related states
keys_to_clear = ['resume_text', 'analysis_complete', 'is_selected', 'candidate_email', 'current_pdf']
for key in keys_to_clear:
if key in st.session_state:
st.session_state[key] = None if key == 'current_pdf' else ""
st.rerun()
resume_file = st.file_uploader("Upload your resume (PDF)", type=["pdf"], key="resume_uploader")
if resume_file is not None and resume_file != st.session_state.get('current_pdf'):
st.session_state.current_pdf = resume_file
st.session_state.resume_text = ""
st.session_state.analysis_complete = False
st.session_state.is_selected = False
st.rerun()
if resume_file:
st.subheader("Uploaded Resume")
col1, col2 = st.columns([4, 1])
@ -378,7 +392,6 @@ def main() -> None:
with col2:
st.download_button(label="📥 Download", data=resume_file, file_name=resume_file.name, mime="application/pdf")
if st.button("🗑️ Clear"): st.session_state.resume_text = ""; st.rerun()
# Process the resume text
if not st.session_state.resume_text:
with st.spinner("Processing your resume..."):

View file

@ -0,0 +1,12 @@
# Core dependencies
phidata==2.7.3
streamlit==1.40.2
PyPDF2==3.0.1
streamlit-pdf-viewer==0.0.19
requests==2.32.3
pytz==2023.4
typing-extensions>=4.9.0
# Optional but recommended
black>=24.1.1 # for code formatting
python-dateutil>=2.8.2 # for date parsing