Skip to main content

Internal Tools

Configure built-in Dexto capabilities that provide core agent functionality like file operations, code search, and command execution.

Complete Reference

For complete tool specifications, parameters, and usage details, see agent.yml → Internal Tools.

Overview

Internal tools are built directly into Dexto core, providing essential capabilities for agents to interact with the local filesystem, execute commands, and collect user input.

Key characteristics:

  • Built into Dexto (no external dependencies)
  • Can be enabled/disabled per agent
  • Subject to tool confirmation policies
  • Optimized for common agent workflows

Available Tools

ToolPurposeSafety
ask_userCollect structured user inputSafe
read_fileRead file contentsRead-only
write_fileCreate/overwrite filesRequires approval
edit_filePrecise file editsRequires approval
glob_filesFind files by patternRead-only
grep_contentSearch code with regexRead-only
bash_execExecute shell commandsDangerous
bash_outputMonitor background processesSafe
kill_processTerminate processesSafe

Configuration

Enable tools by listing them:

internalTools:
- ask_user
- read_file
- write_file
- edit_file
- glob_files
- grep_content
- bash_exec

Disable all tools:

internalTools: []

Tool Categories

File Reading (Read-only)

read_file - Read file contents with pagination:

internalTools:
- read_file

glob_files - Find files by pattern:

internalTools:
- glob_files

Common patterns: **/*.ts, **/config.{yml,yaml,json}

grep_content - Search code with regex:

internalTools:
- grep_content

Example: Find function definitions, imports, class usage

File Writing (Requires Approval)

write_file - Create/overwrite files:

internalTools:
- write_file

edit_file - Make precise changes:

internalTools:
- read_file # Often used together
- edit_file

Command Execution (Dangerous)

bash_exec - Execute shell commands:

internalTools:
- bash_exec

bash_output - Monitor background processes:

internalTools:
- bash_exec
- bash_output

kill_process - Terminate processes:

internalTools:
- bash_exec
- bash_output
- kill_process

User Interaction (Safe)

ask_user - Collect structured input:

internalTools:
- ask_user

Common Tool Combinations

Read-Only Analysis Agent

internalTools:
- read_file
- glob_files
- grep_content
- ask_user

toolConfirmation:
mode: auto-approve # Safe since all read-only

Coding Agent

internalTools:
- read_file
- write_file
- edit_file
- glob_files
- grep_content
- bash_exec
- ask_user

toolConfirmation:
mode: event-based
toolPolicies:
alwaysAllow:
- internal--read_file
- internal--glob_files
- internal--grep_content
- internal--ask_user

DevOps Agent

internalTools:
- read_file
- write_file
- bash_exec
- bash_output
- kill_process

toolConfirmation:
mode: event-based
toolPolicies:
alwaysAllow:
- internal--read_file
- internal--bash_output
- internal--kill_process
alwaysDeny:
- internal--bash_exec--rm -rf*

Tool Confirmation Policies

Configure which tools require approval:

toolConfirmation:
mode: event-based
toolPolicies:
# Safe, read-only operations
alwaysAllow:
- internal--read_file
- internal--glob_files
- internal--grep_content
- internal--ask_user

# Explicitly deny dangerous operations
alwaysDeny:
- internal--bash_exec--rm -rf*
- internal--bash_exec--sudo*

Best Practices

  1. Enable only what you need - Don't enable all tools unnecessarily
  2. Pair tools with instructions - Guide agents in system prompt
  3. Use safe defaults - Auto-approve read-only, require confirmation for writes
  4. Provide usage examples - Include patterns in system prompt

Example system prompt:

systemPrompt: |
## Tool Usage Guidelines

Finding Files:
- Use glob_files with "**/*.ts" for TypeScript files
- Use grep_content to search for patterns

Editing Files:
- ALWAYS read_file first to see current content
- Use edit_file with unique old_string for precision

Running Commands:
- Use bash_exec for tests: "npm test"
- Never use destructive commands without approval

Use Cases

Agent TypeRecommended Tools
Code Analystread_file, glob_files, grep_content, ask_user
Developerread_file, write_file, edit_file, glob_files, grep_content, bash_exec
DevOpsread_file, write_file, bash_exec, bash_output, kill_process
Documentationread_file, write_file, glob_files

See Also