Getting Started
To create an agent, you need three core elements: a name, at least one trigger, and a prompt. The simplest agent looks like this:my-agent.yml
Enable Schema Validation
Add type safety and autocomplete to your agent files by including a JSON schema reference at the top of your YAML file:agent.yaml
This schema reference (
platform.buster.so/schemas/v1/custom-agent.schema.json) enables type safety and real-time validation in your IDE, providing autocomplete suggestions and helping you catch configuration errors before deployment.Project Setup
Agents are referenced from yourbuster.yml configuration file:
buster.yml
Reference
Core Fields
Unique identifier for your agent. Used in logs, the web interface, and GitHub Check Runs.Example:
documentation_agent, pr-reviewerA brief explanation of what the agent does. Appears in the web interface and helps team members understand the agent’s purpose.Example:
Automatically maintains dbt model documentationInstructions for the agent in natural language. Write this like you’re instructing a colleague—be clear about goals but let the agent determine implementation details.The agent has access to:
- Your repository files (read, write, edit)
- Your data warehouse (run SQL queries, retrieve metadata)
- dbt project context (if configured)
- Git operations (commits, branches, PRs via bash/gh commands)
- Slack (if
slack_toolis enabled)
Defines when the agent runs. You must specify at least one trigger. See Triggers & Scheduling for complete details.
Configure additional tools for the agent.
Triggers
Agents support four trigger types:| Event | Description |
|---|---|
pull_request | Runs when PRs are opened or updated |
push | Runs when commits are pushed to branches |
scheduled | Runs on a cron schedule |
airflow | Runs when Airflow pipelines fail |
Pull Request Trigger
Trigger type for pull request events.
Branch patterns to match. Defaults to
["*"] (all branches).PR event types that trigger the agent:
opened— PR was createdsynchronize— New commits pushed to PRreopened— PR was reopened after being closed
Glob patterns for file filtering. Only triggers if at least one changed file matches.
Controls how the agent commits changes:
false(default) — Creates a new branch from the PR’s head and opens a new PR with changes. Safe for collaboration.true— Commits directly to the PR’s branch. Can cause conflicts if others are also pushing.
Push Trigger
Scheduled Trigger
Cron expression (5 fields):
minute hour day month weekdayCommon patterns:0 * * * *— Every hour0 9 * * *— Daily at 9 AM UTC0 9 * * 1— Every Monday at 9 AM UTC*/15 * * * *— Every 15 minutes
All schedules use UTC timezone. The agent only runs if files matching
includes have changed since the last run.Airflow Trigger
Airflow event type:
dag_run_failed— DAG run failedtask_instance_failed— Individual task failed
Specific DAGs or tasks to filter. Only triggers for matching DAG/task names.
Available Tools
Agents have access to these tools by default:| Tool | Description |
|---|---|
Read | Read file contents |
Write | Create or overwrite files |
Edit | Edit existing files with search-and-replace |
Bash | Execute shell commands (git, dbt, python, etc.) |
Grep | Search file contents |
Glob | Find files by pattern |
LS | List directory contents |
RunSql | Execute SQL queries against your data warehouse |
RetrieveMetadata | Get column statistics, distributions, and cardinality |
Optional Tools
Enable additional tools withtools.include:
| Tool | Description |
|---|---|
slack_tool | Send messages to Slack channels |
Git Operations
Agents perform Git operations through theBash tool using git and gh (GitHub CLI) commands:
Examples
- Documentation Updater
- PR Reviewer
- Scheduled Audit
- Airflow Failure Handler
documentation-agent.yml
Best Practices
Writing Effective Prompts
Be specific about the desired outcome
Be specific about the desired outcome
Instead of “check for issues,” specify what issues to look for and what to do when found.
Structure complex prompts with numbered steps
Structure complex prompts with numbered steps
For multi-step workflows, use numbered lists to clarify sequence and dependencies.
Specify the output format
Specify the output format
Tell the agent how to present results—should it create a PR, post a comment, send a Slack message?
Handle error cases
Handle error cases
Define what the agent should do when things go wrong.
Choosing the Right Trigger
Testing Agents
Before deploying to production:-
Validate configuration:
- Test with a sample PR: Create a test branch and open a PR to see how the agent behaves.
- Monitor initial runs: Check the Runs tab in the web app to see execution logs and outputs.
- Iterate on the prompt: Refine based on actual behavior—add specificity where the agent made unexpected decisions.
Deployment
After creating your agent:-
Reference it in
buster.yml: -
Deploy:
- Verify: Check the Buster web app to confirm your agent appears in the list.
Every agent execution creates a GitHub Check Run and is logged in the Buster web app for full transparency and debugging.