This project is a lightweight AI-powered agent designed to streamline JIRA management by automatically generating user stories and test cases. It integrates a fine-tuned model with a simple backend–frontend setup for seamless interaction.
This project uses a seperated/microservices structure where layers are self-contained within their own folders, i.e. backend/ and frontend/.
jira-agent/
├───LoRA/ # Contains files to fine tune model
│
├───backend/
│ ├───main.py
│ │
│ ├───api/
│ │ ├───routes.py # Exposes API endpoints
│ │ │
│ │ ├───handlers/ # Contains handler functions for respective routes
│ │ └───models/ # Contains data schemas
│ │
│ └───services/
│ └───pipeline.py # Exposes model
│
└───frontend/ # Holds frontend files
└───static/ # Holds CSS, JS, Images, Icons, ...Note: The file structure above does not include all the files, i.e. .env, etc...
All the resources needed to fine tune the model are found within LoRA/.
A .env is required with a HF_USERNAME key containing the username of your Huggingface account. This is used when uploading the fine tuned model to Huggingface!
-
Fine tuning the Model
python LoRA/lora_training.py --task story --maxlines 100 python LoRA/lora_training.py --task test --maxlines 100 -
Uploading the fine tuned Model to Huggingface Use command generated by Python script
python LoRA/utils/push_tuned_to_hf.py
Follow these steps to get your development environment set up and operational:
-
Clone the Repository
git clone https://github.com/dotping-me/jira-agent.git cd jira-agent -
Install Dependencies
pip install -r requirements.txt
-
Set up
.envJIRA_KEY=your-jira-key-here JIRA_EMAIL=your-jira-account@email.com
Note: This shouldn't normally be exposed in a
README.md! -
Start Server (Backend + Frontend)
- Using
uvicornCLIuvicorn backend.main:app --port 8000 --reload
- Python Script directly
python backend/main.py
- Using
-
Test Routes
- Use
Postman - Use
curl:- Testing AI/ML endpoint
curl -X POST -H "Content-Type: application/json" -d "{\"prompt\": \"Login with third-party platforms\"}" "http://127.0.0.1:8000/api/prompt"
- Testing JIRA endpoint
curl -X POST -H "Content-Type: application/json" -d "{\"project_domain\": \"https://yout-domain.atlassian.net/\", \"project_or_epic_key\": \"SCRUM\", \"epic_prompt\": \"Login with third-party apps\", \"user_stories\": [\"As a user, I want to log in using third-party apps like Google and Facebook.\"], \"test_cases\": [\"Verify login using Google or Facebook works.\"]}" "127.0.0.1:8000/api/jira"
- Testing AI/ML endpoint
- Use
Note: The HF Transformer we are using is 3.3 GiBs in size. Thank you!