gptr 1.0.0 is a complete rewrite: an agent harness that runs inside the live R session and works on the objects already in memory.
get_response() and dataframe_to_text(), is removed with no aliases.get_response(), use
session = peter("your prompt", model = "openai/gpt-6-sol"), which returns a session object;
its answer is session$text, and session |> peter("next prompt") continues the conversation.
The key comes from OPENAI_API_KEY (or a .env file read with gptr_env()) instead of the
api_key argument, instructions that went into system_specification go into the prompt or
the project instructions file .gptr/vignette.Rmd, and answers stream to the console when a
person is present instead of through print_response.dataframe_to_text(), pass the data frame to peter() as context, for example
peter("Which variables are correlated?", mtcars): gptr describes the object compactly and
the model computes on it in your session.model argument or with gptr_config().peter() is the single entry point. Without a prompt it opens a chat in the console; with a
prompt it runs the agent loop and returns the session. The pipe steers one session:
peter("...") |> peter("...") adds turns to the same object. gptr_fork() is the only way to
branch. Sessions are saved in the project and resumed with gptr_sessions(),
gptr_resume() and gptr_last().gptr_providers(check_login = TRUE) shows CLI sign-in status.peter$grep(), peter$find() and peter$ls(); shell, Python, SQL and knitr engines
are reached through peter$sh(), peter$py(), peter$sql() and peter$knit().claude command-line tool, experimental) and the ChatGPT plan (through codex) are
supported without keys. See gptr_providers() and gptr_models().peter() returns logical, choice or score vectors with
their probabilities (gptr_prob()) that work inside if, for and while, one element per
input. A generative model can emulate them; emulated answers are marked as uncalibrated.manual (default), edits, auto and plan, rules with
gptr_permissions(), and an advisory risk classifier, gptr_risk(). A permission question
without a person present stops the run with a classed condition.peter()
call in .R, .Rmd, .qmd and .ipynb documents and replays without model calls
(gptr_doc(), gptr_source(), gptr_blocks(), gptr_cache()).gptr_init() creates a .gptr/ project workspace with the project instructions file
.gptr/vignette.Rmd; gptr_config() and gptr_trust() manage settings and trust.gptr_rewind(), gptr_checkpoints() and /undo restore objects, files and the
conversation.agents =, parallel =, gptr_parallel()), across
providers.gptr_register(), gptr_spec() and the spec constructors).gptr_mcp(), gptr_mcp_add()) that exposes server
tools as R functions, and gptr_mcp_serve(), which serves the live session to other agents.gptr_artifacts()).gptr_login() signs in to
providers and MCP servers, gptr_env() loads .env files (including the jev-key alias) and
gptr_scrub() cleans files that captured a key.gptr_usage(), gptr_prompt(), gptr_describe() and the
budget argument.background = TRUE) are experimental.?gptr_security and ?gptr_egress for what gptr does on your behalf and what it sends to
model providers, and ?gptr_options for every option.gptr_message_billing_env condition with the removed names, never their values. Handlers
use muffleMessage; the notice respects gptr.quiet. Actual billing refusals remain errors.yolo mode (mode = "yolo", /mode yolo) runs actions without approval, including
package installs, writes anywhere and gptr's own configuration functions. A person is still
asked before deleting files outside the project or protected files, rm(list = ls()),
quitting R, options(gptr.*) and sending a secret over the network; a one-time notice says
so. The classifier reads code; it is not a sandbox.type_ahead: "steer" or "follow_up"); /command and !code lines wait for the next
prompt. The terminal does not echo them into the answer; each shows once in its notice. On
the CLI routes a steer is sent after the CLI's current response.peter> prompt of a macOS terminal is sent as one message, and a line
typed or pasted before a question (an approval, a choice, gptr_confirm()) never answers it.
A block pasted at an approval or a choice is dropped, not read as the answer, and pasted
fences and """ blocks are read at once.!code completes R code at peter> there and in RStudio's console.gptr_parallel()
print one line when each sub-agent starts and ends.peter() call made by the agent's own code without envir = works in an overlay of the
caller's environment; its objects are in res$envir.object.size(),
code the agent runs keeps no parse data, and values returned by sub-agents stay small./model and model = accept a provider name alone, such as claude-cli or codex-cli
(its first model); /model checks the name before the first prompt. A model declared without
tool calls says once that the session's tools are not sent.api = "bedrock-converse" signs requests
with Signature Version 4 in R. Region and endpoint are provider-record data
(compat = list(region = ...), base_url), so a SigV4 gateway is configuration; see
?gptr_provider. AWS_ACCESS_KEY_ID is handled as a secret./cost lists each agent and one total that keeps
the known cost when a request's cost is unknown, and /context says the CLI keeps its own
transcript./undo and gptr_rewind() restore what the agent's served calls changed,
and a rewind or compaction starts a fresh CLI conversation. Automatic compaction does not run
there, since the CLI keeps its own context. /undo reports each item once, by its outcome.par(mfrow = c(1, 2)) keep every panel and knitr chunks keep their
figures; plots of calls served to the CLI routes are drawn on your device..x; parallel = with .opts$context = "none" is an
error. A peter() call made by the agent's code without model = uses the running session's
model, and the egress question names the sub-agent that asks. Assignments in a sub-agent's
overlay are not reported as overwriting your objects.p = normalizePath("../x.txt"); file.remove(p).[a] only when it has a rule to suggest; result lines and errors wrap in the margin, and a
failed r call still lists its objects; sub-agent failures give their reason and count, and
repeated nested prompts are numbered; command output and long prompts stay in the margin;
Codex commands show without their shell wrapper and Codex messages without a held last word; a
cut code block says so inside its fence; wide pipe tables stream verbatim; /model and
/status name the model behind a CLI's default.get_response() and dataframe_to_text() for the
OpenAI 'ChatGPT' API (released 2025-04-05, after 0.5.0 and 0.6.0 in May 2024).