How mr-aicoder/hirecopilot--automatic_hiring_agent works
Project Type and Purpose
• This is a full-stack, multi-agent AI application with a Streamlit UI, LangGraph orchestrator, LangChain agents, a local database, and external LLM/knowledge-base integrations.
• Primary purpose: automate hiring workflows (JD generation, resume screening, interview prep).
Main Components
A. User Interface (Streamlit)
• Entry point: main.py (invoked via streamlit run app.py)
• Handles user inputs: job title form, resume file uploads, candidate selection dropdown
B. Orchestration Layer (LangGraph Pipelines)
• graphs/jd_graph.py → JD-generation pipeline
• graphs/screening_graph.py → resume-screening pipeline
C. Agent Modules (LangChain Agents)
• MarketResearchAgent
• JDCrafterAgent
• InclusivityAgent
• ResumeParserAgent
• ScreeningAgent
• SummarizerAgent
• InterviewQuestionAgent
D. Utility Layer
• utils/llm_provider.py → abstracts LLM API calls (OpenAI, Google)
• utils/output_parsers.py → post-processes agent outputs into structured data
• utils/database.py → CRUD on SQLite (hirecopilot.db)
E. Data Stores & Knowledge Base
• Local SQLite database (hirecopilot.db) to persist JDs, parsed resumes, scores, summaries
• RAG knowledge base (rag_source/inclusivity_knowledge_base.md) used by InclusivityAgent
F. External Services
• OpenAI API (text generation, embedding)
• Google API (market research)
Interactions & Data Flow
1. User → Streamlit UI
• Submits job title → triggers JD pipeline
• Uploads resumes → triggers screening pipeline
• Selects candidate → triggers interview-prep pipeline
2. UI → Graph Orchestrator
• Calls the appropriate pipeline graph module
3. Orchestrator → Agents
• Each pipeline node invokes one or more agent modules
• Agents use llm_provider to call LLMs and output_parsers to structure results
• InclusivityAgent also reads the RAG knowledge-base markdown
4. Agents → Database
• Parsed and scored data is stored/retrieved via utils/database.py
5. UI ← Orchestrator
• Renders final outputs: generated JD text, screening scores & rationale, interview questions
Architectural Patterns & Principles
• “Separation of Concerns”: UI / Orchestration / Agents / Data-access are distinct layers
• Directed pipelines (DAG style) via LangGraph for composable workflows
• Stateless agents with side-effects (DB writes) managed centrally
• RAG integration for domain-specific knowledge
• Modular design: easily add/remove agents or new pipelines
Essential Labels & Notations
• Component names exactly as in code (e.g., JDCrafterAgent, utils/database.py)
• Pipelines named “JD Generation Pipeline” and “Resume Screening Pipeline”