10 Agent options
An agent is an assistant that can act autonomously across multiple steps — writing code, running it, reading the result, and deciding what to do next — rather than completing one line or answering one question. Here’s some of the current options.
Note that agent software is moving fast, and the best options are changing frequently. This section was last updated Aug 2026.
10.1 VS Code or clones with GitHub Copilot’s agent mode
You’ve already met Copilot for inline completion, ask mode and edit mode in Section 1. Agent mode is the same tool, but let loose across your terminal and file system with tools it can call on its own. We’ll run our first example with it in the next module.
10.2 GitHub Copilot CLI
Use the terminal to run Copilot agents, useful when you want to script or automate agent runs (for example, looping over several sub-directories with different prompts) rather than clicking through a chat window. Billed via your Copilot subscription rather than per-token API usage.
10.3 Claude Code
Claude Code is a subscription-based agent that runs from your terminal, an IDE extension, or entirely in the cloud via a web interface. It reads and edits files, runs shell commands, and can work through a multi-step task with minimal supervision if you let it. In my own experience and in the formal test-case evaluations my colleagues and I ran, Claude models have had a strong track record on R and statistics tasks specifically, which matters more to us here than general coding benchmarks for software engineering.
If you have an OpenAI subscription Codex is the equivalent to Anthropic’s Claude Code.
10.4 Cline
A VS Code extension that is “bring your own key” (BYOK) — you supply an API key and pay per token. More expensive to run than a Copilot subscription for heavy use, but far more customisable: you can fully rewrite the system prompt and create custom modes for different kinds of work.
Earlier versions of this book, and the study described in Section 3, used Roo Code — a popular fork of Cline with an “orchestrator” mode that could delegate sub-tasks to other agents. Roo Code discontinued its VS Code extension in May 2026 and moved to a hosted, source-available product that runs remotely rather than in your editor. This is common in the AI software space, so agent options are constantly evolving. The original Roo extension is still openly licensed but is archived and no longer maintained, and its own shutdown notice points users back to Cline. So as of writing, Cline is the main alternative at the moment if you want a BYOK agent running locally in your editor, and it’s what I use for the examples in this book.
10.5 Positron Assistant
Positron is Posit’s newer IDE (a fork of VS Code, built for data science). Its built-in assistant gives Copilot-like completion and chat, but as of writing supports fewer providers than the options above and is still on an early version number — expect it to keep changing.
There’s also a growing ecosystem of agents that run from inside R itself, rather than as an IDE extension — see Large Language Model Tools for R for an up-to-date list. We’ll build the simplest possible version of one of these ourselves in Section 7.
Pick two agent options from this list that you have access to. Give both the same prompt: “Read fish-coral-cover-sites.csv and make a ggplot of pres.topa against CB_cover.” Compare not just the output, but how much you had to intervene along the way.