Skip to contents

A tool that executes bash/shell commands and returns the output. Use with caution! This can execute arbitrary system commands.

Usage

tool_run_bash(command)

Format

A tool definition created with ellmer::tool().

Arguments

command

The bash command to execute (tool argument)

Examples

if (FALSE) { # \dontrun{
agent <- Agent$new(
  chat = ellmer::chat("openai/gpt-4o"),
  tools = list(tool_run_bash),
  permissions = permissions_full()  # Required for bash
)
} # }