Built-in Agent Tools
tools.RdPre-defined Tool objects that can be passed to create_agent() via the
tools argument, allowing an agent to search external services or retrieve
local information.
Format
Tool S7 objects:
tool_arxivSearch arXiv.org for academic papers.
tool_wikipediaSearch Wikipedia articles.
tool_semanticscholarSearch Semantic Scholar for academic papers.
tool_duckduckgo_iaQuery the DuckDuckGo Instant Answer API.
tool_datetimeReturn the current date, time, and timezone.
Examples
# Inspect a tool
tool_datetime
#> name: Get Current Date and Time
#> function_name: get_current_datetime
#> description: Get the current date and time in ISO format.
#> parameters: (empty list)
#> impl: NULL
#>
if (FALSE) { # \dontrun{
# Requires a running Ollama server and the "gemma4:e4b" model
agent <- create_agent(
llmconfig = config_Ollama(
model_name = "gemma4:e4b",
base_url = "http://localhost:11434"
),
system_prompt = "You are a meticulous research assistant.",
tools = list(tool_datetime, tool_semanticscholar, tool_wikipedia)
)
generate(agent, "Find recent papers on diffusion models.")
} # }