Package: gptr Title: Language Model Agents Inside the Live 'R' Session Version: 1.0.0 Authors@R: c( person("Wanjun", "Gu", , "wanjun.gu@ucsf.edu", role = c("aut", "cre", "cph"), comment = c(ORCID = "0000-0002-7342-7000")), person("Mario", "Zechner", role = c("ctb", "cph"), comment = "Author of 'pi' (MIT), from which tool texts and templates are derived") ) Description: Runs large language model agents inside the running 'R' session, so that models inspect and modify objects that are already in memory instead of re-running scripts from scratch. A single function, peter(), opens an interactive chat in the console or, given a prompt, runs the agent loop and returns a value that can be piped into further prompts. Supports the 'Anthropic', 'OpenAI' and 'Google Gemini' application programming interfaces, 'OpenAI'-compatible endpoints, the 'Claude Code' and 'Codex' command line tools, local 'Ollama' conversational models, and System One typed-decision models such as 'Jev', 'Clef' and 'Clef Flash' , whose typed yes/no, choice and score answers can be used directly in if() and for() statements. Tools for reading, writing, editing and searching files and for evaluating 'R' code are implemented in 'R'; skills, extensions, Model Context Protocol ('MCP') servers, sub-agents and 'shiny' apps are supported. Sessions are recorded as 'R' scripts, 'R Markdown', 'Quarto' or 'Jupyter' documents that can be re-run. Writing files and evaluating model-generated code require the user's permission by default. License: MIT + file LICENSE URL: https://broccolito.github.io/gptr/, https://github.com/Broccolito/gptr BugReports: https://github.com/Broccolito/gptr/issues Depends: R (>= 4.2.0) Imports: cli (>= 3.6.0), curl (>= 6.0.0), graphics, grDevices, jsonlite (>= 1.8.8), methods, processx (>= 3.8.0), ps (>= 1.8.0), rlang (>= 1.1.0), stats, tools, utils, yaml (>= 2.3.0) Suggests: bslib, chromote, codetools, data.table, DBI, duckdb, httpuv, keyring, knitr, later, magick, openssl, ragg, reticulate, rmarkdown, RSQLite, rstudioapi, shiny, stringi, testthat (>= 3.2.0), vctrs, withr Enhances: repr VignetteBuilder: knitr, rmarkdown Config/testthat/edition: 3 Copyright: file inst/COPYRIGHTS Encoding: UTF-8 Language: en-US NeedsCompilation: no Roxygen: list(markdown = TRUE) SystemRequirements: Optional: Ollama (>= 0.35.1) for native local decision models; other optional external programs: 'claude' (Claude Code) and 'codex' (Codex) for subscription providers, 'quarto' for 'Quarto' documents, and a 'Chrome'-family browser for app screenshots. Config/roxygen2/version: 8.1.1 Config/pak/sysreqs: chromium libssl-dev Repository: https://broccolito.r-universe.dev Date/Publication: 2026-10-17 03:06:10 UTC RemoteUrl: https://github.com/broccolito/gptr RemoteRef: HEAD RemoteSha: 0c4b0003ca33a58777f9ee26f1cc268c5ddde83b Packaged: 2026-10-17 04:49:44 UTC; root Author: Wanjun Gu [aut, cre, cph] (ORCID: ), Mario Zechner [ctb, cph] (Author of 'pi' (MIT), from which tool texts and templates are derived) Maintainer: Wanjun Gu