GitHub Issue Resolver is an autonomous AI system that takes a GitHub issue URL, analyzes the problem, generates a fix, validates it with tests, and opens a pull request automatically.
The project is built with LangGraph and follows a multi-agent architecture where each agent focuses on a specific task. Together, they move from understanding the issue to delivering a tested solution with minimal manual effort.
Issue URL → Researcher → Planner → Coder → Tester → PR Agent → Pull Request
Each agent shares information through a common state, while LangGraph handles the workflow and routing logic.
| Agent | Responsibility |
|---|---|
| Researcher | Reads the issue, explores the repository, and identifies relevant files |
| Planner | Analyzes the problem and creates a step-by-step plan for the fix |
| Coder | Implements the solution and generates the required code changes |
| Tester | Creates and runs tests inside an isolated environment |
| PR Agent | Commits the changes and opens a pull request |
- Automatically investigates the codebase to find relevant files and context
- Performs root-cause analysis before attempting a fix
- Generates and applies code patches based on the issue requirements
- Detects and retries failed code generations when possible
- Runs tests inside a Docker sandbox for safe execution
- Supports resumable workflows using Redis checkpoints
- Works with any OpenRouter-supported model, including free-tier options
Before running the project, make sure you have:
- Python 3.11+
- Docker
- Redis (optional, for checkpointing and resuming runs)
- GitHub CLI (
gh) installed and authenticated
git clone https://github.com/Waqas392/github-issue-resolver.git
cd github-issue-resolver
pip install -e ".[dev]"Create a .env file from the provided template:
cp .env.example .envThen add your credentials:
GIR_OPENROUTER_API_KEY=sk-or-...
GIR_GITHUB_TOKEN=ghp_...
GIR_MODEL_NAME=openai/gpt-oss-20b:freeRun the complete workflow:
python main.py --issue https://github.com/owner/repo/issues/123Generate the fix without creating a pull request:
python main.py --issue https://github.com/owner/repo/issues/123 --dry-runSkip test execution:
python main.py --issue https://github.com/owner/repo/issues/123 --no-testsResume a previously interrupted run:
python main.py --issue https://github.com/owner/repo/issues/123 --resume <run-id>| Variable | Default | Description |
|---|---|---|
GIR_MODEL_NAME |
openai/gpt-oss-20b:free |
Model used through OpenRouter |
GIR_MAX_RESEARCHER_FILES |
3 |
Maximum files analyzed by the Researcher |
GIR_MAX_FILE_SIZE_LINES |
1000 |
File truncation limit |
GIR_MAX_TOKENS_PER_CALL |
1000 |
Maximum tokens per model request |
GIR_GITHUB_DEFAULT_BASE_BRANCH |
main |
Base branch used when creating pull requests |
github-issue-resolver/
├── src/
│ ├── agents/
│ │ ├── researcher.py
│ │ ├── planner.py
│ │ ├── coder.py
│ │ ├── tester.py
│ │ └── pr_agent.py
│ ├── tools/
│ │ └── github_tools.py
│ ├── config.py
│ └── orchestrator.py
├── main.py
├── .env.example
└── requirements.txt
- LangGraph for workflow orchestration
- OpenRouter for model access
- GitHub CLI for interacting with GitHub
- Pydantic for structured configuration and validation
- Docker for isolated test execution
- Structlog for structured logging
✔ researcher 13.5s Found validator.py and related files
✔ planner 33.5s Identified incorrect validation logic
✔ coder 11.5s Applied patch to validator.py
✔ tester 15.1s All tests passed
✔ pr_agent 30.2s Pull request created successfully
I built this project to explore how autonomous AI agents can collaborate on real software engineering tasks. Rather than relying on a single model call, the system breaks the workflow into specialized agents responsible for research, planning, coding, testing, and pull request creation.
The project demonstrates how LangGraph can be used to build structured, multi-step AI workflows that interact with real development tools and repositories while maintaining clear responsibilities between agents.
MIT License.