Skip to content

niluferdogan/hragent

Repository files navigation

🧑‍💼 HR Agent — Copilot Studio

An HR Agent built with Python, designed to integrate with Copilot Studio or Azure AI Foundry.

Architecture

┌─────────────────────────────────────────────┐
│         Copilot Studio / Client App         │
└──────────────────┬──────────────────────────┘
                   │ POST /api/chat
┌──────────────────▼──────────────────────────┐
│              FastAPI REST API                │
└──────────────────┬──────────────────────────┘
                   │
┌──────────────────▼──────────────────────────┐
│          🤖 Orchestrator Agent              │
│       (LLM-based intent classification)     │
├─────────────────┬───────────────────────────┤
│                 │                           │
▼                 ▼                           │
┌──────────┐  ┌──────────────┐               │
│ 📚 HR    │  │ 🏖️ Leave     │               │
│ Knowledge│  │    Agent     │               │
│  Agent   │  │              │               │
└────┬─────┘  └──────┬───────┘               │
     │               │                       │
     ▼               ▼                       │
┌──────────┐  ┌──────────────┐               │
│ Azure AI │  │  Microsoft   │               │
│ Search   │  │  Dataverse   │               │
│ (RAG)    │  │ (Leave CRUD) │               │
└────┬─────┘  └──────────────┘               │
     │                                       │
     ▼                                       │
┌──────────┐                                 │
│ Azure    │                                 │
│ Blob     │                                 │
│ Storage  │                                 │
│ (PDF/    │                                 │
│  Word)   │                                 │
└──────────┘                                 │

Features

Feature Description
Agent-to-Agent Orchestrator → HR Knowledge + Leave Agent
RAG Azure AI Search over Employee Handbook documents
Unstructured Docs PDF/Word processing from Blob Storage
Leave Management Leave requests, balance, and history via Dataverse
Client App Copilot Studio custom connector compatible REST API

Prerequisites

  • Python 3.11+
  • Azure subscription (OpenAI, AI Search, Blob Storage)
  • Microsoft Dataverse environment (for leave management)

Quick Start

# 1. Set up environment
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

# 2. Configure environment variables
cp .env.sample .env   # Edit the .env file with your values

# 3. Index documents
python -m src.indexer.index_documents

# 4. Run locally
uvicorn src.api.main:app --reload --port 8000

Project Structure

hragent/
├── src/
│   ├── agents/
│   │   ├── base_agent.py          # Abstract base class
│   │   ├── orchestrator.py        # Main agent (routing)
│   │   ├── hr_knowledge_agent.py  # RAG — Employee Handbook
│   │   └── leave_agent.py         # Leave management — Dataverse
│   ├── tools/
│   │   ├── search_tool.py         # Azure AI Search
│   │   ├── document_tool.py       # Blob Storage PDF/Word
│   │   └── dataverse_tool.py      # Dataverse Web API
│   ├── indexer/
│   │   ├── document_processor.py  # Chunking + categorization
│   │   └── index_documents.py     # Indexing pipeline
│   ├── api/
│   │   ├── main.py                # FastAPI endpoints
│   │   └── models.py              # Request/response schemas
│   └── config.py                  # Settings
├── tests/                         # Unit tests
├── docs/                          # HR documents (PDF/Word)
└── data/sample/                   # Sample data

API Endpoints

Method Path Description
POST /api/chat Main chat endpoint
GET /api/health Health check
POST /api/index Trigger document indexing

Running Tests

pytest tests/ -v

About

HR Agent for Copilot Studio — Agent-to-Agent orchestration with RAG (Azure AI Search) and Leave Management (Dataverse)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

No contributors

Languages