Getting Started with Agents
To create an agent, you need three core elements: a name, at least one trigger, and a prompt. The simplest agent looks like this:agent.yaml
Start with a single, specific task. You can always create additional agents for other workflows.
Reference
This section contains the complete reference for agent configuration files.Core Fields
The unique identifier for your agent. Used in logs, the web interface, and file naming.Must be lowercase with hyphens (kebab-case). Example:
schema-change-handlerA brief explanation of what the agent does. Appears in the agent list and helps team members understand the agent’s purpose.Example:
Adapts staging models to source schema changesDefines when the agent runs. You can specify multiple triggers for the same agent.
Instructions for the agent. 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 (can read, analyze, and modify)
- Your data warehouse (can run queries and analyze data)
- dbt project metadata (models, tests, documentation)
- Git operations (can create branches, commits, and PRs)
Structure your prompt with clear steps when you want a specific workflow. Use open-ended instructions when you want the agent to figure out the best approach.
Actions and Notifications
Define what the agent can do when it runs. By default, agents can create PRs, post comments, and make file changes.
Configure where and how the agent sends notifications about its activities.
Restrictions and Permissions
Limit what the agent can access and modify. Useful for constraining agents to specific parts of your project.
Context and Configuration
Provide additional information and configuration to the agent.
Whether the agent is active. Set to
false to temporarily disable without deleting. Defaults to true.Maximum execution time in seconds before the agent is stopped. Defaults to
900 (15 minutes).Examples
- Schema Change Handler
- PR Code Review
- Scheduled Documentation Audit
- Downstream Impact Analyzer
schema-change-handler.yaml
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. Include examples of good and bad patterns when relevant.
Provide context and examples
Provide context and examples
Reference your team’s style guides, documentation standards, or example implementations. The agent can read these files and apply the patterns consistently.
Structure complex prompts with numbered steps
Structure complex prompts with numbered steps
For multi-step workflows, use numbered lists. This helps the agent understand the sequence and dependencies between actions.
Specify the output format
Specify the output format
Tell the agent how to present results—should it create a PR, post a comment, update a file, or send a notification? Include what information to include.
Choosing the Right Trigger
Match your trigger to the workflow pattern:
- pull_request: Code review, validation, documentation checks
- scheduled: Regular audits, monitoring, reporting
- event: Reactive responses to data stack changes
- manual: Ad-hoc tasks or workflows that need approval before running
Testing and Iterating
After deploying an agent, monitor its first few runs carefully:1
Check the run logs
Go to the Runs page in the web interface to see exactly what the agent did. Review the files it accessed, queries it ran, and decisions it made.
2
Refine the prompt
If the agent didn’t behave as expected, update the prompt with more specific instructions. Look for places where your instructions were ambiguous or missing important details.
3
Adjust restrictions if needed
If the agent tried to access files or perform actions it shouldn’t, add restrictions to constrain its behavior. Start permissive and tighten as you understand the agent’s needs.
4
Monitor outcomes over time
Track how often the agent succeeds vs. fails, and whether its actions are helpful. Adjust the prompt and configuration based on real-world usage patterns.
Every agent run is logged with full transparency. You can always audit what happened and why.
Deployment
Save your agent configuration to.github/buster/agents/ in your repository. The filename should match your agent name:
Agent configurations must be on your default branch (usually
main) to be active. Changes in feature branches won’t trigger agents until merged.