How aneeshbukya/empowerhr--ai-powered-hr-agents works
Project type and purpose
• EmpowerHR is a full-stack Django web application that automates HR tasks using AI.
• Key user-facing functions: candidate note summarization, FAQ answering from a policy doc, and sending onboarding emails.
File structure
• Top-level “HRAgentUI/” directory contains the Django project:
• HRAgentUI/HRAgentUI/ – Django settings, URL router, ASGI/WSGI entry points, view modules (email.py, faq.py, notes.py)
• templates/ – HTML pages for home, about, notes, faq, onboarding
• static/ – CSS and JS assets per feature
• db.sqlite3 & HRAgentUI/db/ – SQLite database plus a Chroma vector store (embeddings in .bin files)
• Dockerfile, .dockerignore, Procfile, fly.toml – containerization and deployment config
• There’s also a top-level “src/main.py” script (likely CLI or orchestration) and a docs folder holding the Employee Code of Conduct .docx
README for additional insights
• Confirms use of Django (MVT pattern), smtplib/ssl for email, dotenv for env variables, and a custom “crewai” library for defining AI agents/tasks.
• External dependencies: OpenAI, SERPER, EXA APIs
a. Components to include
• Client (Web Browser)
• Django App Server
– URL Router
– Controllers/Views: HomeController, NotesAgentController, FAQAgentController, OnboardingController
– Agent Layer (crewai): NoteSummarizerAgent, FAQAgent, EmailAgent
– Data Access Layer: Django ORM + raw Chroma API for embeddings
• Databases
– SQLite (relational data, user sessions, metadata)
– Chroma vector store (binary .bin files under /db for embedding search)
• File Store: local docs directory with Employee-Code-of-Conduct.docx
• External Services
– OpenAI API (language model calls)
– SERPER API (search)
– EXA API (if used)
– SMTP Server (Gmail via smtplib/ssl)
• Deployment
– Docker Container (Dockerfile)
– PaaS (Fly.io via fly.toml)
b. Relationships and interactions
• View → Agent Layer → External AI APIs / Vector DB
• NotesAgentController:
→ reads uploaded text file → passes to NoteSummarizerAgent → optionally stores/fetches embeddings from Chroma → returns summary to template
• FAQAgentController:
→ loads .docx policy file → creates embeddings or searches Chroma → calls OpenAI to generate answers → displays response
• OnboardingController:
→ collects form data → EmailAgent composes content via OpenAI → sends via SMTP server
• Django ORM ↔ SQLite for user uploads, logs, metadata
c. Architectural patterns and design principles
• Django’s MVT (Model-View-Template) separates concerns
• Agent-based modularization: each HR function encapsulated in its own controller + crewai agent
• Vector store abstraction for retrieval-augmented generation (RAG)
• Containerization for reproducible deployments
d. Key technologies/frameworks
• Backend: Python 3.x, Django
• Frontend: Django Templates + static CSS/JS
• Datastores: SQLite, Chroma vector DB
• AI & search: OpenAI API, SERPER API, crewai library
• Email: smtplib + ssl
• DevOps: Docker, Fly.io