Deployment Guide¶
Overview¶
aieng-bot can be used in two ways:
1. CLI - Fix any PR directly using aieng-bot fix --repo owner/repo --pr 123
2. GitHub Workflows - Automated monitoring and fixing of bot PRs (Dependabot, pre-commit-ci) across an organization
Deployment Checklist¶
Phase 1: Initial Setup¶
- Create Anthropic API key from Anthropic Console
- Create GitHub PAT with org-wide access
- Add secrets to this repository:
ANTHROPIC_API_KEYORG_ACCESS_TOKEN- Enable GitHub Actions
- Verify workflows appear in Actions tab
Phase 2: Testing¶
- Test via CLI (recommended):
- Or test via GitHub workflow:
- Verify bot comments appear on test PR
- Check workflow logs for errors
Phase 3: Monitoring¶
- Enable scheduled runs (daily at 00:00 UTC)
- Monitor for a few days
- Review PRs the bot processes
- Adjust skill templates if needed
Quick Deployment¶
# 1. Install aieng-bot
uv sync # or pip install aieng-bot
# 2. Set environment variables
export ANTHROPIC_API_KEY="your-key"
export GITHUB_TOKEN="your-token"
# 3. Test on a PR
aieng-bot fix --repo owner/repo --pr 123
# 4. (Optional) For automated workflows, add secrets to GitHub:
# Settings → Secrets → Actions → Add ANTHROPIC_API_KEY and ORG_ACCESS_TOKEN
What Happens After Deployment¶
First Day¶
- Discovery workflow runs at 00:00 UTC
- Scans all VectorInstitute repos
- Finds bot PRs (Dependabot and pre-commit-ci)
- Classifies failures with Claude Haiku 4.5
- Dispatches fix jobs for failing PRs
- Auto-merges passing PRs
First Week¶
- Bot handles most bot PRs automatically
- Team sees reduced manual PR review load
- Fix success rate becomes visible on Dashboard
Monitoring¶
Dashboard¶
View comprehensive analytics at platform.vectorinstitute.ai/aieng-bot: - PR status tracking - Agent execution traces - Success rates and metrics
CLI Commands¶
# Check recent runs
gh run list --workflow=discover-and-dispatch.yml --limit 10
# Check for failures
gh run list --workflow=discover-and-dispatch.yml --status failure --limit 5
# View specific run
gh run view RUN_ID --log
Success Metrics¶
- Discovery workflow: 95%+ success rate
- Auto-merge: 90%+ of passing PRs merged
- Auto-fix: 50%+ of fixable issues resolved
Adjustments¶
Scan Frequency¶
Edit .github/workflows/discover-and-dispatch.yml:
on:
schedule:
- cron: '0 0 * * *' # Daily (default)
- cron: '0 */12 * * *' # Every 12 hours
- cron: '0 */6 * * *' # Every 6 hours
Exclude Repositories¶
Filter repos in workflow after getting the list:
Adjust Fix Behavior¶
Edit skill templates in .claude/skills/ to tune fix strategies.
Rollback Plan¶
Immediate Disable¶
Or via GitHub UI: Actions → Select workflow → "..." → Disable workflow
Full Rollback¶
- Remove secrets from repository
- Disable workflows
- No cleanup needed in target repositories
Cost Estimation¶
Claude API¶
- Classification: Claude Haiku 4.5 (low cost)
- Fixing: Claude Sonnet 4.5 (moderate cost)
- Estimated: $5-20/month depending on volume
GitHub¶
- Actions minutes: Free for public repos, included in plan for private
- API calls: Free within rate limits
Team Communication¶
Announcement Template¶
## 🤖 aieng-bot
We've deployed aieng-bot to help manage PR maintenance.
**What it does:**
- Fixes CI failures (linting, tests, security, build)
- Resolves merge conflicts
- Auto-merges PRs when all checks pass
- Comments on PRs it processes
**How to use:**
- CLI: `aieng-bot fix --repo owner/repo --pr 123`
- Automated workflows handle bot PRs (Dependabot, pre-commit-ci)
- Report issues at github.com/VectorInstitute/aieng-bot
Long-Term Maintenance¶
Monthly¶
- Review bot effectiveness
- Update skills based on patterns
- Check API costs
Quarterly¶
- Analyze metrics and trends
- Review for model updates
- Security and permissions audit
🤖 aieng-bot - AI-powered PR maintenance by Vector Institute AI Engineering