Skip to content

Sravya2007/Agent_X_it_Nasiko

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X-it: The Dual-Brain HR Assistant Agent

This is an advanced HR Assistant built on the A2A (Agent-to-Agent) compatible agent template. X-it serves two primary functions: conducting conversational exit interviews to generate detailed PDF summaries, and acting as an HR Data Analyst to generate aggregate attrition reports and charts. It implements the A2A JSON-RPC 2.0 protocol using FastAPI, giving you complete control over your stack.

Frameworks

  • Server: FastAPI

  • Agent Logic: LangChain (Pre-configured)

  • Data & Reporting: Pandas, Matplotlib, FPDF2

Structure

  • src/main.py: Protocol Implementation. A FastAPI server that handles the A2A JSON-RPC message/send requests.

  • src/models.py: Data Models. A2A protocol Pydantic models (Message, Task, etc.).

  • src/tools.py: Tools Definition. Contains the dual-tool logic (exit_interview_summary and generate_aggregate_attrition_report) for generating the dynamic HR PDFs.

  • src/agent.py: Core Logic. Configures the LangChain agent and tools, featuring the customized "Dual-Brain" routing system prompt.

  • src/attrition_data.csv: Dataset. The database tracking employee tenure, departments, reasons for leaving, and suggestions.

  • AgentCard.json: Agent metadata (auto-generated).

  • Dockerfile: Standard Python Dockerfile.

How to Use

  1. Prepare your Data: Ensure attrition_data.csv contains your up-to-date employee records.

  2. Customize (Optional): Edit src/tools.py or src/agent.py if you need to adjust PDF formatting or the LangChain agent's behavior.

  3. Build and Run:

    docker build -t x-it-agent .
    docker run -p 5000:5000 -e OPENAI_API_KEY=your_key x-it-agent

Protocol Details

This template implements:

  • POST /: JSON-RPC 2.0 endpoint.
    • Method: message/send
    • Params: A2A Message format

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors