om192006/github-issue-triage
๐ GitHub Issue Triage โ OpenEnv Environment
Meta PyTorch OpenEnv Hackathon ร Scaler School of Technology Team Astra.AI ยท Om Chougule (Lead) ยท Shraman Patil
What is this?
A real-world Reinforcement Learning environment where an AI agent reads GitHub issues and performs structured triage decisions โ the exact task that software engineers do dozens of times per day.
The agent must:
- Read an issue title, body, author, and existing comments
- Assign a label (bug / feature / docs / question)
- Route it to the correct team (frontend / backend / ml / devops / docs)
- Score its priority (critical / high / medium / low)
- Suggest a concrete fix action
This directly trains agents for real developer productivity tools (GitHub Copilot, Linear, Jira auto-assign, etc.).
Environment Design
Action Space
Observation Space
Tasks and Grading
๐ข Easy โ Label Assignment
Objective: Assign the correct label to the issue. Grader: 1.0 if correct, 0.0 if wrong. Challenge level: Straightforward for capable LLMs.
๐ก Medium โ Label + Team Routing
Objective: Assign correct label AND route to the correct engineering team. Grader: label (0.5) + team (0.5) โ partial credit if one is correct. Challenge level: Requires understanding of org structure and issue context.
๐ด Hard โ Full Triage (Label + Team + Priority + Fix)
Objective: Full triage decision โ label, team, priority, and a concrete fix action. Grader: label (0.30) + team (0.30) + priority (0.20) + fix quality (0.20) Challenge level: Genuinely challenges frontier models on multi-criteria reasoning.
Reward function design: All rewards are continuous [0.0, 1.0], providing partial credit at every step. The fix suggestion uses keyword-overlap scoring so specificity is rewarded โ vague answers get partial credit, precise answers get full.Baseline Scores (Llama 3.1 8B via HF Router)
Scores vary per run because issues are randomly sampled. Representative results:
Binary easy task depends on which issue is sampled. Medium/Hard benefit from partial credit โ the model consistently scores well on label and team fields.
Quick Start
Option 1 โ Use the hosted Space
curl -X POST https://om192006-github-issue-triage.hf.space/reset \
-H "Content-Type: application/json" \
-d '{"task_id": "easy"}'Option 2 โ Run locally with Docker
git clone https://github.com/ironman1947/github-issue-triage
cd github-issue-triage
docker build -t github-issue-triage:latest .
docker run -d -p 8000:8000 github-issue-triage:latest
# Test
curl -X POST http://localhost:8000/reset -H "Content-Type: application/json" -d '{"task_id": "hard"}'Option 3 โ Run inference script
pip install openenv-core openai
export HF_TOKEN=your_hf_token
export API_BASE_URL=https://router.huggingface.co/novita/v3/openai
export MODEL_NAME=meta-llama/llama-3.1-8b-instruct
export ENV_BASE_URL=https://om192006-github-issue-triage.hf.space
python inference.pyValidate
pip install openenv-core
openenv validateProject Structure
github-issue-triage/
โโโ inference.py # Baseline agent (run me!)
โโโ models.py # Typed Pydantic models
โโโ client.py # Python client helper
โโโ openenv.yaml # OpenEnv spec metadata
โโโ Dockerfile # Root Dockerfile
โโโ README.md
โโโ pyproject.toml
โโโ server/
โโโ app.py # FastAPI server
โโโ github_issue_triage_environment.py # Environment + grader logicReal-World Motivation
GitHub issue triage is a bottleneck in every software team. Issues pile up unlabelled, unassigned, with no priority. Human triagers spend hours per week on this. This environment enables:
- Training LLM agents to triage automatically
- Evaluating how well a model understands developer context
- Benchmarking different models on a grounded, reproducible task
Companies like GitHub, GitLab, Linear, and Jira are actively investing in AI-powered triage โ this environment enables RL research directly applicable to that.
Team
Team: Astra.AI Hackathon: Meta PyTorch OpenEnv Hackathon ร Scaler School of Technology GitHub: https://github.com/ironman1947/github-issue-triage
