Register all built-in codeagent tools to a Chat
Usage
register_builtin_tools(
chat,
mode = "default",
rules = list(),
ask_fn = NULL,
skip_file_tools = FALSE,
sandbox = NULL,
async = FALSE
)Arguments
- chat
An
ellmer::Chatobject.- mode
Character. Permission mode (see PermissionMode).
- rules
List.
PermissionRule()objects.- ask_fn
Function or NULL.
function(tool_name, input) -> logical. Called when permission is"ask".- skip_file_tools
Logical. If
TRUE, skip Read/Write/Edit/MultiEdit/Glob/Grep/LS and register only Bash. Advanced use: set this if you want btw file tools to be the only file tools (no absolute-path fallback). DefaultFALSEmeans both codeagent and btw file tools coexist when Path A is enabled.- sandbox
List or NULL. Bash sandbox profile (see
.sandbox_profile()); passed through tobash_tool().- async
Logical. If
TRUE, register async permission-gated tool variants for the Shiny path (UI-gated approvals). DefaultFALSE(synchronous).