Building Automations
Automations let you set up hands-off workflows that respond to events like GitHub issues or webhooks. This guide walks through creating your first automation.
Creating an Automation
Section titled “Creating an Automation”- Navigate to Automations in the sidebar
- Click Create Automation
- Follow the automation builder wizard
Automation Builder
Section titled “Automation Builder”Step 1: Name Your Automation
Section titled “Step 1: Name Your Automation”Give your automation a clear, descriptive name:
“Auto-triage bug reports”
“PR code review on feature branches”
“Generate docs on merge”
Step 2: Configure the Trigger
Section titled “Step 2: Configure the Trigger”Choose what event starts your automation.
GitHub Issue Trigger
Section titled “GitHub Issue Trigger”Triggers when issues are created or updated:
- Select GitHub Issue as trigger type
- Choose the repository to monitor
- Optionally filter by labels (e.g., only
bugorautomate)
GitHub Pull Request Trigger
Section titled “GitHub Pull Request Trigger”Triggers on PR events:
- Select GitHub Pull Request as trigger type
- Choose the repository
- Configure which events trigger (opened, updated, merged)
See Event Triggers for detailed configuration options.
Step 3: Configure the Action
Section titled “Step 3: Configure the Action”Define what happens when the trigger fires.
Start Session Action
Section titled “Start Session Action”Creates a new AI session:
- Select Start Session as action type
- Choose an agent/prompt template
- Select the AI model
- Configure context passing (issue body, PR diff, etc.)
See Actions for detailed configuration options.
Step 4: Review and Save
Section titled “Step 4: Review and Save”Review your automation configuration:
- Trigger conditions
- Action settings
- Test with a dry run if available
Click Create Automation to save and activate.
Example: Bug Triage Automation
Section titled “Example: Bug Triage Automation”Let’s build an automation that triages new bug reports:
Configuration
Section titled “Configuration”| Setting | Value |
|---|---|
| Name | Auto-triage bug reports |
| Trigger | GitHub Issue |
| Repository | my-org/my-app |
| Label Filter | bug |
| Action | Start Session |
| Agent | Bug Analyzer |
| Model | Claude 3.5 Sonnet |
Behavior
Section titled “Behavior”When someone opens an issue with the bug label:
- Cheffed detects the new issue via GitHub webhook
- Automation trigger conditions match
- A new session starts with the Bug Analyzer agent
- The agent receives the issue title, body, and metadata
- The agent analyzes the bug and posts findings as a comment
Testing Automations
Section titled “Testing Automations”Before relying on an automation:
- Create a test issue with your trigger conditions
- Monitor the automation on the Automations page
- Check the session that gets created
- Review the output to ensure it meets expectations
- Iterate on the agent prompt if needed
Enabling and Disabling
Section titled “Enabling and Disabling”Toggle automations on/off without deleting them:
- Go to the Automations page
- Find your automation
- Use the toggle switch to enable/disable
Disabled automations won’t respond to events but keep their configuration.
Best Practices
Section titled “Best Practices”Start Simple
Section titled “Start Simple”Begin with a basic automation and add complexity over time:
- Single trigger condition
- One action
- Clear, focused agent prompt
Use Specific Triggers
Section titled “Use Specific Triggers”Narrow triggers prevent unwanted executions:
- Filter by specific labels
- Target specific repositories
- Limit to certain branches
Monitor and Iterate
Section titled “Monitor and Iterate”Check automation results regularly:
- Review execution history
- Examine session outputs
- Refine agent prompts based on results
Document Your Automations
Section titled “Document Your Automations”Use clear names and descriptions so team members understand what each automation does.
Next Steps
Section titled “Next Steps”- Learn about Event Triggers in detail
- Configure Actions for your workflows
- View Execution History to monitor results