aieng-bot is an AI-powered tool that autonomously fixes CI failures, resolves merge conflicts, and merges GitHub pull requests. It can be used via CLI on any PR, or configured with GitHub workflows to automatically monitor and fix bot PRs (Dependabot, pre-commit-ci) across an organization.
- Admin access to VectorInstitute organization
- Anthropic API key
- GitHub Personal Access Token with org-wide permissions
- Go to Anthropic Console
- Click "Create API Key"
- Copy the key (starts with
sk-ant-...) - Keep it secure - you'll add it as a secret
Option A: Fine-grained Token (Recommended)
- Go to Fine-grained tokens
- Click "Generate new token"
- Configure:
- Token name:
aieng-bot-org-access - Expiration: 1 year
- Resource owner: VectorInstitute
- Repository access: All repositories
- Permissions:
contents: Read and writepull_requests: Read and writeissues: Read and writemetadata: Read-only (automatic)
- Token name:
- Click "Generate token"
- Copy the token (starts with
github_pat_...)
Option B: Classic Token
- Go to Personal access tokens (classic)
- Configure:
- Scopes:
repo,workflow,read:org
- Scopes:
- Generate and copy token
- Go to
VectorInstitute/aieng-bot→ Settings → Secrets and variables → Actions - Add two secrets:
ANTHROPIC_API_KEY: Your Anthropic API keyORG_ACCESS_TOKEN: Your GitHub PAT
- Go to Actions tab
- Enable workflows if disabled
- Verify workflows appear:
discover-and-dispatch.ymlfix-pr-agent.yml
Via CLI (recommended):
# Fix a PR directly
aieng-bot fix --repo owner/repo --pr 123
# Fix with dashboard logging
aieng-bot fix --repo owner/repo --pr 123 --logVia GitHub Workflow:
# Trigger fix workflow for a specific PR
gh workflow run fix-pr-agent.yml \
--field target_repo="owner/repo" \
--field pr_number="123"
# Run bot PR discovery (VectorInstitute org)
gh workflow run discover-and-dispatch.ymlVia GitHub UI: Actions → Select workflow → Run workflow
After setup, the bot should:
- Run daily at 00:00 UTC
- Scan all VectorInstitute repositories
- Find open bot PRs (Dependabot and pre-commit-ci)
- Classify failures using Claude Haiku 4.5
- Auto-merge PRs with passing checks
- Fix failing PRs using Claude Sonnet 4.5
Edit .github/workflows/discover-and-dispatch.yml:
on:
schedule:
- cron: '0 0 * * *' # Daily at midnight (default)
# - cron: '0 */6 * * *' # Every 6 hours
# - cron: '0 */12 * * *' # Every 12 hoursSet CLAUDE_MODEL environment variable to override defaults:
- Classification:
claude-haiku-4-5-20251001 - Fixing:
claude-sonnet-4-5-20250929
Edit skill definitions in .claude/skills/:
fix-merge-conflicts.mdfix-test-failures.mdfix-lint-failures.mdfix-security-audit.mdfix-build-failures.md
- Use fine-grained token when possible
- Set token expiration and rotate annually
- Monitor usage in GitHub audit log
- Never commit tokens to repository
- Monitor API usage in Anthropic Console
- Rotate key periodically
# Test token access
gh api orgs/VectorInstitute/repos -H "Authorization: token $ORG_ACCESS_TOKEN"- Ensure auto-merge enabled in target repo
- Check branch protection rules
- Verify token has
contents: write
- Verify API key at Anthropic Console
- Check quota and rate limits
- Verify Actions enabled
- Check secrets are set
- Cron uses UTC timezone
- Review workflow runs for errors
- Check PR comments for bot activity
- Review merged PRs for quality
- Update skill templates based on patterns
- Check for model updates
🤖 aieng-bot - AI-powered PR maintenance by Vector Institute AI Engineering