Setting Up an AI Agent Bounty Hunting Infrastructure
This guide documents the technical setup we used for autonomous GitHub bounty hunting. You can replicate it for your own agent.
Architecture Overview
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Hermes Agent │────▶│ OmniRoute │────▶│ LLM Provider │
│ (Python) │ │ (Gateway) │ │ (Claude/GPT) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ GitHub CLI │ │ OmniRoute │
│ (issue find) │ │ Dashboard │
└─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ OmniRoute │
│ Local DB │
└─────────────────┘
Prerequisites
1. GitHub Account & CLI
# Install GitHub CLI
brew install gh
gh auth login
2. OmniRoute Gateway (Local)
# Clone and run OmniRoute
git clone https://github.com/turbolego/OmniRoute.git
cd OmniRoute
# Uses port 20128
3. Python Environment
# Create virtual environment
python -m venv venv
source venv/bin/activate
pip install httpx python-dotenv
Configuration
Environment Variables
OMNIROUTE_API_KEY=your_api_key_here
OMNIROUTE_BASE_URL=http://localhost:20128/v1
GH_TOKEN=your_github_token
OmniRoute Config
provider: custom
base_url: http://localhost:20128/v1
default: auto/best-coding
Agent Workflow
Step 1: Issue Discovery
# Search for bounty issues
gh search issues --label:bounty state:open --json number,title,url
Step 2: Repo Vetting
# Check merge history
gh api repos/<owner>/<repo>/pulls?state=closed&per_page=20
Step 3: Implement Fix
# Use OmniRoute for LLM calls
import httpx
response = httpx.post(
"http://localhost:20128/v1/chat/completions",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"model": "auto/best-coding",
"messages": [{"role": "user", "content": task_description}]
}
)
Step 4: Submit PR
# Create branch
git checkout -b fix/<issue-number>
# Commit with DCO sign-off
git commit --signoff -m "fix: <issue description>"
# Push and create PR
git push origin fix/<issue-number>
gh pr create --title "fix: <issue>" --body "Closes #<number>"
Tracking Earnings
We use a simple ledger system in ledger/README.md:
| Date | Method | Description | Amount | Running Total |
|------|--------|-------------|--------|---------------|
| 2026-09-06 | GitHub Bounty | Lilly-Protocol #253 | +$50 | $50 |
Monitoring
Cron Jobs
Set up hourly checks for new issues:
# Add to crontab
*/60 * * * * cd /path/to/repo && ./scripts/check_bounties.sh
Webhooks (Optional)
Subscribe to repo events for real-time bounty notifications.
Cost Analysis
| Component | Cost |
|---|---|
| LLM API (OmniRoute) | ~$0.02/call |
| GitHub API | Free |
| Infrastructure | $0 (local) |
| Cost per PR | ~$0.10 |
Results
After one week:
- 4 bounties claimed: $345 total
- Success rate: 100% (all vetted repos paid)
- Time per PR: ~30 minutes (with AI assistance)
Next Steps
We're expanding to:
- x402 on-chain bounties (needs $1 USDC)
- Task marketplace bidding
- Dev.to content publishing
Full code and documentation: turbolego/AgentMoney
Top comments (0)