Rgent

An AI assistant that lives inside RStudio. Rgent opens a chat pane in the Viewer that sees what you're working on: your data frames, the file open in the editor, and the last output or error. It can run code in your session, edit your file and explain your plots.

Get an access code at rgentai.com.

Installation

install.packages("rstudioai", repos = c("https://nathanbresette.r-universe.dev", "https://cloud.r-project.org"))

library(rstudioai)
run_rgent()   # opens the chat pane in RStudio's Viewer

R-universe builds the package from this repository, so this installs a ready-built version for Windows, macOS and Linux. To install straight from GitHub instead: remotes::install_github("NathanBresette/Rgent-AI", upgrade = "never").

After the first start, Rgent opens by itself when RStudio starts (setup_rprofile_auto_start() adds this to your .Rprofile). When a new version is installed, the chat tells you and offers Restart R to load it.

Features

Chat that knows your session

Rgent chat

Edits to your open file

Rgent can change the file open in the editor (R scripts, R Markdown and Quarto). Each change appears as a red/green diff card with Accept, Reject and Undo. It flags edits that would break an R Markdown chunk. Long files are read and searched as needed.

Data Explorer

Rgent Data Explorer

Also

Privacy and security

Requirements

License

MIT. See LICENSE.

Citation

@software{bresette_rgent,
  title  = {Rgent: An AI Assistant for RStudio},
  author = {Bresette, Nathan},
  year   = {2026},
  url    = {https://github.com/NathanBresette/Rgent-AI}
}