Inspiration
I've been manually hunting open-source bounties for months — scanning Algora, Opire, checking competing PRs, reading issues, writing fixes, submitting PRs. It works, but it's tedious. Every step follows the same pattern. I thought: what if I just automated myself?
AutoPR is that automation. It runs a continuous loop: find a bounty → decide if it's worth attempting → write the fix → submit the PR → learn from the outcome.
What it does
AutoPR is an autonomous agent that earns open-source bounties without human intervention:
- Scans Opire and Algora APIs every 15 minutes for funded GitHub issues
- Triages each issue with Qwen-Max — scores tractability (0–1), identifies the technical approach, skips anything too vague or contested
- Codes the fix using a Qwen-Plus tool loop — the model explores the repo by reading files, searching code, writing changes, and running tests, then calls
finish()when done - Submits the PR via GitHub API with a closes reference and clear description
- Learns — stores every attempt outcome in SQLite, calculates per-repo merge rates, avoids repos where PRs consistently get ignored
The live dashboard streams every agent action in real time via Server-Sent Events. You can watch it find an issue, read the codebase, write the fix, and submit the PR — all without touching a keyboard.
How I built it
Backend: Python 3.11, FastAPI, SQLite
AI: Qwen-Max (triage) + Qwen-Plus (coding) via Alibaba Cloud Model Studio
Deployment: Alibaba Cloud ECS, Docker
GitHub integration: gh CLI for forking, pushing, and PR creation
The core is the Qwen tool-loop coder: the model is given 6 tools (list_files, read_file, search_code, write_file, run_command, finish) and works autonomously on a cloned repo until it fixes the issue or decides it can't.
The triage agent (Qwen-Max) reads the full issue body and outputs structured JSON: {score, reason, approach, skip}. Issues scoring below 0.45 are skipped — this prevents wasting compute on vague feature requests or issues needing design discussion.
The memory system tracks outcomes in SQLite. After 5+ attempts on a repo, it calculates a merge rate. Maintainers who are responsive get more attempts; those who ignore PRs get skipped automatically.
Challenges
The honeypot problem: ~40% of "bounty" issues are from fake repos that never pay. I built an aggressive blocklist and a competing-PR check before each attempt.
Tool-loop reliability: Qwen sometimes calls finish() too early. I handle this by checking git diff output after the loop — no changed files means failure, retry or skip.
Rate limits: Both Qwen and GitHub APIs have rate limits. The agent uses exponential backoff with retry-after header parsing.
Accomplishments
- End-to-end autonomous PR submission working on real repos
- Live dashboard with SSE streaming — watch the agent work in real time
- Memory system that improves issue selection over time
- Runs entirely on Alibaba Cloud for < $10/month compute + pay-per-token Qwen calls
What I learned
Qwen-Max's structured output is remarkably reliable for triage. Qwen-Plus handles well-scoped bugs well (null pointers, missing coverage, small API changes) but struggles with architectural issues — the triage layer filters those out correctly.
The economics work: at $0.10–0.50/Qwen call and $20–$250/bounty, only a ~2–5% success rate is needed to break even.
What's next
- Multi-model comparison: Qwen-Max for coding vs Qwen-Plus, measure merge rate vs cost
- PR follow-up: monitor review comments, push fixes automatically
- More bounty platforms: IssueHunt, Gitcoin
- Web UI for managing the blocklist and per-repo settings
Powered by Qwen Cloud
All AI runs on Qwen Cloud (Alibaba Cloud Model Studio) — Qwen-Max for triage, Qwen-Plus for the autonomous coding tool-loop. Deployed on Alibaba Cloud ECS; deployment proof: https://github.com/64johnlee/autopr/blob/main/docs/PROOF_OF_DEPLOYMENT.md
Log in or sign up for Devpost to join the conversation.