Overview
GitHub Actions can run AgentUse agents in response to repository events:- PR Reviews: Automatic code review when PRs are opened/updated
- Comment Replies: Respond to @mentions in PR/issue comments
- Custom Workflows: Manual or scheduled agent runs
Quick Start
1. Copy Workflow Files
From the agentuse-pr-agents repository:2. Configure API Keys
Add ONE of these secrets to your repository (Settings → Secrets → Actions):For Claude Pro/Max users, run
npx agentuse auth setup-github in your project directory. Follow the instructions and the command will write the secret to GitHub for you.3. Done
Open a PR to trigger automatic review, or mention@agentuse in any comment.
Workflow Configuration
PR Code Review Workflow
File:.github/workflows/agentuse-code-review.yml
Key Configuration
Environment Variables
The workflow sets these variables for the agent:Comment Reply Workflow
File:.github/workflows/agentuse-comment-reply.yml
Key Configuration
Context Variables
Agent File Configuration
Structure
Agent files use YAML frontmatter + markdown:Model Selection
Override the default model in three ways: 1. Agent file (recommended for consistency):Tool Permissions
Limit what the agent can do:Timeout & Step Limits
Advanced Configuration
Filter PRs by Path
Different Models per Task
Skip Draft PRs
Monorepo: Pass Affected Packages
Set environment variable in workflow:Custom Review Standards
Edit.github/agents/code-review.agentuse:
Debugging
Enable debug mode in workflow:Security
Limit agent access in CI:Cost Optimization
Use Cheaper Models
Reduce Token Usage
Skip Low-Value PRs
Reference
Common bash commands in agents:Next Steps
- Customize agents: Edit
.github/agents/*.agentuseto match your workflow - Add more workflows: Create agents for deployment, testing, documentation
- Share across repos: Use organization-level secrets and reusable workflows
- See Agent Design Patterns for advanced prompt engineering