How Tools Work
When an agent runs, it has access to a set of tools it can use to accomplish the task defined in your prompt. The agent decides which tools to use based on your instructions. For example, if your prompt says “read the model file and update its documentation,” the agent will:- Use the
Readtool to get the file contents - Use the
Edittool to update the documentation - Use
Bashto commit and push the changes
Available Tools
File Operations
Read the contents of files in the repository.Capabilities:
- Read any file in the repository
- Read multiple files
- Access file metadata
Create new files or overwrite existing files.Capabilities:
- Create files in any directory
- Create parent directories as needed
- Overwrite existing files
Modify existing files using search-and-replace operations.Capabilities:
- Find and replace text patterns
- Multi-line edits
- Preserve file formatting
Code Search
Search file contents using patterns.Use for:
- Finding specific code patterns
- Locating model references
- Searching across the codebase
Find files matching path patterns.Example patterns:
models/**/*.sql— All SQL files in modelsmodels/marts/**/dim_*.sql— All dimension models**/*.yml— All YAML files
List directory contents.Capabilities:
- List files and subdirectories
- Get file metadata
- Explore directory structure
Data Access
Execute SQL queries against your connected data warehouse.Capabilities:
- Run SELECT queries
- Join across schemas
- Aggregate and transform data
Queries are read-only by default. The agent can analyze data but cannot modify tables.
Get table and column statistics without running queries. Faster and more efficient than SQL for profiling.Returns:
- Row counts
- Column names and types
- Null percentages
- Distinct value counts
- Min/max for numeric columns
- Sample values
Compare the results of two SQL queries to identify differences at the row level.Returns:Key columns:The tool uses key columns to match rows between the two result sets. You can specify key columns explicitly, or the tool will infer them from primary keys or common ID columns.
- Row counts for both queries
- Rows only in the first query (removed)
- Rows only in the second query (added)
- Rows with matching keys but different values (changed)
- Sample rows illustrating each type of difference
DataDiff runs both queries and compares results in memory. For large result sets, add filters to scope the comparison to a representative sample.
Command Execution
Execute shell commands in the repository environment.Common commands:
git— Git operations (add, commit, push, branch)gh— GitHub CLI (create PRs, post comments)dbt— dbt commands (parse, compile, run)python— Python scripts
Optional Tools
Some tools must be explicitly enabled in your agent configuration.Send messages to Slack channels. Requires Slack integration to be configured in the Buster platform.Enable in agent config:Example prompt usage:
The Buster bot must be invited to the channel before it can post messages.
Git Operations
Agents perform Git operations through theBash tool using standard Git and GitHub CLI commands.
Common Patterns
Creating a branch and committing:Auto-Commit Behavior
For pull request triggers, theauto_commit field controls how changes are committed:
| Setting | Behavior |
|---|---|
auto_commit: false (default) | Creates a new branch and opens a new PR |
auto_commit: true | Commits directly to the PR branch |
Security Model
Agents run in isolated Daytona sandboxes—secure cloud environments with controlled access:What Agents Can Access
- Your repository — Full read/write access to files
- Your data warehouse — Query access via configured credentials
- GitHub API — Create PRs, post comments, update check runs
- Slack — Send messages (if
slack_toolenabled)
What Agents Cannot Access
- The internet — No general network access (only GitHub and Buster APIs)
- Other repositories — Only the triggered repository
- Persistent state — Each run is independent; no state persists between runs
- Your local machine — Agents run in cloud sandboxes, not locally
Credential Handling
- Data warehouse credentials are injected securely from the Buster platform
- GitHub tokens are scoped to the specific repository
- API keys and secrets are never logged or exposed
- All credentials are encrypted at rest
Best Practices
Write Clear Prompts
Be explicit about what tools you expect the agent to use:Use the Right Tool
| Task | Best Tool |
|---|---|
| Get column statistics | RetrieveMetadata |
| Run custom analysis queries | RunSql |
| Compare query results | DataDiff |
| Find files by pattern | Glob |
| Search file contents | Grep |
| Validate dbt project | Bash with dbt parse |
| Create PRs | Bash with gh pr create |
Handle Errors in Prompts
Tell the agent what to do when things go wrong:Minimize Warehouse Queries
UseRetrieveMetadata instead of RunSql when possible: