Skip to main content
Agents don’t just analyze—they take action. From creating pull requests and posting comments to sending Slack messages, agents can perform a wide range of operations based on what they discover. This guide covers how agents take actions and send notifications. Actions Diagram

How Actions Work

Agents accomplish actions through tools. You describe what you want done in your prompt, and the agent uses the appropriate tools to make it happen. For example:
prompt: |
  If documentation is missing:
  1. Generate the documentation
  2. Create a new branch
  3. Commit the changes
  4. Open a pull request
  5. Post a summary to #data-team on Slack
The agent will use:
  • Write / Edit to create/update files
  • Bash with git commands to commit and push
  • Bash with gh pr create to open a PR
  • slack_tool to send the Slack message

Git Actions

Agents perform Git operations through the Bash tool using standard Git and GitHub CLI commands.

Creating Commits

prompt: |
  After updating the documentation files:
  1. Stage the changes: git add models/
  2. Commit with a descriptive message: git commit -m "docs: Update model documentation"

Creating Branches

prompt: |
  Create a new branch for your changes:
  git checkout -b docs/update-customers-model

Pushing Changes

prompt: |
  Push your changes to the remote:
  git push -u origin docs/update-customers-model

Creating Pull Requests

Use the GitHub CLI (gh) to create pull requests:
prompt: |
  Create a pull request with your changes:
  gh pr create \
    --title "docs: Update customers model documentation" \
    --body "This PR updates documentation based on current data profiles.

  Changes:
  - Added column descriptions
  - Updated row count estimates
  - Added null rate annotations

  Auto-generated by Buster."

Posting PR Comments

prompt: |
  Post a comment on the current PR summarizing your analysis:
  gh pr comment $PR_NUMBER --body "## Analysis Complete
  
  Found 3 models with missing documentation.
  
  See the created PR for fixes."

Auto-Commit Behavior

For pull request triggers, the auto_commit field controls commit behavior:
SettingWhat Happens
auto_commit: false (default)Agent creates a new branch and opens a new PR
auto_commit: trueAgent commits directly to the PR branch
triggers:
  - event: pull_request
    auto_commit: false  # Safer: creates separate PR
Use auto_commit: true carefully—it can cause merge conflicts if others are pushing to the same PR.

GitHub Check Runs

Every agent execution automatically creates a GitHub Check Run on the triggering commit or PR.

Check Run Lifecycle

  1. Queued — Check created when agent starts
  2. In Progress — Agent is executing
  3. Completed — Finished with success or failure

What’s Included

  • Title: Agent name (e.g., “documentation_agent”)
  • Summary: Brief description of the task
  • Output: Agent’s detailed output (up to 65,535 characters)
Check runs are visible in:
  • The PR’s “Checks” tab
  • Commit status indicators
  • Branch protection rules (can require checks to pass)
You don’t need to configure anything—check runs are created automatically for every agent execution.

Slack Notifications

Send messages to Slack channels using the slack_tool.

Enabling Slack

Add slack_tool to your agent configuration:
tools:
  include:
    - slack_tool
Slack integration must be configured in the Buster platform under Settings → Integrations → Slack.

Sending Messages

Reference Slack channels in your prompt:
prompt: |
  Send a message to #data-alerts:
  "🚨 Data quality issue detected in orders table.
  
  Null rate: 15% (threshold: 5%)
  
  Investigation needed."

Message Formatting

Agents can use Slack’s mrkdwn formatting:
prompt: |
  Send to #data-team:
  
  "*Weekly Documentation Report*
  
  :white_check_mark: 45 models fully documented
  :warning: 12 models need attention
  :x: 3 models have no documentation
  
  <https://example.com/report|View full report>"
Formatting options:
  • *bold* — Bold text
  • _italic_ — Italic text
  • ~strikethrough~ — Strikethrough
  • `code` — Inline code
  • :emoji_name: — Emoji

Channel Requirements

The Buster bot must be invited to channels before it can post:
  1. Open the Slack channel
  2. Type /invite @Buster
  3. The bot can now post to that channel

Action Patterns

Conditional Actions

Take different actions based on findings:
prompt: |
  Check documentation coverage for changed models.
  
  If coverage < 50%:
    - Post a comment requesting documentation
    - Send alert to #data-team on Slack
  
  If coverage 50-80%:
    - Post a comment with suggestions
  
  If coverage > 80%:
    - Post a brief "looks good" comment

Sequential Workflows

Execute actions in a specific order:
prompt: |
  1. First, analyze all changed models
  2. Generate documentation for each
  3. Run dbt parse to validate
  4. If validation passes:
     - Commit changes
     - Create PR
     - Post summary to Slack
  5. If validation fails:
     - Post error as PR comment
     - Do NOT create PR

Error Handling

Define what to do when things go wrong:
prompt: |
  Update documentation for changed models.
  
  If successful:
    - Commit and push changes
    - Post brief confirmation comment
  
  If dbt parse fails:
    - Post the error message as a PR comment
    - Tag @data-platform for review
    - Do not commit broken YAML
  
  If warehouse is unreachable:
    - Post a comment explaining the issue
    - Skip metadata profiling
    - Create documentation from SQL analysis only

Complete Examples

Documentation Agent with Notifications

name: docs_with_notifications

prompt: |
  Update documentation for models changed in this PR.
  
  For each changed SQL file:
  1. Use RetrieveMetadata to profile the model
  2. Update or create the YAML documentation
  3. Include:
     - Model description with purpose and grain
     - Column descriptions with data types
     - Null rates for columns with >5% nulls
  
  After processing all models:
  1. Run dbt parse to validate
  2. If valid:
     - Commit with message "docs: Update documentation for [models]"
     - Post PR comment listing what was updated
  3. If invalid:
     - Post the parse error as a PR comment
     - Send alert to #data-platform on Slack
     - Do NOT commit broken YAML

triggers:
  - event: pull_request
    types: ['opened', 'synchronize']
    includes:
      - "models/**/*.sql"
    auto_commit: false

tools:
  include:
    - slack_tool

Scheduled Audit with Report

name: weekly_audit

prompt: |
  Perform a weekly documentation audit.
  
  1. Scan all models in models/marts/
  2. Calculate:
     - Overall documentation coverage
     - Models missing descriptions
     - Columns missing descriptions
  
  3. Send report to #data-documentation on Slack:
     "*Weekly Documentation Audit*
     
     :bar_chart: *Coverage*
     Models: X% documented
     Columns: Y% documented
     
     :warning: *Needs Attention*
     [List top 5 undocumented models]
     
     :clipboard: *Action Items*
     - Focus on marts layer this week
     - 3 new models need documentation"
  
  4. If critical models are undocumented:
     - Create a GitHub issue with the list
     - Assign to @data-team

triggers:
  - event: scheduled
    cron: "0 9 * * 1"  # Every Monday at 9 AM UTC
    branches: ['main']

tools:
  include:
    - slack_tool

Failure Alert Agent

name: pipeline_alerts

prompt: |
  An Airflow DAG has failed. Investigate and alert the team.
  
  1. Extract error details from the trigger context
  2. Search the repository for related models
  3. Check if this is a recurring issue (search recent issues)
  
  4. Send alert to #data-incidents on Slack:
     ":rotating_light: *Pipeline Failure*
     
     *DAG:* [dag_id]
     *Task:* [task_id]
     *Error:* [error_message]
     
     *Possibly Related:*
     - [List related models or files]
     
     *Next Steps:*
     1. Check warehouse connectivity
     2. Review recent schema changes
     3. Check upstream data freshness"
  
  5. Create a GitHub issue:
     - Title: "Pipeline failure: [dag_id]"
     - Label: "incident"
     - Include error details and investigation links

triggers:
  - event: airflow
    type: dag_run_failed

tools:
  include:
    - slack_tool

Best Practices

Be Explicit About Actions

Tell the agent exactly what actions to take:
# Vague
prompt: Let me know if there are issues

# Explicit
prompt: |
  If issues found:
  - Post a PR comment with file:line references
  - Include code examples of the correct pattern
  - Send summary to #data-team on Slack

Handle All Outcomes

Cover success, failure, and edge cases:
prompt: |
  If changes needed:
    - Make changes, commit, create PR
  
  If no changes needed:
    - Post brief "all good" comment
  
  If errors occur:
    - Post error details as comment
    - Send alert to Slack
    - Do NOT commit partial changes

Use Consistent Formatting

Define message formats in your prompt:
prompt: |
  Format PR comments with this structure:
  
  ## [Status Emoji] [Title]
  
  **Summary:** Brief description
  
  **Details:**
  - Bullet points for specifics
  
  **Next Steps:**
  1. Numbered action items

Rate Limit Notifications

Avoid spamming channels:
prompt: |
  Only send Slack notifications for:
  - Critical issues (null rate > 20%)
  - Failed validations
  - Completed batch operations
  
  Do NOT notify for:
  - Routine successful runs
  - Minor warnings