create_console_tools: Create Console Tools

View source: R/console_agent.R

create_console_toolsR Documentation

Create Console Tools

Description

Create a set of tools optimized for console/terminal interaction. The default "minimal" profile exposes only bash, read_file, write_file, and edit_file. Use profile = "legacy" for the prior broad tool surface including R, image, Feishu, skill, and inspection tools.

Usage

create_console_tools(
  working_dir = tempdir(),
  sandbox_mode = "permissive",
  startup_dir = working_dir,
  profile = c("minimal", "legacy"),
  extensions = "auto"
)

Arguments

working_dir

Working directory for sandboxed tool execution. Defaults to tempdir().

sandbox_mode

Sandbox mode: "strict", "permissive", or "none" (default: "permissive").

startup_dir

R session startup directory used for project-aware context. Defaults to getwd().

profile

Console profile. "minimal" is the default Pi-like tool set; "legacy" restores the previous all-in-one console tools.

extensions

Extension loading mode. Defaults to "auto".

Value

A list of Tool objects.

Examples


if (interactive()) {
    tools <- create_console_tools()
    # Use with an agent or session
    session <- create_chat_session(model = "openai:gpt-4o", tools = tools)
}


aisdk documentation built on May 29, 2026, 9:07 a.m.