Skip to contents

Pre-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.

Usage

tool_arxiv

tool_datetime

tool_duckduckgo_ia

tool_semanticscholar

tool_wikipedia

Format

Tool S7 objects:

tool_arxiv

Search arXiv.org for academic papers.

tool_wikipedia

Search Wikipedia articles.

tool_semanticscholar

Search Semantic Scholar for academic papers.

tool_duckduckgo_ia

Query the DuckDuckGo Instant Answer API.

tool_datetime

Return the current date, time, and timezone.

Author

EDG

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.")
} # }