<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>R on Posit Open Source</title>
    <link>https://opensource.posit.co/languages/r/</link>
    <description>Recent content in R on Posit Open Source</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 19 Nov 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://opensource.posit.co/languages/r/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Shiny for R 1.15</title>
      <link>https://opensource.posit.co/blog/2026-11-19_shiny-r-1-15/</link>
      <pubDate>Thu, 19 Nov 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-11-19_shiny-r-1-15/</guid>
      <dc:creator>Barret Schloerke</dc:creator><description><![CDATA[<p>We&rsquo;re happy to announce that <a href="https://cran.r-project.org/package=shiny" target="_blank" rel="noopener">Shiny for R v1.15</a> is now on CRAN!</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">install.packages</span><span class="p">(</span><span class="s">&#34;shiny&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
<p>The highlights:</p>
<ul>
<li>a bundled <a href="#agent-skill">Agent Skill</a> teaches coding agents how to write Shiny for R apps,</li>
<li><a href="#autoreload-out-of-the-box">autoreload</a> no longer needs an extra package install, and</li>
<li>sessions are <a href="#refresh-and-reconnect">steadier when a page is refreshed or reconnected</a>.</li>
</ul>
<p>This is a small release: one new feature, and a round of fixes for things that came up after v1.14. Full details are in the <a href="https://shiny.posit.co/r/reference/shiny/1.15.0/upgrade.html" target="_blank" rel="noopener">Shiny for R release notes</a>.</p>
<h2 id="agent-skill">Agent skill
</h2>
<p>When we <a href="https://opensource.posit.co/blog/2026-08-04_shiny-r-1-14-python-1-7#agent-skills">shipped agent skills in Shiny for Python v1.7</a>, we said they were coming to R soon. They&rsquo;re here.</p>
<p>Coding agents write a lot of Shiny apps, and they tend to make the same mistakes: nested <code>fluidRow()</code> and <code>column()</code> pyramids where a bslib layout would do, tabs faked with buttons and <code>conditionalPanel()</code>, slow work that blocks every session, and <code>print()</code> calls in place of a debugger. Shiny v1.15 ships a <code>shiny-for-r</code> skill that follows the <a href="https://agentskills.io" target="_blank" rel="noopener">Agent Skills</a> convention and steers agents toward what the framework already provides.</p>
<p>To show the difference, here is one small app written both ways. The data, inputs, and outputs are the same; only the choice of layout and navigation changes.</p>
<div class="grid gap-12 items-start mt-12 md:grid-cols-2">
<div class="prose max-w-none">
<figure>
<img src="https://opensource.posit.co/blog/2026-11-19_shiny-r-1-15/skill-before.png" data-fig-alt="A plain Shiny app titled Fuel economy. A grey box of inputs sits on the left. Three numbers are shown as plain text under small headings, above two buttons labelled Plot and Data and an unstyled scatterplot." alt="The habits above: a fluidRow() and column() grid, with two buttons and conditionalPanel() standing in for tabs." />
<figcaption aria-hidden="true">The habits above: a <code>fluidRow()</code> and <code>column()</code> grid, with two buttons and <code>conditionalPanel()</code> standing in for tabs.</figcaption>
</figure>
</div>
<div class="prose max-w-none">
<figure>
<img src="https://opensource.posit.co/blog/2026-11-19_shiny-r-1-15/skill-after.png" data-fig-alt="The same Fuel economy app as a bslib dashboard. Inputs sit in a sidebar. Three value boxes show the numbers in large type, above a card with Plot and Data tabs that holds a coloured scatterplot." alt="What the skill points to: a bslib page with a sidebar, value boxes, and a card with real tabs." />
<figcaption aria-hidden="true">What the skill points to: a bslib page with a sidebar, value boxes, and a card with real tabs.</figcaption>
</figure>
</div>
</div>
<p>The skill is an index. Its <code>SKILL.md</code> is a short table of topics, and each row points to one of 21 reference files. An agent reads the index, then opens only the one or two references its task touches:</p>
<table>
  <thead>
      <tr>
          <th>Area</th>
          <th>References</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Foundations</td>
          <td>reactivity, modules, session lifecycle</td>
      </tr>
      <tr>
          <td>Async</td>
          <td>promises, <code>ExtendedTask</code></td>
      </tr>
      <tr>
          <td>Dashboards</td>
          <td>dashboard design, bslib components, layouts</td>
      </tr>
      <tr>
          <td>Navigation and dynamic UI</td>
          <td>navigation, dynamic UI</td>
      </tr>
      <tr>
          <td>Outputs</td>
          <td>plots, tables, files</td>
      </tr>
      <tr>
          <td>Feedback and state</td>
          <td>notifications and validation, bookmarking</td>
      </tr>
      <tr>
          <td>Theming and extending</td>
          <td>theming and assets, custom components</td>
      </tr>
      <tr>
          <td>Testing and observability</td>
          <td><code>testServer()</code>, debugging, OpenTelemetry, ecosystem</td>
      </tr>
  </tbody>
</table>
<p>The last one, ecosystem, helps an agent decide when a companion package such as DT, plotly, leaflet, shinychat, or shinytest2 already solves the problem.</p>
<h3 id="using-the-skill">Using the skill
</h3>
<p>Agents that use <a href="https://posit-dev.github.io/btw/" target="_blank" rel="noopener">btw</a> find the skill on their own. btw looks for skills in every attached package, so once your session has run <code>library(shiny)</code>, the skill is available. There is nothing to install.</p>
<p>To use the skill with Claude Code or another skill-aware tool, copy it into your project:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">btw</span><span class="o">::</span><span class="nf">btw_skill_install_package</span><span class="p">(</span><span class="s">&#34;shiny&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
<p>By default this copies the skill into your project&rsquo;s <code>.btw/skills/</code> or <code>.agents/skills/</code> folder. Use <code>scope</code> to pick a different place, such as <code>scope = &quot;.claude/skills&quot;</code> for Claude Code or <code>scope = &quot;user&quot;</code> to make the skill available in all of your projects.</p>
<p>Because the skill ships inside the package, it matches the version of Shiny you have installed. It&rsquo;s also tested with the package: every code example must parse, and every Shiny function it names must still be exported, so a renamed function fails our checks instead of misleading your agent.</p>
<p>You can read the skill yourself, too. It lives at <code>system.file(&quot;skills&quot;, &quot;shiny-for-r&quot;, package = &quot;shiny&quot;)</code>.</p>
<h2 id="autoreload-out-of-the-box">Autoreload out of the box
</h2>
<p>With <code>options(shiny.autoreload = TRUE)</code> (or <a href="https://shiny.posit.co/r/reference/shiny/latest/devmode.html" target="_blank" rel="noopener"><code>devmode()</code></a>), Shiny reloads your app in the browser each time you save a file. Until now, Shiny used the <a href="https://opensource.posit.co/blog/2026-06-29_watcher-0-2-0">watcher</a> package to do this only when it was installed, and fell back to an older, slower method that checked your files on a timer when it wasn&rsquo;t.</p>
<p>In v1.15, watcher is a required dependency and the fallback is gone. Autoreload now works the same way for everyone: the operating system tells Shiny when a file changes, so there is no polling and no extra package to install.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">options</span><span class="p">(</span><span class="n">shiny.autoreload</span> <span class="o">=</span> <span class="kc">TRUE</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">shiny</span><span class="o">::</span><span class="nf">runApp</span><span class="p">(</span><span class="s">&#34;myapp&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
<figure>
<img src="https://opensource.posit.co/blog/2026-11-19_shiny-r-1-15/autoreload.gif" data-fig-alt="An animation with an editor showing app.R on the left and a browser showing the running app on the right. A line that sets the histogram colour is edited and saved, and the histogram in the browser turns from blue to red. Then the heading text is edited and saved, and the heading in the browser changes to match." alt="Each save of app.R reloads the app in the browser." />
<figcaption aria-hidden="true">Each save of <code>app.R</code> reloads the app in the browser.</figcaption>
</figure>
<p>The <code>shiny.autoreload.interval</code> and <code>shiny.autoreload.pattern</code> options work as before.</p>
<h2 id="refresh-and-reconnect">Refresh and reconnect
</h2>
<p>Shiny v1.14 added <a href="https://opensource.posit.co/blog/2026-08-04_shiny-r-1-14-python-1-7#module-cleanup"><code>session$destroy()</code></a> for cleaning up dynamic modules. That work had a side effect we didn&rsquo;t intend, and it led us to a second, older bug nearby. Both are fixed in v1.15.</p>
<h3 id="async-work-that-outlives-the-page">Async work that outlives the page
</h3>
<p>In v1.14, closing a session destroyed every reactive value and expression created in it. That sounds tidy, but async work often finishes <em>after</em> the browser has gone away. Refresh the page while an <a href="https://shiny.posit.co/r/reference/shiny/latest/ExtendedTask.html" target="_blank" rel="noopener"><code>ExtendedTask</code></a> is running, and when the task settled you&rsquo;d see an error like this in your R console:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Can&#39;t access reactive `Theme Counter`; its module session has been destroyed</span></span></code></pre></div></div>
<p>The same thing happened with any promise or <code>later()</code> callback that read or set a reactive after the session closed. And there was little you could do about it, since the access was often inside Shiny, bslib, or shinychat instead of your own code.</p>
<p>In v1.15, closing a session and destroying one are two different things:</p>
<ul>
<li>When a session <strong>closes</strong>, its reactives stay readable at their last value, and R&rsquo;s garbage collector reclaims them later. Late async work finishes quietly. Observers are still destroyed, so a late write can&rsquo;t wake the session back up.</li>
<li>When you call <strong><code>session$destroy()</code></strong> on a live session, everything is torn down as before, and reading a destroyed reactive is still an error. In that case, a stale read is a real bug that you want to hear about.</li>
</ul>
<p><code>onDestroy()</code> callbacks run in both cases, so your module cleanup code needs no changes.</p>
<h3 id="outputs-after-a-reconnect">Outputs after a reconnect
</h3>
<p>If your app uses <a href="https://shiny.posit.co/r/reference/shiny/latest/session.html" target="_blank" rel="noopener"><code>session$allowReconnect()</code></a>, a browser that loses its connection can connect again to a new session. The browser kept its record of each output&rsquo;s state from the old session, though, so the first messages from the new session looked out of order. The browser console filled with errors like</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">the output is in an unexpected state of: &#39;value&#39;</span></span></code></pre></div></div>
<p>and, worse, the first value for each output was dropped. Outputs kept showing results from the old session until something made them update again.</p>
<p>The browser now resets its output state when it reconnects, so the new session&rsquo;s first values are drawn as they arrive.</p>
<h2 id="other-improvements">Other improvements
</h2>
<p>A few more changes worth a quick mention. The full list is in the <a href="https://shiny.posit.co/r/reference/shiny/1.15.0/upgrade.html" target="_blank" rel="noopener">release notes</a>:</p>
<ul>
<li><a href="https://shiny.posit.co/r/reference/shiny/latest/dateInput.html" target="_blank" rel="noopener"><code>dateInput()</code></a>&rsquo;s <code>datesdisabled</code> now works when <code>format</code> is not the default <code>yyyy-mm-dd</code>. For example, <code>dateInput(&quot;day&quot;, &quot;Day&quot;, format = &quot;mm/dd/yyyy&quot;, datesdisabled = &quot;2026-11-26&quot;)</code> now disables November 26 as you&rsquo;d expect.</li>
<li><code>dateInput(language =)</code> now loads its locale when <code>options(shiny.minified = FALSE)</code> is set, instead of falling back to English.</li>
<li><code>callModule()</code>, <code>moduleServer()</code>, <code>testServer()</code>, and <code>session$destroy()</code> work again with module ids that are character vectors. The parts are joined the same way <code>NS()</code> joins them, so <code>c(&quot;a&quot;, &quot;b&quot;)</code> becomes <code>&quot;a-b&quot;</code>. Since v1.14 these failed with <code>Invalid `namespace`</code>.</li>
<li><code>invalidateLater()</code>, <code>reactivePoll()</code>, and <code>reactiveTimer()</code> work again with a custom session object that has no <code>onDestroy()</code> method. Since v1.14 they failed with <code>attempt to apply non-function</code>.</li>
<li><code>runApp()</code> now prints its <code>Listening on http://…</code> message only after the port is open, so tools that wait for that message can connect right away. (Thanks, <a href="https://github.com/nbenn" target="_blank" rel="noopener">@nbenn</a>!)</li>
<li>A session whose outputs throw an unhandled error while being flushed is now closed, instead of the error escaping to the server loop.</li>
<li><a href="https://shiny.posit.co/r/reference/shiny/latest/testServer.html" target="_blank" rel="noopener"><code>testServer()</code></a> gives clearer errors when a <code>downloadHandler()</code>&rsquo;s <code>content</code> function writes no file, and when it is handed a function that is neither a server nor a module server. It also removes a module&rsquo;s outputs and downloads when <code>session$destroy(id)</code> is called.</li>
<li><code>ExtendedTask</code>&rsquo;s OpenTelemetry output is more complete: the &ldquo;add to queue&rdquo; log now has its message, and invocations that waited behind a running one now get their own span.</li>
<li>The server now rejects malformed websocket messages. A request for an unknown session method gets an <code>Unknown method</code> error response, and a message whose <code>method</code> is not a single string is refused.</li>
</ul>
<h2 id="in-closing">In closing
</h2>
<p>We&rsquo;re excited to see what you (and your agents) build with this release. As always, if you have questions or feedback, <a href="https://discord.gg/yMGCamUMnS" target="_blank" rel="noopener">join us on Discord</a> or open an issue on <a href="https://github.com/rstudio/shiny/issues/new" target="_blank" rel="noopener">rstudio/shiny</a>. Happy Shiny-ing!</p>
<h2 id="acknowledgements">Acknowledgements
</h2>
<p>A big thank you to all the folks who helped make this release happen by opening issues and contributing code:</p>
<p><a href="https://github.com/000wahab000" target="_blank" rel="noopener">@000wahab000</a>, <a href="https://github.com/BajczA475" target="_blank" rel="noopener">@BajczA475</a>, <a href="https://github.com/christophsax" target="_blank" rel="noopener">@christophsax</a>, <a href="https://github.com/cpsievert" target="_blank" rel="noopener">@cpsievert</a>, <a href="https://github.com/djacob65" target="_blank" rel="noopener">@djacob65</a>, <a href="https://github.com/gadenbuie" target="_blank" rel="noopener">@gadenbuie</a>, <a href="https://github.com/JamesStewartRE" target="_blank" rel="noopener">@JamesStewartRE</a>, <a href="https://github.com/jeis4wpi" target="_blank" rel="noopener">@jeis4wpi</a>, <a href="https://github.com/josefelipe0036" target="_blank" rel="noopener">@josefelipe0036</a>, <a href="https://github.com/JosiahParry" target="_blank" rel="noopener">@JosiahParry</a>, <a href="https://github.com/karangattu" target="_blank" rel="noopener">@karangattu</a>, <a href="https://github.com/LeonidasZhak" target="_blank" rel="noopener">@LeonidasZhak</a>, <a href="https://github.com/ml-ebs-ext" target="_blank" rel="noopener">@ml-ebs-ext</a>, <a href="https://github.com/nbenn" target="_blank" rel="noopener">@nbenn</a>, <a href="https://github.com/roberson4627-cpu" target="_blank" rel="noopener">@roberson4627-cpu</a>, <a href="https://github.com/schloerke" target="_blank" rel="noopener">@schloerke</a>, <a href="https://github.com/shelbylevel" target="_blank" rel="noopener">@shelbylevel</a>, <a href="https://github.com/shikokuchuo" target="_blank" rel="noopener">@shikokuchuo</a>, <a href="https://github.com/taekop" target="_blank" rel="noopener">@taekop</a>, and <a href="https://github.com/vedhav" target="_blank" rel="noopener">@vedhav</a>.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-11-19_shiny-r-1-15/feature.png" length="360118" type="image/png" />
    </item>
    <item>
      <title>mizu: thread-speed parallel R and Python over shared memory</title>
      <link>https://opensource.posit.co/blog/2026-11-05_mizu-0-1-0/</link>
      <pubDate>Thu, 05 Nov 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-11-05_mizu-0-1-0/</guid>
      <dc:creator>Charlie Gao</dc:creator><description><![CDATA[<p>Resampling is an expensive part of modelling work.
Fit the same model hundreds of times over, so you attempt to do them in parallel over a pool of workers.
However the speedup you get is usually much less than you&rsquo;d hoped for.</p>
<p>The reason lies in how a process pool distributes and coordinates work: each task is serialized, copied through a socket and deserialized on the other side, and each result comes back the same way.
When tasks are small, this overhead can exceed the computation itself, and when the data is large, every worker holding a copy exhausts memory.</p>
<p>Shared memory avoids both costs.
A task is written once into memory that both processes can see, and the worker reads it without copying.</p>
<p>We&rsquo;re introducing libmizu, a C library for lock-free shared memory IPC, and mizu and pymizu, the R and Python bindings to it.
Together they provide fast async and parallel computing on a single machine, and zero-copy data exchange between R and Python processes.</p>
<ul>
<li><a href="https://github.com/shikokuchuo/libmizu" target="_blank" rel="noopener">libmizu</a>, the C core</li>
<li><a href="https://github.com/shikokuchuo/mizu" target="_blank" rel="noopener">mizu</a>, the R package built on it, now on CRAN</li>
<li><a href="https://github.com/shikokuchuo/pymizu" target="_blank" rel="noopener">pymizu</a>, the Python package on the same core, now on PyPI</li>
</ul>
<p>The two bindings share one wire format, so R and Python processes can talk to each other directly.
Common data structures such as vectors, matrices, data frames and Arrow tables are shared between the two languages as zero-copy views.</p>
<p>The name &lsquo;mizu&rsquo; is Japanese for water: data flows between processes and takes the shape of whichever language receives it.</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-1" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-1-1">R</a></li>
<li><a href="#tabset-1-2">Python</a></li>
</ul>
<div id="tabset-1-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">install.packages</span><span class="p">(</span><span class="s">&#34;mizu&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
<p>Requires R 4.3 or later.</p>
</div>
<div id="tabset-1-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install pymizu</span></span></code></pre></div></div>
<p>Requires Python 3.10 or later.
Add <code>pymizu[numpy]</code> for zero-copy array views, and <code>pymizu[cloudpickle]</code> to submit lambdas and closures as tasks.
The extension compiles the vendored C core, so there is no system library to install.</p>
</div>
</div>
<p>For the C library, clone the repository and run <code>make</code>; see the README for further details.
All three are at the <em>experimental</em> lifecycle stage.</p>
<h2 id="from-100-µs-to-under-1-µs">From 100 µs to under 1 µs
</h2>
<p>A task round trip is the time to submit a trivial task to a pool and collect its result: the host publishes the task, a worker runs it, the result is published, and the host collects it.
On an Apple M4 Pro, this round trip takes 0.8 µs in R and 0.7 µs in Python, and 0.4 µs in the C core.
The same round trip over sockets, in mirai for R or <code>ProcessPoolExecutor</code> for Python, takes around 100 µs.</p>
<p>This gain of two orders of magnitude represents a generational leap, allowing you to divide work as finely as you would with threads.
A task of ten microseconds is worth sending to a worker, and a map over thousands of such tasks completes in milliseconds.</p>
<h2 id="meet-the-pool">Meet the pool
</h2>
<p>A pool is a set of worker processes that divide submitted tasks among themselves.
<code>submit</code> returns a handle immediately, and <code>collect</code> waits for the value.
<code>map</code> works the same way, but the function and data cross into shared memory once, and the workers claim ranges of elements from a shared cursor.</p>
<p>Creating the pool takes a short amount of time as each worker is a fresh R or Python process that needs to be started.
The usual practice is to start a pool once and keep it around, as everything after that one-time cost runs at the speeds shown above.</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-2" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-2-1">R</a></li>
<li><a href="#tabset-2-2">Python</a></li>
</ul>
<div id="tabset-2-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">mizu</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">p</span> <span class="o">&lt;-</span> <span class="nf">mizu_pool</span><span class="p">(</span><span class="n">n_workers</span> <span class="o">=</span> <span class="m">4L</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">t</span> <span class="o">&lt;-</span> <span class="nf">mizu_submit</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="nf">sum</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o">+</span> <span class="n">y</span><span class="p">,</span> <span class="n">x</span> <span class="o">=</span> <span class="m">1</span><span class="o">:</span><span class="m">10</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="m">100</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nf">mizu_collect</span><span class="p">(</span><span class="n">t</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; [1] 155</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">m</span> <span class="o">&lt;-</span> <span class="nf">mizu_map</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="nf">c</span><span class="p">(</span><span class="m">1</span><span class="p">,</span> <span class="m">4</span><span class="p">,</span> <span class="m">9</span><span class="p">,</span> <span class="m">16</span><span class="p">,</span> <span class="m">25</span><span class="p">),</span> <span class="n">sqrt</span><span class="p">,</span> <span class="n">.template</span> <span class="o">=</span> <span class="nf">numeric</span><span class="p">(</span><span class="m">1</span><span class="p">))</span>
</span></span><span class="line"><span class="cl"><span class="nf">mizu_collect</span><span class="p">(</span><span class="n">m</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; [1] 1 2 3 4 5</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">mizu_pool_stop</span><span class="p">(</span><span class="n">p</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-2-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">math</span>
</span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">pymizu</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">with</span> <span class="n">pymizu</span><span class="o">.</span><span class="n">Pool</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span> <span class="k">as</span> <span class="n">pool</span><span class="p">:</span>
</span></span><span class="line"><span class="cl">    <span class="n">task</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">submit</span><span class="p">(</span><span class="nb">sum</span><span class="p">,</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">11</span><span class="p">),</span> <span class="mi">100</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="nb">print</span><span class="p">(</span><span class="n">task</span><span class="o">.</span><span class="n">collect</span><span class="p">(</span><span class="n">timeout</span><span class="o">=</span><span class="mi">5</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; 155</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">    <span class="n">m</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">map</span><span class="p">(</span><span class="n">math</span><span class="o">.</span><span class="n">sqrt</span><span class="p">,</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="mi">25</span><span class="p">])</span>
</span></span><span class="line"><span class="cl">    <span class="nb">print</span><span class="p">(</span><span class="n">m</span><span class="o">.</span><span class="n">collect</span><span class="p">())</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; [1.0, 2.0, 3.0, 4.0, 5.0]</span></span></span></code></pre></div></div>
<p><code>PoolExecutor</code> adapts a pool to the <code>concurrent.futures.Executor</code> interface, so code written against <code>ProcessPoolExecutor</code> drops in, and <code>wait</code>, <code>as_completed</code> and <code>asyncio.wrap_future</code> work unchanged.</p>
</div>
</div>
<h3 id="r-in-polars-out">R in, polars out
</h3>
<p>The workers in a pool don&rsquo;t have to be the same language as the host.
Here an R session passes its built-in <code>mtcars</code> data frame to Python workers, which summarize it with polars.
The data frame crosses as an Arrow-backed <code>pymizu.Frame</code>, and the polars result comes back as a data frame whose columns are zero-copy ALTREP views into the same polars frame.</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-3" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-3-1">R</a></li>
<li><a href="#tabset-3-2">Python</a></li>
</ul>
<div id="tabset-3-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">p</span> <span class="o">&lt;-</span> <span class="nf">mizu_pool</span><span class="p">(</span><span class="n">n_workers</span> <span class="o">=</span> <span class="m">4L</span><span class="p">,</span> <span class="n">launcher</span> <span class="o">=</span> <span class="nf">mizu_py_launcher</span><span class="p">())</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">t</span> <span class="o">&lt;-</span> <span class="nf">mizu_submit_call</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">  <span class="n">p</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nf">mizu_call</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">.source</span> <span class="o">=</span> <span class="n">r</span><span class="s">&#34;(import polars as pl
</span></span></span><span class="line"><span class="cl"><span class="s">pl.DataFrame(x).group_by(&#39;cyl&#39;).agg(pl.col(&#39;mpg&#39;).mean()).sort(&#39;cyl&#39;))&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="n">x</span> <span class="o">=</span> <span class="n">mtcars</span>
</span></span><span class="line"><span class="cl">  <span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nf">mizu_collect</span><span class="p">(</span><span class="n">t</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt;   cyl      mpg</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; 1   4 26.66364</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; 2   6 19.74286</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; 3   8 15.10000</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">mizu_pool_stop</span><span class="p">(</span><span class="n">p</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-3-2">
<p>The reverse direction: a Python host drives R workers and reads the result into polars.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">polars</span> <span class="k">as</span> <span class="nn">pl</span>
</span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">pymizu</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">with</span> <span class="n">pymizu</span><span class="o">.</span><span class="n">Pool</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="n">launcher</span><span class="o">=</span><span class="n">pymizu</span><span class="o">.</span><span class="n">r_launcher</span><span class="p">())</span> <span class="k">as</span> <span class="n">pool</span><span class="p">:</span>
</span></span><span class="line"><span class="cl">    <span class="n">task</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">submit</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">pymizu</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="n">source</span><span class="o">=</span><span class="s2">&#34;aggregate(mpg ~ cyl, data = mtcars, FUN = mean)&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="nb">print</span><span class="p">(</span><span class="n">pl</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">task</span><span class="o">.</span><span class="n">collect</span><span class="p">()))</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; shape: (3, 2)</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; ┌─────┬───────────┐</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; │ cyl ┆ mpg       │</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; │ --- ┆ ---       │</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; │ f64 ┆ f64       │</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; ╞═════╪═══════════╡</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; │ 4.0 ┆ 26.663636 │</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; │ 6.0 ┆ 19.742857 │</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; │ 8.0 ┆ 15.1      │</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; └─────┴───────────┘</span></span></span></code></pre></div></div>
</div>
</div>
<p>Notice that you did not need to perform any marshalling or conversion step on either side.
A numeric vector arrives in Python as a NumPy array, and a data frame as a <code>pymizu.Frame</code>, which <code>pl.from_arrow()</code> or <code>pa.table()</code> takes directly.
A NumPy array, or a polars, pyarrow or pandas frame, arrives in R as a vector or data frame.
Arrow tables and record batches cross the same way in both directions, and <code>mizu_as_arrow()</code> reads a received frame as Arrow in R.</p>
<p>Above a small size floor where it&rsquo;s faster to send the object directly, none of these crossings copies the data: both sides read the same shared pages.</p>
<h3 id="maps-within-maps">Maps within maps
</h3>
<p>A worker has access to its own pool, so a mapped function can itself map over the same workers, without deadlock. This is much more convenient than the workarounds we had to find in the past, such as tiered pool specifications.
Here the numbers 1 to 100,000 are split into four parts, and each part is split again across the pool to sum its square roots:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-4" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-4-1">R</a></li>
<li><a href="#tabset-4-2">Python</a></li>
</ul>
<div id="tabset-4-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">parts</span> <span class="o">&lt;-</span> <span class="nf">split</span><span class="p">(</span><span class="nf">as.numeric</span><span class="p">(</span><span class="m">1</span><span class="o">:</span><span class="m">100000</span><span class="p">),</span> <span class="nf">rep</span><span class="p">(</span><span class="m">1</span><span class="o">:</span><span class="m">4</span><span class="p">,</span> <span class="n">each</span> <span class="o">=</span> <span class="m">25000</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">m</span> <span class="o">&lt;-</span> <span class="nf">mizu_map</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">parts</span><span class="p">,</span> <span class="nf">\</span><span class="p">(</span><span class="n">part</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="n">nested</span> <span class="o">&lt;-</span> <span class="nf">mizu_map</span><span class="p">(</span><span class="nf">mizu_current_pool</span><span class="p">(),</span> <span class="n">part</span><span class="p">,</span> <span class="n">sqrt</span><span class="p">,</span> <span class="n">.template</span> <span class="o">=</span> <span class="nf">numeric</span><span class="p">(</span><span class="m">1</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">  <span class="nf">sum</span><span class="p">(</span><span class="nf">mizu_collect</span><span class="p">(</span><span class="n">nested</span><span class="p">))</span>
</span></span><span class="line"><span class="cl"><span class="p">},</span> <span class="n">.template</span> <span class="o">=</span> <span class="nf">numeric</span><span class="p">(</span><span class="m">1</span><span class="p">))</span>
</span></span><span class="line"><span class="cl"><span class="nf">mizu_collect</span><span class="p">(</span><span class="n">m</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt;       1       2       3       4</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; 2635310 4818361 6239529 7388808</span></span></span></code></pre></div></div>
</div>
<div id="tabset-4-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">math</span>
</span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">pymizu</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">parts</span> <span class="o">=</span> <span class="p">[</span><span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">25001</span><span class="p">),</span> <span class="nb">range</span><span class="p">(</span><span class="mi">25001</span><span class="p">,</span> <span class="mi">50001</span><span class="p">),</span> <span class="nb">range</span><span class="p">(</span><span class="mi">50001</span><span class="p">,</span> <span class="mi">75001</span><span class="p">),</span> <span class="nb">range</span><span class="p">(</span><span class="mi">75001</span><span class="p">,</span> <span class="mi">100001</span><span class="p">)]</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">part_total</span><span class="p">(</span><span class="n">part</span><span class="p">):</span>
</span></span><span class="line"><span class="cl">    <span class="n">nested</span> <span class="o">=</span> <span class="n">pymizu</span><span class="o">.</span><span class="n">current_pool</span><span class="p">()</span><span class="o">.</span><span class="n">map</span><span class="p">(</span><span class="n">math</span><span class="o">.</span><span class="n">sqrt</span><span class="p">,</span> <span class="n">part</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="nb">sum</span><span class="p">(</span><span class="n">nested</span><span class="o">.</span><span class="n">collect</span><span class="p">())</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">with</span> <span class="n">pymizu</span><span class="o">.</span><span class="n">Pool</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span> <span class="k">as</span> <span class="n">pool</span><span class="p">:</span>
</span></span><span class="line"><span class="cl">    <span class="n">m</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">map</span><span class="p">(</span><span class="n">part_total</span><span class="p">,</span> <span class="n">parts</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="nb">print</span><span class="p">([</span><span class="nb">round</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> <span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">m</span><span class="o">.</span><span class="n">collect</span><span class="p">()])</span>
</span></span><span class="line"><span class="cl">    <span class="c1">#&gt; [2635310, 4818361, 6239529, 7388808]</span></span></span></code></pre></div></div>
<p>A function defined in your own script, like <code>part_total()</code>, needs the <code>pymizu[cloudpickle]</code> extra, which pickles it by value.
Importable references such as <code>math.sqrt</code> pickle by reference, so the standard pickle suffices.</p>
</div>
</div>
<h3 id="async-without-the-polling">Async, without the polling
</h3>
<p>mizu provides event-driven async, with results feeding into an event loop without polling. For the highest efficiency, a burst of results produces only a single wake-up.</p>
<p>In R, a task or map handle is a promise: <code>then(task, fn)</code> resolves as soon as it completes.
mizu plugs into <code>later</code> and <code>promises</code> pipelines and is ready for Shiny.
In Python, you <code>await</code> a task or a map inside asyncio, and channels support <code>async for</code>.</p>
<h2 id="down-to-the-memcpy-floor">Down to the <code>memcpy</code> floor
</h2>
<p>Architecturally, mizu is quite different from mirai.
Socket-based frameworks pay for every message multiple times: serialize, copy through the kernel, deserialize.
mizu writes each payload once into shared memory in an efficient format.</p>
<p>Large vectors and data frames are mapped and arrive as ALTREP views in R, or as NumPy arrays and Arrow-backed frames in Python.
Workers claim tasks straight off lock-free queues, without requiring something like a task dispatcher in the middle.
Waiting stays out of the kernel entirely on the hot path, with a worker parking itself only when there is nothing to do.</p>
<p>By all measures, we&rsquo;re close to the <code>memcpy</code> floor, the physical limit at which bytes can move through memory.</p>
<h3 id="overhead-measured">Overhead, measured
</h3>
<p>The below is measured using 4 workers on an Apple M4 Pro.
The R figures are compared against mirai, and the Python figures against the standard library&rsquo;s <code>ProcessPoolExecutor</code>:</p>
<table>
  <thead>
      <tr>
          <th>Benchmark</th>
          <th>mizu</th>
          <th>mirai</th>
          <th>pymizu</th>
          <th>ProcessPoolExecutor</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Trivial task round trip</td>
          <td>0.8 µs</td>
          <td>100.5 µs</td>
          <td>0.7 µs</td>
          <td>94.2 µs</td>
      </tr>
      <tr>
          <td>Pipelined throughput, 1 worker</td>
          <td>833,000 tasks/s</td>
          <td>9,700 tasks/s</td>
          <td>2,390,000 tasks/s</td>
          <td>18,500 tasks/s</td>
      </tr>
      <tr>
          <td>Parallel map of 2,000 small tasks, 4 workers</td>
          <td>5.0 ms</td>
          <td>218 ms</td>
          <td>4.3 ms</td>
          <td>129 ms</td>
      </tr>
  </tbody>
</table>
<p>The benchmark scripts are in each repository and you can run them yourself.</p>
<h2 id="yes-microseconds-matter">Yes, microseconds matter
</h2>
<p>You may be wondering: going from 100 µs to 1 µs, these are tiny numbers, does it really matter?</p>
<p>The answer is unequivocally yes, and I have verified it with colleagues from the Tidymodels team.
The important thing to realise is that we&rsquo;re not dealing with each microbenchmark in isolation. In an actual workflow, many of these factors &mdash; transport costs, serialization costs, coordination costs &mdash; will compound and can sometimes reinforce each other if not optimally designed.</p>
<p>We ran four common modelling workloads on 12 workers of a 14-core Apple Silicon Mac, against a sequential baseline: bootstrap metrics, resampled model fits, permutation importance and bootstrap prediction intervals.
Each backend returned results identical to the sequential run.
The speedup versus sequential is shown below:</p>
<table>
  <thead>
      <tr>
          <th>Workload</th>
          <th>mizu</th>
          <th>mirai</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>A: Bootstrap metrics, 5,000 tasks of ~3 ms</td>
          <td>6.7x</td>
          <td>1.8x</td>
      </tr>
      <tr>
          <td>B: Resampled model fits, 250 tasks of ~45 ms</td>
          <td>7.9x</td>
          <td>4.0x</td>
      </tr>
      <tr>
          <td>C: Permutation importance, 240 tasks of ~85 ms</td>
          <td>8.1x</td>
          <td>6.4x</td>
      </tr>
      <tr>
          <td>D: Bootstrap prediction intervals, 400 tasks scoring 250,000 policies</td>
          <td>7.6x</td>
          <td>1.4x</td>
      </tr>
  </tbody>
</table>
<p>These workloads were chosen to be deliberately adversarial, each sized to stress data movement rather than compute.
That is why mirai, already the most performant parallel framework in R, shows such modest speedups here. Also note that 12 workers deliver at best an 8x speedup even with mizu. This is because there are still sequential parts to the workflow, such as collecting and combining the results, and it&rsquo;s what <a href="https://en.wikipedia.org/wiki/Amdahl%27s_law" target="_blank" rel="noopener">Amdahl&rsquo;s law</a> predicts.
The <a href="https://github.com/posit-dev/tidymodels-parallel-benchmark" target="_blank" rel="noopener">benchmark repository</a> contains the code, and my Tidymodels colleagues will follow up with a comprehensive report.</p>
<h2 id="know-the-limits">Know the limits
</h2>
<p>A few things to know before you start:</p>
<ul>
<li>The API is experimental. We may make changes to function names and arguments in response to feedback.</li>
<li>Workers don&rsquo;t see your session. A task runs in a fresh environment on the worker and sees only the arguments you pass: no globals, loaded packages or imports cross over. In R, a task must load any package it needs or use package-namespaced functions. In Python, a callable must be importable by the worker, or pickled by value with the <code>cloudpickle</code> extra.</li>
<li>Not every type crosses between languages. Vectors, strings, lists and dicts, dates and times, data frames and Arrow data cross between R and Python. Language objects such as formulas and functions do not, and mizu reports an error. Arrow data crosses exactly, but a few select types can change along the way: a dictionary-encoded column arrives in R as a factor, and unsigned integers arrive as wider signed types.</li>
<li>Small values are copied. The zero-copy floor is 256 KB for a single vector on a channel and 32 KB elsewhere. Below it, a value crosses as one quick copy.</li>
</ul>
<p>For R specifically:</p>
<ul>
<li>mizu doesn&rsquo;t replace <a href="https://mirai.r-lib.org" target="_blank" rel="noopener">mirai</a>.
mirai allows distributed computing, harnessing other machines on your network, an HPC cluster or the cloud, where shared memory doesn&rsquo;t reach.
If you&rsquo;re coming from mirai, the API will feel a little different: mizu was designed to be close to symmetrical between R and Python, so that it&rsquo;s easy to reach over in either direction, and this is the constraint we&rsquo;ve worked with.</li>
<li>mizu also interoperates with <a href="https://mori.r-lib.org" target="_blank" rel="noopener">mori</a>, which shares individual R objects: a mori shared object crosses a mizu channel or pool zero-copy.</li>
</ul>
<h2 id="from-mirai-to-mizu">From mirai to mizu
</h2>
<p>If you&rsquo;re wondering how we arrived at mizu, please allow me a brief account.</p>
<p>First, I discovered the data science and, in particular, the R community during the pandemic.
The problem I picked up in 2022 was the gap between R&rsquo;s scientific reach and its computing story: the ecosystem of packages had grown much faster than the machinery for running them in parallel.
R needed to play catch-up.</p>
<p><a href="https://mirai.r-lib.org" target="_blank" rel="noopener">mirai</a>, my first major package (Japanese for &lsquo;future&rsquo;), gave R true async capabilities: a task queue for scheduling over parallel or distributed workers and a thread pool for concurrent completions, with the communications layer moved off the main R thread.
It built on the work of others in our community.
Luke Tierney&rsquo;s parallel package gave us parallel computation with statistically valid pseudo-random numbers.
Henrik Bengtsson&rsquo;s future package popularised the concept of futures, or task handles, in R.
Garrett D&rsquo;Amore wrote NNG, the C messaging library that mirai runs on.
Working with Will Landau, Joe Cheng and Hadley Wickham brought mirai into targets, Shiny and purrr.</p>
<p><a href="https://mori.r-lib.org" target="_blank" rel="noopener">mori</a>, released this April, came at the same problem from a memory rather than a communications perspective.
Instead of copying an object to every worker, write it once into shared memory and send a reference.</p>
<p>That left a seed of an idea: if the objects live in shared memory, why not the instructions too?</p>
<p>From NNG GitHub discussions, I&rsquo;d seen people ask about shared memory as a way into the sub-10 µs messaging range, usually the preserve of high-frequency trading.
I researched this topic for a full three months before starting to write any code.
The sub-10 µs target fell early on, but my engineering curiosity led me to keep going until we&rsquo;d breached 1 µs.</p>
<p>Now R is no longer playing catch-up.
I&rsquo;m excited to share these same capabilities with the Python community.
For this reason, mizu is first and foremost a C library, with R and Python as equal bindings.
More may follow.</p>
<h2 id="look-outwards">Look outwards
</h2>
<p>If you read the commit history, you&rsquo;ll see that mizu was written with AI assistance.
Less visible is the three months of planning and research and design that came before any code was written. The implementation took another three months of deliberate engineering.</p>
<p>I&rsquo;m fortunate to work at a centre of open source software.
Without the shared discourse with this incredible and diverse group of people, mizu would not have been possible.
It may not even have been an idea.
I&rsquo;m especially grateful to Carlos Scheidegger, Andrew Holz and Hadley Wickham for their support and encouragement along the way.</p>
<p>As agents make it possible for one developer to do a great deal alone, I&rsquo;d encourage you to look outwards, to your fellow engineers, researchers and scientists.
I found my community in a pandemic lockdown.
You can find yours too.</p>
<h2 id="dive-in">Dive in
</h2>
<p>We welcome you to experiment with mizu.
It&rsquo;s early days, so expect rough edges: bug reports are the most valuable contribution you can make right now, and the more feedback we receive, the sooner we can reach a stable API.</p>
<ul>
<li><a href="https://github.com/shikokuchuo/libmizu" target="_blank" rel="noopener">libmizu</a></li>
<li><a href="https://github.com/shikokuchuo/mizu" target="_blank" rel="noopener">mizu</a></li>
<li><a href="https://github.com/shikokuchuo/pymizu" target="_blank" rel="noopener">pymizu</a></li>
</ul>
<p>We&rsquo;ll be working on plugging mizu into the ecosystem: Tidymodels and other Tidyverse packages, Shiny in both R and Python, and other places we&rsquo;ve probably not yet contemplated.
If you have ideas of where you&rsquo;d like to see this technology, open a discussion at the mizu or pymizu repo. We&rsquo;d love to hear from you!</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-11-05_mizu-0-1-0/featured.gif" length="889855" type="image/gif" />
    </item>
    <item>
      <title>Bring your own agent to Positron with the Positron MCP</title>
      <link>https://opensource.posit.co/blog/2026-11-04_positron-mcp/</link>
      <pubDate>Wed, 04 Nov 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-11-04_positron-mcp/</guid>
      <dc:creator>Jonathan McPherson</dc:creator><description><![CDATA[<p>We&rsquo;re very proud of <a href="https://assistant.posit.co" target="_blank" rel="noopener">Posit Assistant</a>, our own agentic harness for data science. It&rsquo;s designed to be easy to use and <a href="https://opensource.posit.co/blog/2026-10-29_ai-newsletter">cost efficient</a>, and it is deeply integrated into Positron and RStudio.</p>
<p>However, in the months since we introduced Posit Assistant, we heard from many of you who prefer to use your own coding agent harness inside Positron. This might be for the familiar interface, or to get access to models and tokens that your company is already paying for (for example, via Claude Enterprise subscriptions) that aren&rsquo;t available in Assistant.</p>
<p>While we obviously think our own harness is pretty great, at Posit our goal is to build open tools that help you avoid vendor lock-in. We want to make Positron the best IDE for doing data work no matter what the rest of your ecosystem looks like, and that means giving third party agents access to the Positron IDE surface, too. We are also exploring ways to bring external agent engines via official SDKs to the model picker, allowing you to run tools like Claude, Copilot, or Codex while retaining Posit Assistant&rsquo;s familiar interface and permissions.</p>
<p>Towards that end, <a href="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release">in the 2026.10 release</a> of Positron, we&rsquo;ve added an experimental <strong>Positron MCP</strong> (a <a href="https://modelcontextprotocol.io/" target="_blank" rel="noopener">Model Context Protocol</a> server). This MCP exposes tools inside Positron that agents can use to work alongside you in the IDE.</p>
<p>To turn it on, enable the new <a href="positron://settings/ai.mcp.enabled">MCP: Enabled</a> setting:</p>
<img src="https://opensource.posit.co/blog/2026-11-04_positron-mcp/mcp-setting.png" data-fig-align="center" data-fig-alt="The AI &gt; MCP: Enabled setting in Positron&#39;s Settings UI" />
<p>With this setting enabled, Positron exposes an MCP server any agent harness can connect to, using the standard MCP protocol. Both agents running in terminal CLIs and agents running in Positron extensions can connect.</p>
<img src="https://opensource.posit.co/blog/2026-11-04_positron-mcp/claude-mcp.png" data-fig-align="center" data-fig-alt="Positron with Claude Code in a side panel calling Positron MCP tools (list_sessions, execute_code, get_plot). The R console shows the ggplot2 code it ran, labeled &#39;Claude Code&#39;, and the Plots pane shows the resulting map of seal movements off the Pacific coast." />
<h2 id="why-a-positron-mcp">Why a Positron MCP?
</h2>
<p>You don&rsquo;t actually <em>need</em> the Positron MCP to use other agent harnesses in Positron, as extensions like Claude Code and Codex already work well in Positron without it.</p>
<p>Without the MCP, however, using a third-party agent harness feels a lot like it might if you were using it inside a plain terminal. It can&rsquo;t see any of your data or live session information or other Positron context. If it wants to execute R or Python code, it&rsquo;ll do it using shell commands and you won&rsquo;t see what&rsquo;s going on.</p>
<p>With the MCP turned on, the agent can work alongside you in Positron:</p>
<ul>
<li>You&rsquo;ll see everything the agent does. It can pick up work you started, and you can finish work that it starts.</li>
<li>It can see your loaded data and will answer questions using it as context.</li>
<li>It can see your R and Python consoles, and run code in them. When the MCP runs code, it will be annotated with the agent name in the Console pane.</li>
<li>It can see your plots, too, and can help you iterate on them until they look very nice.</li>
<li>You can ask it questions about errors or problems and it&rsquo;ll know what you&rsquo;re talking about without any copying or pasting.</li>
</ul>
<h2 id="what-harnesses-does-it-work-with">What harnesses does it work with?
</h2>
<p>The Positron MCP works with just about any agent that supports MCP. We&rsquo;ve tested it with:</p>
<ul>
<li>Claude Code (extension and CLI)</li>
<li>Codex (extension and CLI)</li>
<li>OpenCode</li>
<li>Kiro</li>
<li>Gemini</li>
<li>Copilot CLI</li>
</ul>
<p>and more.</p>
<h2 id="using-the-mcp">Using the MCP
</h2>
<h3 id="one-time-setup">One-time setup
</h3>
<p>Enable the MCP in Settings, as described above, then run the <em>Positron MCP: Add to Coding Agent</em> command to automatically set up your coding agent. If your coding agent isn&rsquo;t on the list of those Positron knows how to configure, you can still use your agent in Positron! Run the command <em>Positron MCP: Show Connected Agents</em>, then choose &ldquo;Copy Connection Details&rdquo; option to get the information your agent needs to connect.</p>
<div class="callout callout-note" role="note" aria-label="Note">
<div class="callout-header">
<span class="callout-title">Note</span>
</div>
<div class="callout-body">
<p>Positron&rsquo;s MCPs are started inside projects, and know which project they&rsquo;re working with. If you have multiple windows open with different projects, each has its own MCP, and if you have a window open with <em>no</em> project or folder open, it doesn&rsquo;t currently run an MCP.</p>
</div>
</div>
<h3 id="agent-and-mcp-connections">Agent and MCP connections
</h3>
<p>Once the MCP is configured, you don&rsquo;t need to do anything special to start it, stop it, or manage the agent connection; Positron takes care of this automatically. When asking the agent to perform a task, it&rsquo;s helpful to mention &ldquo;Positron&rdquo; or tell it explicitly to &ldquo;use the Positron MCP&rdquo;.</p>
<p>If you&rsquo;re not sure whether Positron and your agent are on speaking terms, you can ask your agent, or enable the <a href="positron://settings/ai.mcp.statusBar">MCP Status Bar</a> setting:</p>
<img src="https://opensource.posit.co/blog/2026-11-04_positron-mcp/status-bar-option.png" data-fig-align="center" data-fig-alt="The AI &gt; MCP: Status Bar setting in Positron&#39;s Settings UI" />
<p>With this setting enabled, any coding agents connected will get an icon in the Status Bar. Hover over it to see them:</p>
<img src="https://opensource.posit.co/blog/2026-11-04_positron-mcp/mcp-status-bar.png" data-fig-align="center" data-fig-alt="The Positron status bar with Claude Code connected, showing a hover tooltip giving the name, PID, and version of the agent." />
<h2 id="security">Security
</h2>
<p>It&rsquo;s important to keep in mind that the MCP can be used to ask Positron to execute arbitrary code in your R and Python consoles &ndash; and that code will run with your user credentials. Exposing the Positron MCP to an agent is therefore equivalent to giving it unrestricted shell access.</p>
<p>Enabling the MCP doesn&rsquo;t mean you&rsquo;re doing away with security, though; it just means that you&rsquo;re <em>delegating</em> trust decisions to your agent harness. Most harnesses will prompt for confirmation and trust when running potentially dangerous operations, but not all. Make sure you understand your agent&rsquo;s trust model and are comfortable with its permissions and execution policies before connecting it to Positron.</p>
<h2 id="feedback">Feedback
</h2>
<p>How&rsquo;s your experience using the Positron MCP? Was it difficult to configure your agent? Missing any capabilities? We&rsquo;d love to hear from you on our <a href="https://github.com/posit-dev/positron/discussions" target="_blank" rel="noopener">discussion forum</a>!</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-11-04_positron-mcp/positron-and-agents.png" length="452291" type="image/png" />
    </item>
    <item>
      <title>posit::glimpse() Newsletter – November 2026</title>
      <link>https://opensource.posit.co/blog/2026-11-04_glimpse-2026-11/</link>
      <pubDate>Wed, 04 Nov 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-11-04_glimpse-2026-11/</guid>
      <dc:creator>Isabella Velásquez</dc:creator><description><![CDATA[<blockquote>
<p>Welcome to our newsletter, posit::glimpse()!</p>
<p>If you&rsquo;re currently reading this on our blog, consider subscribing to Product Updates - Open Source on our <a href="https://posit.co/about/subscription-management" target="_blank" rel="noopener">subscription page</a> to receive this newsletter directly in your inbox.</p>
<p>Prefer an RSS reader? posit::glimpse() now has its own RSS feed! Find it on our <a href="https://opensource.posit.co/subscribe/" target="_blank" rel="noopener">subscribe page</a>.</p>
</blockquote>
<p>Every month, we round up some of the most important open-source news for Posit&rsquo;s community! We hope that you enjoy this newsletter and maybe even share it with a friend.</p>
<p>The table of contents on the right can help you navigate through all the updates. As you scroll, it will open up to show you subcategories →</p>
<h2 id="key-product-updates-and-new-releases">Key product updates and new releases
</h2>
<h3 id="quarto-111">Quarto 1.11
</h3>
<p><a href="https://quarto.org/" target="_blank" rel="noopener">Quarto</a> 1.11 is out, released early to deliver a Deno security update that protects HTTPS requests made by Quarto commands, including publishing and downloading extensions. Quarto 1.10.20, released just before, is the final patch in the 1.10 series, so all users should upgrade to 1.11. Alongside the security update, this release brings broad accessibility improvements to HTML documents, websites, books, and presentations (skip-to-content links, a more visible keyboard focus ring, and preserved alternative text for diagrams and Word figures), lists of figures and tables for Typst documents, Julia engine improvements, and fixes to shared metadata. You can also adopt the Quarto 2 definition list syntax now, ahead of the next major version.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-11-02_quarto-1-11/" target="_blank" rel="noopener">Quarto 1.11</a> blog post.</li>
</ul>
<h3 id="great-tables-v100-and-v110">Great Tables v1.0.0 and v1.1.0
</h3>
<p><a href="https://posit-dev.github.io/great-tables/" target="_blank" rel="noopener">Great Tables</a> reaches 1.x with v1.0.0 and v1.1.0. The stable core API gains new formatters, value-based conditional styling, multi-column stubs, decimal alignment, and diverging, row-wise, and custom <code>data_color()</code> scales with APCA-based text contrast. HTML output is now accessible by default.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-10-19_great-tables-1-1/" target="_blank" rel="noopener">Great Tables v1.0.0 and v1.1.0: new formatters, conditional styling, multi-column stubs, and richer color scales</a> blog post.</li>
</ul>
<h3 id="positron">Positron
</h3>
<p><a href="https://positron.posit.co/" target="_blank" rel="noopener">Positron</a> is a next-generation data science IDE for R and Python. The 2026.10 release brings Posit Assistant that can drive Positron itself, a built-in MCP server for your own coding agents, Data Connections on by default, faster language features for Quarto, and smoother interpreter and project setup. Posit Assistant can now tap into Positron&rsquo;s packages, interpreters, consoles, and publishing tools, so its answers and actions match your actual environment.</p>
<p><div class="not-prose"><figure>
    <img class="h-auto max-w-full rounded-lg"
      src="https://opensource.posit.co/blog/2026-11-04_glimpse-2026-11/images/positron-assistant-data-explorer.png"
      alt="Positron window with Posit Assistant in the sidebar responding to the request &ldquo;OK, open the Pokemon Excel file so I can see it.&rdquo; Positron has opened pokemon.xlsx in the Data Explorer, showing column summaries with distribution sparklines and a grid of 949 rows and 22 columns." 
      loading="lazy"
    >
  </figure></div>
</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/" target="_blank" rel="noopener">Positron October Release Highlights</a> and <a href="https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/" target="_blank" rel="noopener">A deeper Positron integration for Posit Assistant</a> blog posts.</li>
</ul>
<p>Have a question, a tip, or something cool you&rsquo;ve built? Come say hi on the <a href="https://www.reddit.com/r/PositronIDE/" target="_blank" rel="noopener">Positron subreddit</a>, where the community is up and running!</p>
<h3 id="rig-0110">rig 0.11.0
</h3>
<p><a href="https://rig.r-lib.org/" target="_blank" rel="noopener">rig</a> is a command-line tool for installing and managing multiple R versions. rig 0.11.0 is a major release, covered in a three-part blog series.</p>
<h4 id="rig-0110-part-one-r-installations">rig 0.11.0 part one: R installations
</h4>
<p>rig 0.11.0 adds a user mode for installing R into your home directory without admin rights on macOS, Windows, and Linux, plus portable Linux builds, Rtools management, and automatic RStudio and Positron configuration. Repository management is improved too: P3M is now the default on most platforms, and new commands add custom repos and check repo status. rig also has a new website at <a href="https://rig.r-lib.org/" target="_blank" rel="noopener">rig.r-lib.org</a>.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-10-09_rig-0-11-0-part-one/" target="_blank" rel="noopener">rig 0.11.0 part one: R installations</a> blog post.</li>
</ul>
<h4 id="rig-0110-part-two-r-packages">rig 0.11.0 part two: R packages
</h4>
<p>Part two introduces <code>rig pkg</code>, a pak-like command-line tool for installing packages from CRAN, GitHub, git, URLs, and local paths with version constraints, a dependency solver, parallel downloads, and caching. It also adds <code>rig pkg doctor</code> for checking library health, commands for package info, dependency trees, and CRAN search, named libraries, and automatic system requirements on major Linux distributions.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-10-12_rig-0-11-0-part-two/" target="_blank" rel="noopener">rig 0.11.0 part two: R packages</a> blog post.</li>
</ul>
<h4 id="rig-0110-part-three-r-projects">rig 0.11.0 part three: R projects
</h4>
<p>The final part introduces <code>rig proj</code>, a project manager for R in the style of Python&rsquo;s uv and Rust&rsquo;s cargo. It uses an <code>rproj.toml</code> manifest and universal <code>rproj.lock</code> files that cover multiple platforms, syncs to fast project virtual environments that share package files, and runs code with <code>rig run</code>, including inline-dependency scripts. Projects can be imported from DESCRIPTION files or renv lock files.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-10-15_rig-0-11-0-part-three/" target="_blank" rel="noopener">rig 0.11.0 part three: R projects</a> blog post.</li>
</ul>
<h3 id="shiny-for-python-19">Shiny for Python 1.9
</h3>
<p><a href="https://shiny.posit.co/py/" target="_blank" rel="noopener">Shiny for Python</a> 1.9 removes the process-wide lock on reactive updates, so async effects and outputs now run concurrently within and across sessions. The release also adds <code>session.run_once_when_idle()</code>, immediate UI updates from background tasks, accessible sidebar landmarks via <code>ui.sidebar(role=)</code>, Express download buttons with icons, and 2–3.5× faster data frame serialization. It includes a few breaking changes, notably that <code>ui.sidebar()</code> now renders a <code>&lt;div&gt;</code> rather than an <code>&lt;aside&gt;</code>.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-10-29_shiny-python-1-9/" target="_blank" rel="noopener">Shiny for Python 1.9</a> and <a href="https://opensource.posit.co/blog/2026-10-29_shiny-python-concurrent-async/" target="_blank" rel="noopener">Concurrent Async</a> blog posts.</li>
</ul>
<p>Looking for a little inspiration for your next app? Take a stroll through the <a href="https://posit-shiny-in-the-public-sector.share.connect.posit.cloud/" target="_blank" rel="noopener">Shiny in the Public Sector gallery</a>, which is filled with real-world examples of how teams are using Shiny to share data and serve their communities. It&rsquo;s a great place to spark ideas, and maybe borrow a trick or two!</p>
<h2 id="ai-updates">AI updates
</h2>
<p>Catch up on the latest from Posit&rsquo;s AI newsletter:</p>
<ul>
<li><a href="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/" target="_blank" rel="noopener">Correct, transparent, and reproducible data agents</a>: An annotated walkthrough of our posit::conf(2026) keynote on building trustworthy AI tools for data analysis, including Posit Assistant and the introduction of commons.</li>
<li><a href="https://opensource.posit.co/blog/2026-10-23_ai-newsletter/" target="_blank" rel="noopener">Unfortunately, you need to care about token caching</a>: A look at the anatomy of an LLM &ldquo;conversation&rdquo; and how understanding cache hits and misses can help you keep costs down.</li>
<li><a href="https://opensource.posit.co/blog/2026-10-29_ai-newsletter/" target="_blank" rel="noopener">Posit Assistant is cost-efficient</a>: How we measured Posit Assistant&rsquo;s token usage and why it makes better use of your token budget than leading coding agents.</li>
</ul>
<p>Want to see commons in action? Sara and Simon recently walked through a real workflow in the <a href="https://youtu.be/4rUzyOIvAog" target="_blank" rel="noopener">commons workflow demo</a> on YouTube.</p>
<h2 id="learning-resources">Learning resources
</h2>
<h3 id="recent-data-science-lab-episodes">Recent Data Science Lab episodes
</h3>
<p>The <a href="https://pos.it/dslab" target="_blank" rel="noopener">Data Science Lab</a> is a fun, chill session where practitioners share their screens and live code through real data science workflows. Missed a live session? Catch up on these recent episodes:</p>
<ul>
<li><a href="https://youtu.be/rthgRFzx30g" target="_blank" rel="noopener">How do you validate data in R using Pointblank?</a> with Rich Iannone</li>
<li><a href="https://youtu.be/eYhSbSsBHTs" target="_blank" rel="noopener">How do you create custom geoms in ggplot2?</a> with Gina Reynolds</li>
<li><a href="https://youtu.be/ONAl7iD9h68" target="_blank" rel="noopener">How do you create custom Revealjs themes in Quarto?</a> with Emil Hvitfeldt</li>
</ul>
<h3 id="new-free-posit-academy-courses">New free Posit Academy courses
</h3>
<p>Looking to learn something new? Check out these free courses from Posit Academy, now available on our resources page:</p>















  
  
  
  
  

  
  
  
  
  
    
  

  
  
  
  
  
    
  

  
  
  
  
  
    
  

  
  
  
  
  
    
  

  
  
  
  
  



<div class="grid grid-cols-2 gap-6 xl:gap-8 xl:gap-8 mb-6">
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  





  
    
  











  
  










  
  
    
  
    
  






















  
    
  






























<div id="item-7609856954675784816d30d194cca788" class="@container h-full">
  <a href="https://opensource.posit.co/resources/courses/introduction-to-quarto/" title="Introduction to Quarto"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl">
      
        









  
  
    <img src="https://opensource.posit.co/resources/courses/introduction-to-quarto/image.svg" alt="Introduction to Quarto" class="mx-auto h-full w-full object-cover" loading="lazy">
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>Oct 16, 2026</span>
          <span>|</span>
        
        
        
          <span>30 min</span>
          
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Introduction to Quarto</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">Learn what Quarto is and how to write your first Quarto documents: markdown text, YAML options, output formats, and R or Python code cells, all practiced in an in-browser Quarto simulator</p>
      

      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                Positron
              </span>
            
              <span class="pill">
                Quarto
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
    <div>
      











  
  
  
  
  
















  
  
    
  





  








  
  





  
    
  











  
  










  
  
    
  






















  
    
  






























<div id="item-adf36cfea0982fd15ff2ff6597f1a15a" class="@container h-full">
  <a href="https://opensource.posit.co/resources/courses/introduction-to-positron/" title="Introduction to Positron"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl">
      
        









  
  
    <img src="https://opensource.posit.co/resources/courses/introduction-to-positron/image.svg" alt="Introduction to Positron" class="mx-auto h-full w-full object-cover" loading="lazy">
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>Jul 31, 2026</span>
          <span>|</span>
        
        
        
          <span>3 courses</span>
          
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Introduction to Positron</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">A collection of courses to get started using Positron!</p>
      

      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                Positron
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  





  
    
  











  
  










  
  
    
  
    
  






















  
    
  






























<div id="item-9a8ce16a9a5d811a12824be953ea2587" class="@container h-full">
  <a href="https://opensource.posit.co/resources/courses/introduction-to-shiny-python-focus/" title="Introduction to Shiny - Python Focus"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl">
      
        









  
  
    <img src="https://opensource.posit.co/resources/courses/introduction-to-shiny-python-focus/image.svg" alt="Introduction to Shiny - Python Focus" class="mx-auto h-full w-full object-cover" loading="lazy">
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>Mar 18, 2026</span>
          <span>|</span>
        
        
        
          <span>20 min</span>
          
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Introduction to Shiny - Python Focus</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">An introduction to building interactive web applications with Shiny in Python. Covers what Shiny is, how apps are structured, and the basics of inputs, outputs, and reactivity</p>
      

      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                Shiny for Python
              </span>
            
              <span class="pill">
                Shiny
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  





  
    
  











  
  










  
  
    
  






















  
    
  






























<div id="item-a716a0a49c43e6f14c5a0f91a88be32b" class="@container h-full">
  <a href="https://opensource.posit.co/resources/courses/getting-started-with-posit-ai-in-positron/" title="Getting Started with Posit AI Pass in Positron"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl">
      
        









  
  
    <img src="https://opensource.posit.co/resources/courses/getting-started-with-posit-ai-in-positron/image.svg" alt="Getting Started with Posit AI Pass in Positron" class="mx-auto h-full w-full object-cover" loading="lazy">
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>Sep 23, 2026</span>
          <span>|</span>
        
        
        
          <span>26 min</span>
          
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Getting Started with Posit AI Pass in Positron</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">Set up Posit AI Pass in Positron and put Posit Assistant and Next Edit Suggestions to work in your Python and R projects</p>
      

      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                Positron
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
</div>


<p>Browse the full list on the <a href="https://opensource.posit.co/resources/courses/" target="_blank" rel="noopener">courses page</a>.</p>
<h3 id="explore-our-new-books-page">Explore our new books page
</h3>
<p>Our open source website now has a <a href="https://opensource.posit.co/resources/books/" target="_blank" rel="noopener">books page</a>! It brings together books on R, Python, Shiny, modeling, and more, all in one place. Here are a few to get you started:</p>















  
  
  
  
  

  
  
  
  
  
    
  

  
  
  
  
  
    
  

  
  
  
  
  
    
  

  
  
  
  
  
    
  

  
  
  
  
  



<div class="grid grid-cols-4 gap-6 xl:gap-8 xl:gap-8 mb-6">
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  





  
  
    
  







  





  
  






  





  
  
    
  
    
  
    
  
    
  
    
  
    
  


  

  


















































<div id="item-af85267f654d76ce1c14701557ef121d" class="@container h-full">
  <a href="https://opensource.posit.co/resources/books/r-for-data-science/" title="R for Data Science"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl" style="background-color: color-mix(in srgb, #929747 25%, white 75%);">
      
        









  
  
    
    

    

    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @max-tall:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/r-for-data-science/cover_hu_d98b63478aedafa9.webp 1x,
                  /resources/books/r-for-data-science/cover_hu_73a353b11fecbd49.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/r-for-data-science/cover_hu_e54c46be9eb16ab8.jpg"
          srcset="/resources/books/r-for-data-science/cover_hu_e54c46be9eb16ab8.jpg 1x,
                  /resources/books/r-for-data-science/cover_hu_7d6a02258c89dd75.jpg 2x"
          alt="R for Data Science"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @tall:@max-grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/r-for-data-science/cover_hu_73a353b11fecbd49.webp 1x,
                  /resources/books/r-for-data-science/cover_hu_b830ffecfbcdc2b0.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/r-for-data-science/cover_hu_7d6a02258c89dd75.jpg"
          srcset="/resources/books/r-for-data-science/cover_hu_7d6a02258c89dd75.jpg 1x,
                  /resources/books/r-for-data-science/cover_hu_3e7d50c2900290ad.jpg 2x"
          alt="R for Data Science"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      
        
      

      
      
      
      

      <picture class="hidden @grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/r-for-data-science/cover_hu_b830ffecfbcdc2b0.webp 1x,
                  /resources/books/r-for-data-science/cover_hu_2148b924e476a941.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/r-for-data-science/cover_hu_3e7d50c2900290ad.jpg"
          srcset="/resources/books/r-for-data-science/cover_hu_3e7d50c2900290ad.jpg 1x,
                  /resources/books/r-for-data-science/cover_hu_aababf9db56afbd9.jpg 2x"
          alt="R for Data Science"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>June 2023</span>
          
        
        
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">R for Data Science</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">Import, Tidy, Transform, Visualize, and Model Data</p>
      

      
        <div class="text-sm @grande:text-md">
          <div class="mt-2 flex flex-row gap-x-4 items-center">

  <div class="flex flex-row flex-shrink-0"><img
          src="https://opensource.posit.co/people/hadley-wickham/profile.jpg"
          alt="Hadley Wickham"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white "
          style="z-index: 10;"
        ><img
          src="https://opensource.posit.co/people/mine-%C3%A7etinkaya-rundel/profile.jpg"
          alt="Mine Çetinkaya-Rundel"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white -ml-2"
          style="z-index: 9;"
        ><img
          src="https://opensource.posit.co/images/person-placeholder.svg"
          alt="Garrett Grolemund"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white -ml-2"
          style="z-index: 8;"
        ></div><div class="line-clamp-2 font-medium text-gray-600">Hadley Wickham,&nbsp;Mine Çetinkaya-Rundel,&nbsp;Garrett Grolemund</div></div>
        </div>
      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                tidyverse
              </span>
            
              <span class="pill">
                dplyr
              </span>
            
              <span class="pill">
                ggplot2
              </span>
            
              <span class="pill">
                tidyr
              </span>
            
              <span class="pill">
                readr
              </span>
            
              <span class="pill">
                Quarto
              </span>
            
              <span class="pill">
                Data Wrangling
              </span>
            
              <span class="pill">
                Visualization
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  





  
  
    
  







  





  
  






  





  
  


  


















































<div id="item-67525c48b5cbb2f3f5be94df703e7d7e" class="@container h-full">
  <a href="https://opensource.posit.co/resources/books/python-for-data-analysis/" title="Python for Data Analysis"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl" style="background-color: color-mix(in srgb, #776342 25%, white 75%);">
      
        









  
  
    
    

    

    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @max-tall:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/python-for-data-analysis/cover_hu_e6a102fe44583152.webp 1x,
                  /resources/books/python-for-data-analysis/cover_hu_6031106aad584cd5.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/python-for-data-analysis/cover_hu_d17ba488224df1f8.jpg"
          srcset="/resources/books/python-for-data-analysis/cover_hu_d17ba488224df1f8.jpg 1x,
                  /resources/books/python-for-data-analysis/cover_hu_90f0c2afe9197804.jpg 2x"
          alt="Python for Data Analysis"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @tall:@max-grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/python-for-data-analysis/cover_hu_6031106aad584cd5.webp 1x,
                  /resources/books/python-for-data-analysis/cover_hu_75d5f95a55813323.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/python-for-data-analysis/cover_hu_90f0c2afe9197804.jpg"
          srcset="/resources/books/python-for-data-analysis/cover_hu_90f0c2afe9197804.jpg 1x,
                  /resources/books/python-for-data-analysis/cover_hu_7d469a3e1c61d4ed.jpg 2x"
          alt="Python for Data Analysis"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      
        
      

      
      
      
      

      <picture class="hidden @grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/python-for-data-analysis/cover_hu_75d5f95a55813323.webp 1x,
                  /resources/books/python-for-data-analysis/cover_hu_32e4dfe9a87340bd.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/python-for-data-analysis/cover_hu_7d469a3e1c61d4ed.jpg"
          srcset="/resources/books/python-for-data-analysis/cover_hu_7d469a3e1c61d4ed.jpg 1x,
                  /resources/books/python-for-data-analysis/cover_hu_ddcd88b0b074d5df.jpg 2x"
          alt="Python for Data Analysis"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>August 2022</span>
          
        
        
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Python for Data Analysis</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">Data Wrangling with pandas, NumPy, and Jupyter</p>
      

      
        <div class="text-sm @grande:text-md">
          <div class="mt-2 flex flex-row gap-x-4 items-center">

  <div class="flex flex-row flex-shrink-0"><img
          src="https://opensource.posit.co/images/person-placeholder.svg"
          alt="Wes McKinney"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white "
          style="z-index: 10;"
        ></div><div class="line-clamp-2 font-medium text-gray-600">Wes McKinney</div></div>
        </div>
      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                Data Wrangling
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  





  
  
    
  







  





  
  






  





  
  
    
  


  


















































<div id="item-62bb33a8b91dab9172da0bcdeff97fd5" class="@container h-full">
  <a href="https://opensource.posit.co/resources/books/mastering-shiny/" title="Mastering Shiny"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl" style="background-color: color-mix(in srgb, #476D74 25%, white 75%);">
      
        









  
  
    
    

    

    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @max-tall:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/mastering-shiny/cover_hu_668f7eec9e81d5e5.webp 1x,
                  /resources/books/mastering-shiny/cover_hu_ffbffdee9453158a.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/mastering-shiny/cover_hu_1aab624c519350c5.jpg"
          srcset="/resources/books/mastering-shiny/cover_hu_1aab624c519350c5.jpg 1x,
                  /resources/books/mastering-shiny/cover_hu_133479afee483ad4.jpg 2x"
          alt="Mastering Shiny"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @tall:@max-grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/mastering-shiny/cover_hu_ffbffdee9453158a.webp 1x,
                  /resources/books/mastering-shiny/cover_hu_94cd77a590183072.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/mastering-shiny/cover_hu_133479afee483ad4.jpg"
          srcset="/resources/books/mastering-shiny/cover_hu_133479afee483ad4.jpg 1x,
                  /resources/books/mastering-shiny/cover_hu_992d98d506947be9.jpg 2x"
          alt="Mastering Shiny"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      
        
      

      
      
      
      

      <picture class="hidden @grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/mastering-shiny/cover_hu_94cd77a590183072.webp 1x,
                  /resources/books/mastering-shiny/cover_hu_f33d2ce98fef70bf.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/mastering-shiny/cover_hu_992d98d506947be9.jpg"
          srcset="/resources/books/mastering-shiny/cover_hu_992d98d506947be9.jpg 1x,
                  /resources/books/mastering-shiny/cover_hu_a9d31e479d4513b0.jpg 2x"
          alt="Mastering Shiny"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>April 2021</span>
          
        
        
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Mastering Shiny</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">Build Interactive Apps, Reports, and Dashboards Powered by R</p>
      

      
        <div class="text-sm @grande:text-md">
          <div class="mt-2 flex flex-row gap-x-4 items-center">

  <div class="flex flex-row flex-shrink-0"><img
          src="https://opensource.posit.co/people/hadley-wickham/profile.jpg"
          alt="Hadley Wickham"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white "
          style="z-index: 10;"
        ></div><div class="line-clamp-2 font-medium text-gray-600">Hadley Wickham</div></div>
        </div>
      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                Shiny
              </span>
            
              <span class="pill">
                Interactive Apps
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
    <div>
      











  
  
  
  
  
















  
  
    
  












  
  





  
  
    
  







  





  
  






  





  
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  


  


















































<div id="item-82f304d0f0b38b90dde329272b0a8d87" class="@container h-full">
  <a href="https://opensource.posit.co/resources/books/tidy-modeling-with-r/" title="Tidy Modeling with R"
     class="card-link flex flex-col @venti:flex-row rounded-xl  h-full">

      



      
      

    
    
    <div class="w-full @venti:w-1/2 @venti:self-center aspect-[40/21] flex-shrink-0 flex items-center justify-center overflow-hidden rounded-xl" style="background-color: color-mix(in srgb, #A16B2D 25%, white 75%);">
      
        









  
  
    
    

    

    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @max-tall:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/tidy-modeling-with-r/cover_hu_e93a1cc5d3b5a9d.webp 1x,
                  /resources/books/tidy-modeling-with-r/cover_hu_a3c22580d7e8e881.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/tidy-modeling-with-r/cover_hu_d315444941b9cb7f.jpg"
          srcset="/resources/books/tidy-modeling-with-r/cover_hu_d315444941b9cb7f.jpg 1x,
                  /resources/books/tidy-modeling-with-r/cover_hu_525fe199315f9c2b.jpg 2x"
          alt="Tidy Modeling with R"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      

      
      
      
      

      <picture class="hidden @tall:@max-grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/tidy-modeling-with-r/cover_hu_a3c22580d7e8e881.webp 1x,
                  /resources/books/tidy-modeling-with-r/cover_hu_cd1393df6994af7e.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/tidy-modeling-with-r/cover_hu_525fe199315f9c2b.jpg"
          srcset="/resources/books/tidy-modeling-with-r/cover_hu_525fe199315f9c2b.jpg 1x,
                  /resources/books/tidy-modeling-with-r/cover_hu_664a9d51be93be07.jpg 2x"
          alt="Tidy Modeling with R"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
      
      

      
      
      
        
      

      
      
      
      

      <picture class="hidden @grande:block w-full h-full">
        <source
          type="image/webp"
          srcset="/resources/books/tidy-modeling-with-r/cover_hu_cd1393df6994af7e.webp 1x,
                  /resources/books/tidy-modeling-with-r/cover_hu_c6fa8553b72c4f19.webp 2x" />
        <img
          src="https://opensource.posit.co/resources/books/tidy-modeling-with-r/cover_hu_664a9d51be93be07.jpg"
          srcset="/resources/books/tidy-modeling-with-r/cover_hu_664a9d51be93be07.jpg 1x,
                  /resources/books/tidy-modeling-with-r/cover_hu_978aaeb6d2b325ec.jpg 2x"
          alt="Tidy Modeling with R"
          class="mx-auto h-full object-contain py-[6%] book-cover"
          loading="lazy" />
      </picture>
    
  
  


      
    </div>

    
    <div class="hidden gap-y-2 @nip:flex @venti:w-1/2 flex-auto flex-col p-3 @venti:pl-5 text-gray-700 mt-2">

      
      

      
      
      <div class="hidden @short:flex flex-wrap gap-x-2 items-center text-xs font-medium text-gray-500">
        
          <span>July 2022</span>
          
        
        
        
        
        
      </div>
      

      
      <h3 class="m-0! mt-3 font-semibold text-sm @grande:text-lg @venti:text-xl @trenta:text-2xl line-clamp-2 text-sm @tall:text-base @grande:text-lg @venti:text-xl @trenta:text-2xl text-gray-600">Tidy Modeling with R</h3>
      

      
        <p class="m-0! text-xs @short:text-sm @grande:text-md @venti:text-md @trenta:text-lg line-clamp-2 short@line-clamp-3 @tall:line-clamp-3 font-medium text-gray-600">A Framework for Modeling in the Tidyverse</p>
      

      
        <div class="text-sm @grande:text-md">
          <div class="mt-2 flex flex-row gap-x-4 items-center">

  <div class="flex flex-row flex-shrink-0"><img
          src="https://opensource.posit.co/people/max-kuhn/max_harkness_sq.jpg"
          alt="Max Kuhn"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white "
          style="z-index: 10;"
        ><img
          src="https://opensource.posit.co/people/julia-silge/profile.jpg"
          alt="Julia Silge"
          class="my-0! w-6 h-6 rounded-full object-cover ring-2 ring-white -ml-2"
          style="z-index: 9;"
        ></div><div class="line-clamp-2 font-medium text-gray-600">Max Kuhn,&nbsp;Julia Silge</div></div>
        </div>
      

      <div class="grow"></div>
      
        
          <div class="hidden @grande:flex flex-wrap gap-x-1 gap-y-4 py-2 overflow-hidden h-10 items-end">
            
              <span class="pill">
                tidymodels
              </span>
            
              <span class="pill">
                recipes
              </span>
            
              <span class="pill">
                parsnip
              </span>
            
              <span class="pill">
                rsample
              </span>
            
              <span class="pill">
                tune
              </span>
            
              <span class="pill">
                yardstick
              </span>
            
              <span class="pill">
                workflows
              </span>
            
              <span class="pill">
                Machine Learning
              </span>
            
          </div>
        
      
    </div>
  </a>
</div>


    </div>
  
</div>


<h2 id="showcases-from-the-community">Showcases from the community
</h2>









  
  
    
  

  
  
    
  





  


<div class="grid gap-12 items-start mt-12 md:grid-cols-2 ">
  
  
    
    
    
      <div class="prose max-w-none "><p><a href="https://opensource.posit.co/people/samuel-bharti/" target="_blank" rel="noopener">Samuel Bharti</a> spent the summer on the Shiny team and built 10 open-source applications and 5 packages for computational biology, plus a reusable layer that grew underneath them. It&rsquo;s a great read if you&rsquo;re curious about genomics, LLM-powered apps, or building a whole ecosystem of Shiny tools.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/" target="_blank" rel="noopener">Genomes, Prompts, and Shiny: What I Built During My Summer at Posit</a> blog post.</li>
</ul></div>
    
  
    
    
    
      <div class="prose max-w-none "><div class="not-prose"><figure>
      <img class="h-auto max-w-full rounded-lg"
        src="https://opensource.posit.co/blog/2026-11-04_glimpse-2026-11/images/genomes-shiny.png"
        alt="Genomes, Prompts, and Shiny featured image" 
        loading="lazy"
      >
    </figure></div></div>
    
  
</div>










  
  
    
  

  
  
    
  





  


<div class="grid gap-12 items-start mt-12 md:grid-cols-2 ">
  
  
    
    
    
      <div class="prose max-w-none "><div class="not-prose"><figure>
      <img class="h-auto max-w-full rounded-lg"
        src="https://opensource.posit.co/blog/2026-11-04_glimpse-2026-11/images/pharmacometrics-vpc.png"
        alt="Visual predictive check plot of prediction-corrected phenobarbital concentration (mg/L) over time (h), with observed data points, solid and dashed percentile lines, and shaded blue prediction intervals rising to a peak near 160 hours and then declining." 
        loading="lazy"
      >
    </figure></div></div>
    
  
    
    
    
      <div class="prose max-w-none "><p>How much medicine is too much for the tiniest patients? Matthew Fidler and Janice Goh use <a href="https://nlmixr2.org/" target="_blank" rel="noopener">nlmixr2</a> in R to model phenobarbital dosing in preterm infants, showing how weight-based dosing keeps nearly all simulated babies within the target range. (It&rsquo;s a teaching example, not dosing guidance!)</p>
<ul>
<li>Read more in the <a href="https://posit.co/blog/pharmacometrics-in-r-posit" target="_blank" rel="noopener">Tiny Doses for Tiny Babies: How much is too much?</a> blog post.</li>
</ul></div>
    
  
</div>

<p>If you&rsquo;re on LinkedIn, be sure to follow and tag <a href="https://www.linkedin.com/showcase/posit-open-source/" target="_blank" rel="noopener">Posit Open Source</a> for us to share the amazing things you&rsquo;re working on!</p>
<h2 id="upcoming-events">Upcoming events
</h2>
<p>Join us for our ongoing virtual events:</p>
<ul>
<li><a href="https://pos.it/dsh" target="_blank" rel="noopener">Data Science Hangout</a> for casual conversations with leaders in the data space</li>
<li><a href="https://pos.it/dslab" target="_blank" rel="noopener">Data Science Lab</a> for live coding sessions with practitioners building cool things with code</li>
</ul>
<p>Mark your calendars: Josh Starmer of StatQuest is joining us on December 17th for this year&rsquo;s Data Science Hangout season finale! In the meantime, catch his session <a href="https://www.youtube.com/live/u_9OA3WRHgo?t=2244s" target="_blank" rel="noopener">teaching Naive Bayes with Positron and Posit Assistant</a>.</p>
<p>Want to know where else you can find Posit folks? Check out our <a href="https://opensource.posit.co/events/" target="_blank" rel="noopener">events page</a> for upcoming conferences, meetups, and more.</p>
<p>Hope to see you there!</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-11-04_glimpse-2026-11/thumbnail.jpg" length="68574" type="image/jpeg" />
    </item>
    <item>
      <title>A deeper Positron integration for Posit Assistant</title>
      <link>https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/</link>
      <pubDate>Wed, 21 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/</guid>
      <dc:creator>Jonathan McPherson</dc:creator><description><![CDATA[<p>In earlier releases of Positron, Posit Assistant&rsquo;s ability to interact with Positron was mostly limited to the Console and Editor panes. It could run code in Positron, see what that code did, and make changes to your scripts and documents. This alone makes it a powerful data science agent &hellip; but we can do better!</p>
<p>Starting with <a href="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release">this month&rsquo;s release</a> (2026.10), Posit Assistant can now interact with nearly the entire Positron surface. This is less about replacing pointing and clicking with prompts (although you can do a bit of that too) and more about revealing things to Assistant that Positron already knows, giving it more and better context for your questions about your data or Positron itself.</p>
<p>These new features are currently in preview; enable them with the <a href="positron://settings/assistant.previewFeatures">Assistant: Preview Features</a> setting in Positron.</p>
<img src="https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/preview-features.png" data-fig-align="center" data-fig-alt="The Assistant: Preview Features setting in Positron, in the enabled state" />
<p>Enabled? Here are some things you can try:</p>
<h2 id="packages">Packages
</h2>
<p>Assistant can now connect to the same internal data source as Positron&rsquo;s Packages pane. This means that requests to install a package will be fulfilled using the method appropriate to your current Python or R installation (Assistant used to get this wrong, occasionally). It also means you can ask for information about installed packages that Positron adds, such as active CVEs.</p>
<p>Try:</p>
<blockquote>
<p>install the ggplot2 package in Positron</p>
</blockquote>
<p>or</p>
<blockquote>
<p>do any of the packages used in this script have active vulnerabilities? ask Positron</p>
</blockquote>
<img src="https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/vulnerabilities.png" data-fig-align="center" data-fig-alt="Posit Assistant answering a query about vulnerabilities in the current script" />
<h2 id="interpreters">Interpreters
</h2>
<p>Positron maintains an inventory of every R and Python installation on your system so that it can recommend the best one for a new project, show a list when you ask to open a console, and so on. R and Python environment management and discovery is a complex topic with dozens of different packaging systems and conventions in play, so this inventory is invaluable.</p>
<p>Now Posit Assistant can see that list, too, answer questions about it, and set up new environments for you in Positron.</p>
<blockquote>
<p>why don&rsquo;t I see my R 4.1 installation in Positron?</p>
</blockquote>
<blockquote>
<p>what&rsquo;s the highest version of Python available in Positron?</p>
</blockquote>
<blockquote>
<p>set up a new uv environment in this Positron project</p>
</blockquote>
<img src="https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/new-uv-environment.png" data-fig-align="center" data-fig-alt="Posit Assistant setting up a uv environment in a new project" />
<h2 id="consoles">Consoles
</h2>
<p>Posit Assistant can now start and select consoles. This is pretty useful if you work with long-running or concurrently running code!</p>
<blockquote>
<p>run this R script in a separate Positron console</p>
</blockquote>
<img src="https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/separate-console.png" data-fig-align="center" data-fig-alt="Posit Assistant setting up a second R console to run a script" />
<h2 id="publishing-to-posit-connect">Publishing to Posit Connect
</h2>
<p>If you use <a href="https://posit.co/products/enterprise/connect" target="_blank" rel="noopener">Posit Connect</a>, you can ask Posit Assistant to publish your content to Connect, or <a href="https://connect.posit.cloud/" target="_blank" rel="noopener">Connect Cloud</a>.</p>
<blockquote>
<p>publish this app to Connect</p>
</blockquote>
<img src="https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/publish-to-connect.png" data-fig-align="center" data-fig-alt="Posit Assistant publishing a Shiny app to Posit Connect" />
<h2 id="security">Security
</h2>
<p>You&rsquo;ll be prompted each time Assistant wants to interact with Positron. Just as with code execution or shell execution, you can approve Positron commands one by one or auto-approve for your project.</p>
<p>Because Positron commands can make changes and perform some sensitive actions, they are not available in Assistant&rsquo;s <em>Ask</em> mode.</p>
<h2 id="troubleshooting--feedback">Troubleshooting &amp; Feedback
</h2>
<p>We&rsquo;re still improving the way this system works. Many of the queries above are also answerable in some form <em>without</em> consulting Positron, though the results won&rsquo;t be as good or consistent with your environment. Consequently, you may occasionally see Posit Assistant reach for the wrong tool; tell it to &ldquo;ask Positron&rdquo; or &ldquo;use a Positron command&rdquo; to accomplish a task if it gets it wrong.</p>
<p>We&rsquo;d love your feedback on this new functionality in Positron, good or bad! Drop us a line in the <a href="https://github.com/posit-dev/positron/discussions" target="_blank" rel="noopener">Positron Discussions</a> forum on Github.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-21_assistant-drives-positron/assistant-drives-positron.png" length="318736" type="image/png" />
    </item>
    <item>
      <title>rig 0.11.0 part three: R projects</title>
      <link>https://opensource.posit.co/blog/2026-10-15_rig-0-11-0-part-three/</link>
      <pubDate>Thu, 15 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-15_rig-0-11-0-part-three/</guid>
      <dc:creator>Gábor Csárdi</dc:creator><description><![CDATA[<!--
TODO:
- [x] Add image (1920×1080 PNG or JPG) and image-alt
- [x] Trim topics, software, and languages to only what applies
- [x] Open a PR against main for a Netlify preview
-->
<style>
.prose pre {
  font-size: 0.65em;
}
</style>
<p>We are thrilled to announce rig 0.11.0 (and 0.10.0), with lots of new
functionalities: user mode R installations, R package and project management
and much more. This is the third of three blog posts about the new rig
release. This post is about managing R projects.</p>
<p>The <a href="https://opensource.posit.co/blog/2026-10-09_rig-0-11-0-part-one/">first post</a> covered user mode R installations, the <a href="https://opensource.posit.co/blog/2026-10-12_rig-0-11-0-part-two/">second</a> focused on R
packages.</p>
<p><a href="https://rig.r-lib.org/news.html" target="_blank" rel="noopener">Full changelog on the rig web site</a>.</p>
<h2 id="introduction">Introduction
</h2>
<p>The new <code>rig proj</code> command lets you manage R projects and virtual
environments. An R project lets you share and run R code in a standardized
way. rig&rsquo;s R projects use an <code>rproj.toml</code> manifest, which is still
<a href="https://github.com/tidyverse/tidyups/pull/34" target="_blank" rel="noopener">under development</a>.</p>
<div class="callout callout-note" role="note" aria-label="Note">
<div class="callout-header">
<span class="callout-title">Note</span>
</div>
<div class="callout-body">
<p><code>rig proj</code> is new and less battle-tested than other parts of rig.
Please report any issues you find on the <a href="https://github.com/r-lib/rig/issues" target="_blank" rel="noopener">rig GitHub repository</a>.</p>
</div>
</div>
<p>rig&rsquo;s R project implementation largely works the same way as other project
management tools for Python, Rust, and other languages.</p>
<h2 id="the-project-lifecycle">The project lifecycle
</h2>
<p>A project lifecycle typically involves</p>
<ol>
<li><code>rig proj init</code> (or <code>rig proj import</code>) to create a new project.</li>
<li><code>rig proj add</code> (and <code>rig proj remove</code>) to manage project dependencies.</li>
<li><code>rig proj lock</code> to resolve how the project is installed over a range
of R versions in a range of platforms.</li>
<li><code>rig proj sync</code> to install a project according to the lock file.</li>
<li><code>rig run</code> to execute R code within the context of the project.</li>
</ol>
<h2 id="creating-projects">Creating projects
</h2>
<p>There are three ways to create an R project. One is to create a brand new
project with <code>rig proj init</code>. This creates a minimal <code>rproj.toml</code> manifest
file that you can either edit manually or via <code>rig proj add</code>:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig proj init
</span></span><span class="line"><span class="cl">✓ Created rproj.toml
</span></span><span class="line"><span class="cl">✓ Created .Renviron
</span></span><span class="line"><span class="cl">✓ Created .gitignore
</span></span><span class="line"><span class="cl">✓ Created .rvenvlib/rvenv
</span></span><span class="line"><span class="cl">ℹ Project set up for R 4.6.1. Next: add dependencies to rproj.toml, then
</span></span><span class="line"><span class="cl">  run `rig proj lock` and `rig proj sync`.</span></span></code></pre></div></div>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ cat rproj.toml
</span></span><span class="line"><span class="cl">[project]
</span></span><span class="line"><span class="cl">name = &#34;x&#34;
</span></span><span class="line"><span class="cl">version = &#34;0.1.0&#34;
</span></span><span class="line"><span class="cl">type = &#34;project&#34;
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">[dependencies]
</span></span><span class="line"><span class="cl">R = &#34;&gt;= 4.6&#34;</span></span></code></pre></div></div>
<p>Another way is to convert an existing project to an <code>rproj.toml</code> manifest.
Start with an existing R project with a <code>DESCRIPTION</code>
file and run <code>rig proj import</code> to create an <code>rproj.toml</code> manifest from it.
Or start with an renv lock file and call <code>rig proj renv import</code>.
<code>rig proj import</code> keeps all fields of <code>DESCRIPTION</code>, including various
types of dependencies. For R packages you can use <code>rproj.toml</code> as the
source of truth for package metadata and dependencies and (re)generate
<code>DESCRIPTION</code> from it as needed, e.g. for CRAN submission.</p>
<p>A third way to create a project is to write an <code>rproj.toml</code> manifest manually.</p>
<h3 id="project-types">Project types
</h3>
<p>There are two types of R manifests: <em>projects</em> and <em>packages</em>. In general
we use <em>project</em> as a generic name for both types and consider a <em>package</em> as
a specialized project.</p>
<p>For a package, create the <code>R/</code>, <code>src/</code>, etc. directories as usual. See below
for a possible way to use the devtools based development tools for a rig
project.</p>
<p>For projects rig does not have a suggested way for organizing R and other
code, documentation and tests. If in doubt, follow the conventions of
R packages. Use <code>[[bin]]</code> to specify executable scripts within the project,
relative to the project root. You&rsquo;ll be able to run these scripts with
<code>rig run</code>.</p>
<h2 id="locking-a-project">Locking a project
</h2>
<p><code>rig proj lock</code> reads <code>rproj.toml</code> and works out which exact packages
should be downloaded and installed to satisfy <em>all</em> requirements from
<code>rproj.toml</code>. All requirements always include the optional and soft
dependencies. The result is a lock file called <code>rproj.lock</code>. This is also a
TOML file, typically much bigger than the original <code>rproj.toml</code> project
manifest.</p>
<h3 id="universal-lock-files">Universal lock files
</h3>
<p>The lock can and usually does include packages for multiple platforms.
The exact set of platforms and R versions to include in the lock file can
be specified in <code>rproj.toml</code> or at the command line. By default rig includes
the current R release and five platforms: the platform of the current
machine, macOS arm64, Windows x86_64, generic glibc Linux and <code>source</code>
(four platforms if the current platform coincides with one of the others).</p>
<p>A multi-platform lock file means that it is much easier to plan the
cross-platform deployment of a project: a team can include all relevant
platforms and R versions in the lock file and commit a lock file to version
control.</p>
<p>rig also records system requirements in the lock file, for platforms that
need them.</p>
<h3 id="stable-urls">Stable URLs
</h3>
<p>Universal lock files only really work well if they contain stable URLs for
binary packages for all platforms and R versions. This is why it is
important to use P3M (or another Posit Package Manager instance) with
extended metadata about all older package versions and all their
corresponding binary builds. With P3M rig is typically able to generate
lock files with binary packages for the last 3-4 R versions on all common
platforms.</p>
<h3 id="sticky-lock-files">Sticky lock files
</h3>
<p>Adding new dependencies to a project runs <code>rig proj lock</code>, but it keeps the
package versions already in <code>rproj.lock</code>, unless they conflict with the new
requirements. This is important to be able to maintain a stable set of
package versions while still adding new dependencies. To update an already
existing dependency to a newer version, you need to run
<code>rig proj lock --upgrade-package</code>. Or run <code>rig proj lock --upgrade</code> to
upgrade all packages.</p>
<h3 id="preferring-binary-packages">Preferring binary packages
</h3>
<p>By default rig does not choose an older binary package over a newer source
package. You can change that with the <code>prefer-binary</code> setting in <code>rproj.toml</code>.
E.g. <code>prefer-binary = true</code> means that rig will choose an older binary
package over a newer source package, if the older package also satisfies
the dependency requirements.</p>
<h3 id="excluding-newer-package-versions">Excluding newer package versions
</h3>
<p>You can prevent rig from automatically upgrading to newer package versions
by using the <code>exclude-newer</code> setting in <code>rproj.toml</code>. For example,
<code>exclude-newer = &quot;2026-09-30&quot;</code> will exclude any package versions that were
published after the specified date. This works for P3M&rsquo;s CRAN and
Bioconductor repositories, but not for generic CRAN-like repositories
which typically do not have release dates.</p>
<h3 id="repositories">Repositories
</h3>
<p>Projects ignore the global repository settings configured via <code>rig repos</code>.
By default projects use P3M&rsquo;s CRAN and Bioconductor repositories.
This can be configured with <code>[[repository]]</code> entries in <code>rproj.toml</code>.
You can turn off P3M&rsquo;s CRAN and Bioconductor repositories and you can
also add your own custom repositories.</p>
<p>rig&rsquo;s solver and universal lock files work best with P3M&rsquo;s CRAN and
Bioconductor metadata, so we strongly recommend using them whenever
possible.</p>
<h2 id="syncing-a-project">Syncing a project
</h2>
<p><code>rig proj sync</code> installs the packages listed in <code>rproj.lock</code> into the
project library in <code>.rvenv/lib</code>, inside the project&rsquo;s virtual environment.
It locks first if the project manifest has changed since creating the
lock file.</p>
<p>If the current project is a package (<code>type = &quot;package&quot;</code>), then
<code>rig proj sync</code> will also install the package itself into the project
library.</p>
<p><code>rig proj sync</code> also installs the R version requested in the lock file,
if it is not already installed. This makes it very easy to deploy a
project in an empty container or virtual machine: only rig and the lock
file are needed and rig installs everything required for the project: R,
system requirements and R packages.</p>
<p><code>rig proj sync</code> installs the hard requirements and the <code>dev</code> dependency
group by default. For a production deployment you can use the <code>--no-dev</code>
option to skip installing development dependencies. Use <code>--group</code> and
<code>--extra</code> to install optional dependency groups and extra dependencies.</p>
<h2 id="fast-and-lean-libraries">Fast and lean libraries
</h2>
<p>rig clones the package files when installing packages into the project
library, whenever possible. This means that installation is very fast and
space-efficient. Having the same package version installed for ten projects
on the same disk only takes up the space of a single copy.</p>
<h2 id="the-virtual-environment">The virtual environment
</h2>
<p>A rig project has two kinds of files. <code>rig proj init</code> creates the ones that
belong in version control: <code>rproj.toml</code>, <code>.Renviron</code>, <code>.rvenvlib/rvenv</code> and
<code>.gitignore</code>. Commit these, together with <code>rproj.lock</code>, and a fresh clone of
the project works after a <code>rig proj sync</code>, or right away with <code>rig run</code>.</p>
<p><code>rig proj sync</code> creates the rest in the <code>.rvenv</code> directory: the project
library in <code>.rvenv/lib</code>, <code>R</code> and <code>Rscript</code> wrapper scripts in <code>.rvenv/bin</code>,
and some configuration files. <code>.rvenv</code> is specific to the machine, it is in
<code>.gitignore</code>, and you can delete it any time, <code>rig proj sync</code> creates it
again.</p>
<p>The <code>.Renviron</code> file and the small <code>rvenv</code> package in <code>.rvenvlib</code> make sure
that R uses the project library whenever it starts in the project directory:
from a terminal, or from RStudio, Positron or VS Code. You do not need to
activate the project explicitly, although <code>.rvenv/bin</code> has activation
scripts for the common shells if you prefer that.</p>
<p>Inside the project R only sees the project library, the <code>tools</code> library
(see below) and the packages that come with R. Packages from your user or
site library do not leak into the project.</p>
<p>If the project library is out of date compared to <code>rproj.lock</code>, e.g. after
a <code>git pull</code>, R prints a warning at startup, and <code>rig proj status</code> tells
you what changed. If you start R with <code>rig run</code> in the project directory,
then it automatically runs <code>rig proj sync</code> as needed. If you use Positron,
VS Code, RStudio or another IDE, then R will warn at startup if the virtual
environment is out of date and suggest that you run <code>rig proj sync</code> and
restart R.</p>
<h2 id="managing-dependencies">Managing dependencies
</h2>
<p>R package dependencies are specified in the <code>rproj.toml</code> manifest under three
types of tables. The <code>[dependencies]</code> table includes packages that are
always installed. These are considered as R packages required for
the project. Packages in <code>[dependency-groups.&lt;name&gt;]</code> are groups of
development dependencies and they are only installed if requested, except
for the <code>dev</code> group which is installed by default. For example, the packages
that are needed for building the pkgdown website can go into a
<code>[dependency-groups.website]</code> table. <code>dependency-groups</code> is similar to
<code>Config/Needs/&lt;name&gt;</code> in <code>DESCRIPTION</code> files of R packages.
Dependencies of optional features go into <code>[optional-dependencies.&lt;name&gt;]</code>
tables and are only installed if requested. For example, if your package
has functions for visualization, but these are not required for the core
functionality, you may put them in an <code>[optional-dependencies.viz]</code> table
and other packages using yours may opt in to the <code>viz</code> feature.
(The infrastructure for depending on optional features in packages is not
built yet, and package repositories need to support it as well.)</p>
<p>You can edit the <code>rproj.toml</code> manifest manually to add dependencies or
use <code>rig proj</code> commands to do it. <code>rig proj add</code> adds packages to
<code>rproj.toml</code>, then updates <code>rproj.lock</code> and installs the new packages into
the project library:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig proj add dplyr cli</span></span></code></pre></div></div>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ cat rproj.toml
</span></span><span class="line"><span class="cl">[project]
</span></span><span class="line"><span class="cl">name = &#34;x&#34;
</span></span><span class="line"><span class="cl">version = &#34;0.1.0&#34;
</span></span><span class="line"><span class="cl">type = &#34;project&#34;
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">[dependencies]
</span></span><span class="line"><span class="cl">R = &#34;&gt;= 4.6&#34;
</span></span><span class="line"><span class="cl">cli = &#34;*&#34;
</span></span><span class="line"><span class="cl">dplyr = &#34;*&#34;</span></span></code></pre></div></div>
<p>Without a version requirement rig adds a package as <code>&quot;*&quot;</code>, any version. The
exact version is recorded in <code>rproj.lock</code>, so you only need a version
requirement if the project really needs a certain version. Version
requirements use the same syntax as for <code>rig pkg install</code>, e.g.
<code>'cli@&gt;= 3.6'</code> or <code>'dplyr@^1.1.0'</code>. <code>rig proj remove</code> removes packages.</p>
<p>Use <code>--dev</code> to add a development dependency, e.g. testthat. These go into
the <code>[dependency-groups.dev]</code> table.</p>
<p>Packages from GitHub, GitLab, git repositories, URLs and local paths use the
same syntax as <code>rig pkg install</code>, see the <a href="https://opensource.posit.co/blog/2026-10-12_rig-0-11-0-part-two/">second post</a>. Bioconductor or
other packages coming from the configured repositories work the same way as
CRAN packages. To pin a package to a certain repository, e.g. an R universe,
use <code>--with-repos</code>:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig proj add --with-repos rlib=https://r-lib.r-universe.dev cli</span></span></code></pre></div></div>
<p>This adds the repository to <code>rproj.toml</code> and pins <code>cli</code> to it:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">dependencies</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"><span class="nx">cli</span> <span class="p">=</span> <span class="p">{</span> <span class="nx">version</span> <span class="p">=</span> <span class="s2">&#34;*&#34;</span><span class="p">,</span> <span class="nx">repository</span> <span class="p">=</span> <span class="s2">&#34;rlib&#34;</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">[[</span><span class="nx">repository</span><span class="p">]]</span>
</span></span><span class="line"><span class="cl"><span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;rlib&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;https://r-lib.r-universe.dev&#34;</span></span></span></code></pre></div></div>
<p>If rig cannot resolve the new dependencies, e.g. because of a typo in a
package name, it restores <code>rproj.toml</code>.</p>
<h2 id="running-a-project">Running a project
</h2>
<p><code>rig run</code> starts R in the project&rsquo;s environment, from anywhere inside the
project. It locks and syncs the project first, if needed, so day to day you
mostly need <code>rig proj add</code>, <code>rig proj remove</code> and <code>rig run</code>.</p>
<p><code>rig run script.R</code> runs a script in the project&rsquo;s environment. Arguments
after the script name go to the script, and <code>commandArgs(TRUE)</code> picks them
up. Use <code>--no-project</code> to run the script without the project.</p>
<p>A project can give names to its scripts, in <code>[[bin]]</code> tables of
<code>rproj.toml</code>:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[[</span><span class="nx">bin</span><span class="p">]]</span>
</span></span><span class="line"><span class="cl"><span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;report&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">path</span> <span class="p">=</span> <span class="s2">&#34;scripts/report.R&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">description</span> <span class="p">=</span> <span class="s2">&#34;Build the report&#34;</span></span></span></code></pre></div></div>
<p>Then <code>rig run report --format pdf</code> runs <code>scripts/report.R</code> with the
<code>--format pdf</code> arguments, and <code>rig run --list</code> lists all named scripts of
the project.</p>
<p>You can also run the <code>.rvenv/bin/R</code> and <code>.rvenv/bin/Rscript</code> wrappers
directly, or start R from your IDE in the project directory, see the
virtual environment above.</p>
<h2 id="package-development-with-devtools">Package development with devtools
</h2>
<p>To develop an R package as a rig project, use <code>type = &quot;package&quot;</code> in
<code>rproj.toml</code>, or run <code>rig proj import</code> on an existing package.
<code>rig proj sync</code> then installs the package itself into the project library,
and creates <code>DESCRIPTION</code> from <code>rproj.toml</code> (if missing), so <code>R CMD build</code>,
<code>R CMD check</code> and other tools keep working.</p>
<p>Development tools like devtools, usethis and roxygen2 are not dependencies
of the package, so they should not be in <code>rproj.toml</code>. rig has a special
global package library for them, called <code>tools</code>, and adds it to the library
path of every project. Install your tools there once:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg install -l tools devtools usethis roxygen2</span></span></code></pre></div></div>
<p>and then they are available in all projects:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig run
</span></span><span class="line"><span class="cl">&gt; devtools::load_all()
</span></span><span class="line"><span class="cl">&gt; devtools::document()
</span></span><span class="line"><span class="cl">&gt; devtools::test()</span></span></code></pre></div></div>
<p>Packages that the package&rsquo;s tests and documentation need, e.g. testthat or
knitr, are different. Add these with <code>rig proj add --dev</code>, so they are
locked together with the other dependencies.</p>
<h2 id="inline-scripts">Inline scripts
</h2>
<p>Sometimes a project is just a single R script. For these rig supports inline
dependencies: the script declares the R version and the packages it needs in
a special comment block with a <code># /// script</code> header and a <code># ///</code> footer:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="c1"># /// script</span>
</span></span><span class="line"><span class="cl"><span class="c1"># [dependencies]</span>
</span></span><span class="line"><span class="cl"><span class="c1"># R = &#34;&gt;= 4.4&#34;</span>
</span></span><span class="line"><span class="cl"><span class="c1"># cli = &#34;*&#34;</span>
</span></span><span class="line"><span class="cl"><span class="c1"># dplyr = &#34;&gt;= 1.1&#34;</span>
</span></span><span class="line"><span class="cl"><span class="c1"># ///</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">dplyr</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">cli</span><span class="o">::</span><span class="nf">cli_text</span><span class="p">(</span><span class="s">&#34;Hello from {.pkg cli}!&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
<p>Without the leading <code>#</code> characters, the block is the same TOML as in
<code>rproj.toml</code>.</p>
<p><code>rig run script.R</code> installs the right R version if needed, installs the
packages into a separate environment in rig&rsquo;s cache, and then runs the
script. Your own package libraries do not change. The next run reuses the
environment, so it starts right away. You can share a single <code>.R</code> file, and
it runs the same way on every machine that has rig.</p>
<p>You can write the block by hand, or let rig manage it:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig proj init --script script.R
</span></span><span class="line"><span class="cl">❯ rig proj add --script script.R cli dplyr
</span></span><span class="line"><span class="cl">❯ rig proj remove --script script.R dplyr</span></span></code></pre></div></div>
<p>To pin the exact R and package versions, lock the script:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig proj lock --script script.R</span></span></code></pre></div></div>
<p>This writes <code>script.R.lock</code> next to the script. Keep the two files together,
and <code>rig run</code> will use the versions from the lock file.</p>
<p>On macOS and Linux, start the script with <code>#!/usr/bin/env -S rig run</code> and
make it executable, to run it like any other command. On Windows,
<code>rig system script-assoc</code> lets you run <code>.R</code> files from <code>cmd</code> and PowerShell.
See the <a href="https://rig.r-lib.org/scripts.html" target="_blank" rel="noopener">scripts guide</a> for more.</p>
<h2 id="caches">Caches
</h2>
<p>rig caches the files it downloads: repository metadata, package files,
packages it built from source, git repositories of git and GitHub
dependencies, and the environments of inline scripts. <code>rig pkg</code>,
<code>rig proj</code> and <code>rig run</code> share the same cache, and so do all projects, so
rig downloads or builds a package only once. rig refreshes the repository
metadata once a day by default.</p>
<p><code>rig cache info</code> shows how much space the cache takes, by category, and
<code>rig cache clean</code> deletes it, or only one category of it, with
<code>--category</code>:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig cache info
</span></span><span class="line"><span class="cl">❯ rig cache clean --category scripts</span></span></code></pre></div></div>
<p>Use <code>--no-cache</code> to skip the cache for a single command, and
<code>rig system dirs --cache</code> to see where the cache is.</p>
<h2 id="your-feedback-is-welcome">Your feedback is welcome!
</h2>
<p>We would love to hear your thoughts, suggestions, and any issues you
encounter while using rig. Please use the <a href="https://github.com/r-lib/rig/issues" target="_blank" rel="noopener">issue tracker</a> for bug reports and feature
requests, and the <a href="https://github.com/r-lib/rig/discussions" target="_blank" rel="noopener">discussion forum</a> or <a href="https://forum.posit.co/" target="_blank" rel="noopener">Posit community</a> for general questions and discussions.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-15_rig-0-11-0-part-three/featured.jpg" length="424877" type="image/jpeg" />
    </item>
    <item>
      <title>Positron October Release Highlights</title>
      <link>https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/</link>
      <pubDate>Tue, 13 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/</guid>
      <dc:creator>Julia Silge</dc:creator><description><![CDATA[<div class="callout callout-note" role="note" aria-label="Note">
<div class="callout-header">
<span class="callout-title">Note</span>
</div>
<div class="callout-body">
<p><a href="https://positron.posit.co/?utm_source=opensource-posit-co&amp;utm_medium=referral&amp;utm_campaign=positron-2026-10-release-blog&amp;utm_content=intro-note" target="_blank" rel="noopener">Positron</a> is Posit&rsquo;s new, next-generation IDE for data science. Positron is designed to be an extensible, polyglot tool for exploring data and reproducible authoring in Python, R, and more.</p>
</div>
</div>
<p>Welcome back to another edition of our monthly Positron updates! Each month we share highlights from our <a href="https://positron.posit.co/release-notes?utm_source=opensource-posit-co&amp;utm_medium=referral&amp;utm_campaign=positron-2026-10-release-blog&amp;utm_content=release-notes-link" target="_blank" rel="noopener">latest release</a> and useful resources. <a href="https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release">Last release</a> we told you about a redesigned welcome page, a first version of Import Data, new Posit Assistant features, expanded Data Connections, package vulnerability scanning, and a more responsive Console. This milestone brings a new ability for Posit Assistant to drive Positron itself, a built-in MCP server so you can bring your own coding agent, Data Connections on by default, faster language features for Quarto, and smoother interpreter and project setup.</p>
<h2 id="posit-assistant-can-drive-positron">Posit Assistant can drive Positron
</h2>
<p><a href="https://assistant.posit.co/?utm_source=opensource-posit-co&amp;utm_medium=referral&amp;utm_campaign=positron-2026-10-release-blog&amp;utm_content=assistant-section" target="_blank" rel="noopener">Posit Assistant</a> can now operate Positron itself, not just the R or Python session inside it. You can ask it to run a Shiny app, open a Parquet file in the Data Explorer, set up a Python environment, browse your data connections, or deploy to Posit Connect. Posit Assistant uses the same source of truth as the Positron UI, so it works with your real interpreters, packages, and connections rather than guessing at them.</p>
<img src="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/assistant-data-explorer.png" data-fig-align="center" data-fig-alt="Positron with the Posit Assistant chat beside the Data Explorer, which shows pokemon.xlsx that Posit Assistant opened." />
<p>In practice, this means Posit Assistant can run and preview Dash, FastAPI, Flask, Gradio, marimo, Streamlit, and Shiny apps with the same app commands you use, see which apps are running along with their status and URL, and stop them. It can show HTML files and URLs in the Viewer pane, and it can read, take screenshots of, and interact with data apps and other content there, which makes it much more useful for checking its own work on an app. It can read your configured and detected Data Connections, browse a connection&rsquo;s schema, and give you the code to open it. It can also tell which interpreter a project uses, explain why an installed interpreter isn&rsquo;t showing up, and make that interpreter available, and it knows the commands for deploying to Connect through Posit Publisher.</p>
<p>To try this preview feature, enable the <a href="positron://settings/assistant.previewFeatures"><code>assistant.previewFeatures</code></a> setting, and tell us what you think in the <a href="https://github.com/posit-dev/positron/discussions/16280" target="_blank" rel="noopener">GitHub discussion</a>.</p>
<h2 id="bring-your-own-coding-agent">Bring your own coding agent
</h2>
<p>If you already have a favorite coding agent other than Posit Assistant, this release lets it work alongside you in Positron. A new built-in Model Context Protocol (MCP) server lets coding agents such as Claude Code, Codex, and Gemini CLI work in your live Python and R sessions. Our goal is to give these agents a set of tools comparable to what Posit Assistant has: agents can list your sessions, run code in the Console, inspect objects without cluttering your history, read recent session history, interrupt a long-running computation, look at the current plot, and search for and run Positron commands. These other agents may not have the data science expertise that Posit Assistant has, but they can still help you write code and explore data.</p>
<p>You stay in the loop on what an agent does. Code that an agent runs shows up in the Console with the agent&rsquo;s name next to it, so you can always tell agent code from your own. Console tabs also now show a dot when code runs in a console you aren&rsquo;t looking at, whether that code came from Posit Assistant or an external agent.</p>
<img src="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/claude-code-in-positron.png" data-fig-align="center" data-fig-alt="Claude Code in Positron&#39;s editor area, asked whether to visualize country-to-country twinning relationships as a heatmap or a network graph. It calls the Positron execute_code and get_plot tools, then recommends the heatmap and explains it. In the Console, the R code it ran is labeled Claude Code, and the Plots pane shows the resulting heatmap of twinning links between the top countries." />
<p>To try this experimental feature, enable the <a href="positron://settings/ai.mcp.enabled"><code>ai.mcp.enabled</code></a> setting. Positron configures Claude Code for you automatically, and the <em>Positron MCP: Add to Coding Agent</em> command sets up the Codex and Gemini CLIs. For any other MCP client, <em>Copy Connection Details</em> gives you a URL and token to connect with.</p>
<h2 id="data-connections-on-by-default">Data Connections on by default
</h2>
<p><a href="https://positron.posit.co/data-connections?utm_source=opensource-posit-co&amp;utm_medium=referral&amp;utm_campaign=positron-2026-10-release-blog&amp;utm_content=data-connections-section" target="_blank" rel="noopener">Data Connections</a> is now the default way to work with databases and data warehouses in Positron. Data Connections connects to databases directly, without needing a Python or R session, and it replaces both the older Connections pane and the Catalog Explorer. If you need the older Connections pane, set <a href="positron://settings/dataConnections.enabled"><code>dataConnections.enabled</code></a> to <code>false</code> and reload the window.</p>
<p>This release also extends what you can connect to and how you sign in. Amazon Redshift connections can sign in with AWS Identity and Access Management (IAM), for both Redshift Serverless and provisioned clusters, using credentials from the standard AWS credential provider chain. On Posit Workbench, Snowflake and Databricks connections can use the session&rsquo;s managed credentials with no credential input at all. Snowflake users get the most new features this month; the Data Connections pane shows Snowflake semantic views with their dimensions, facts, metrics, and relationships, you can browse Snowflake stages as folders and files, and connections in <code>connections.toml</code> show up automatically as detected connections.</p>
<p>Smaller improvements round out the experience. When you open a DuckDB or SQLite file from the Explorer, Positron offers to create a data connection for it. <strong>Connect With</strong> can now generate ggsql code for SQLite, DuckDB, ODBC, PostgreSQL, and Redshift connections.</p>
<img src="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/connections-ggsql-bikeshare.gif" data-fig-align="center" data-fig-alt="The Data Connections pane in Positron showing a Bikeshare demo SQLite connection. Choosing ggsql under Connect With opens a dialog with the generated connection code. After clicking Connect, the code runs in a ggsql console, followed by a SQL query that counts bikes by bike type and returns a results table." />
<p>The <strong>Add Data Connection</strong> dialog lists each driver with a short description, and Positron now tells you when a connection fails to open or expand. For slow tables and views, the Data Explorer now shows a progress indicator and placeholders while data arrives, and it loads column summaries in two passes so that missing-value counts appear quickly and sparklines follow later.</p>
<h2 id="faster-language-features-for-quarto">Faster language features for Quarto
</h2>
<p>Positron now provides completions, hover, diagnostics, outline, formatting, and other language features natively for R and Python cells in Quarto and R Markdown documents. Before, the Quarto extension wrote temporary virtual documents to disk to power these features. Positron now uses a virtual notebook in memory instead, which is faster (especially in remote sessions) and solves a whole category of bugs, such as Python imports that did not resolve correctly. It also means Go to Definition, Find References, and Rename work across R cells, finding names that earlier cells define.</p>
<p>The document outline for Quarto and R Markdown documents with many code chunks now updates quickly, and it no longer shows duplicate groups or symbols. Inline output, including HTML tables and the inline Data Explorer, now scales with your editor font size. If you run into problems with the new language features and need to go back to the old behavior, set <a href="positron://settings/quarto.embeddedLanguageFeatures.native"><code>quarto.embeddedLanguageFeatures.native</code></a> to <code>false</code>.</p>
<h2 id="interpreter-project-setup">Interpreter project setup
</h2>
<p>Positron is better at setting up the right Python environment for your project. When a workspace has a <code>uv.lock</code> or <code>pixi.lock</code> file but no environment yet, Positron offers to create it with <code>uv sync</code> or <code>pixi install</code>, which is especially handy right after you clone a project. If uv is missing, the New Folder flow can install it for you, and package installs and the Packages pane work with uv right away. When Positron finds a new Python environment in a workspace, it now offers to start a console session in it, and system Python installations now show last in the interpreter picker, below uv, venv, conda, and pyenv environments.</p>
<img src="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/uv-lock-create-env.gif" data-fig-align="center" data-fig-alt="A Shiny dashboard Quarto document open in Positron. A notification says the project has a uv.lock file but no virtual environment and offers to run uv sync. After clicking Yes, Positron creates the environment and then offers to start a console session with it." />
<p>For more control over interpreters in <em>both</em> Python and R, interpreter path settings now support <code>${workspaceFolder}</code>, so a project can point to an interpreter that lives inside it. The new <a href="positron://settings/interpreters.definitions"><code>interpreters.definitions</code></a> setting lets you define additional R and Python interpreters, each with its own label, environment variables, and startup script. This is useful for workflows like loading environment modules or configuring rJava before a session starts. Set <a href="positron://settings/interpreters.discovery"><code>interpreters.discovery</code></a> to <code>definitionsOnly</code> to show only the interpreters you have defined for a language.</p>
<h2 id="whats-coming-next">What&rsquo;s coming next
</h2>
<ul>
<li>Meet Posit at <a href="https://posit.co/events/snowflake-world-tour-2026-nyc?utm_source=opensource-posit-co&amp;utm_medium=referral&amp;utm_campaign=positron-2026-10-release-blog&amp;utm_term=snowflake&amp;utm_content=events-section" target="_blank" rel="noopener">Snowflake World Tour NYC</a> on October 15. Stop by our booth, schedule time with a Posit expert, or catch our theater session on AI-powered data science where your data lives, inside Snowflake.</li>
<li>Join us at <a href="https://opensource.posit.co/events/data-outpost-2026/" target="_blank" rel="noopener">Data Outpost</a> on November 4-5 in San Francisco. I&rsquo;ll be speaking on &ldquo;The SQL Agent Harness We Didn&rsquo;t Mean to Build,&rdquo; about how the SQL tools we built in Positron for people turned out to already be a harness for AI assistants.</li>
</ul>
<div class="callout callout-tip" role="note" aria-label="Tip">
<div class="callout-header">
<span class="callout-title">Tip</span>
</div>
<div class="callout-body">
<p><a href="https://positron.posit.co/download?utm_source=opensource-posit-co&amp;utm_medium=referral&amp;utm_campaign=positron-2026-10-release-blog&amp;utm_content=download-cta" target="_blank" rel="noopener">Download Positron</a> to try out the new features and improvements in this release!</p>
</div>
</div>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-13_positron-2026-10-release/featured.svg" length="91754" type="image/svg&#43;xml" />
    </item>
    <item>
      <title>rig 0.11.0 part two: R packages</title>
      <link>https://opensource.posit.co/blog/2026-10-12_rig-0-11-0-part-two/</link>
      <pubDate>Mon, 12 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-12_rig-0-11-0-part-two/</guid>
      <dc:creator>Gábor Csárdi</dc:creator><description><![CDATA[<!--
TODO:
- [x] Add image (1920×1080 PNG or JPG) and image-alt
- [x] Trim topics, software, and languages to only what applies
- [x] Open a PR against main for a Netlify preview
-->
<style>
.prose pre {
  font-size: 0.65em;
}
</style>
<p>We are thrilled to announce rig 0.11.0 (and 0.10.0), with lots of new
functionalities: user mode R installations, R package and project management
and much more. This is the second of three blog posts about the new rig
release. This post is about managing R packages.</p>
<p>The <a href="https://opensource.posit.co/blog/2026-10-09_rig-0-11-0-part-one/">first post</a> covered user mode R installations. The <a href="https://opensource.posit.co/blog/2026-10-15_rig-0-11-0-part-three/">third post</a> focuses on
<a href="https://rig.r-lib.org/proj-guide.html" target="_blank" rel="noopener">project management</a>.</p>
<p><a href="https://rig.r-lib.org/news.html" target="_blank" rel="noopener">Full changelog on the rig web site</a>.</p>
<h2 id="introduction">Introduction
</h2>
<p>The new <code>rig pkg</code> command lets you manage R packages: installing,
removing, and querying package dependencies. It supports CRAN-like
repositories, packages in git repositories (including on GitHub), URLs
pointing to package files and packages in local files and directories.</p>
<p><code>rig pkg</code> is aimed at R users and developers who use a single (or a few)
package libraries. If you prefer to use project-specific libraries, you
probably want to use <code>rig proj</code> instead.</p>
<div class="callout callout-note" role="note" aria-label="Note">
<div class="callout-header">
<span class="callout-title">Note</span>
</div>
<div class="callout-body">
<p><code>rig pkg</code> is new and less battle-tested than other parts of rig.
Please report any issues you find on the <a href="https://github.com/r-lib/rig/issues" target="_blank" rel="noopener">rig GitHub repository</a>.</p>
</div>
</div>
<h2 id="managing-installed-packages">Managing installed packages
</h2>
<p><code>rig pkg list</code> lists installed packages in a library. <code>rig pkg remove</code>
removes a package from a library.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg list
</span></span><span class="line"><span class="cl">559 packages (R 4.6.1, main: /Users/gaborcsardi/Library/R/arm64/4.6/library)
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Package              Version      Built   Platform                   Source
</span></span><span class="line"><span class="cl">----------------------------------------------------------------------------------------------------------------
</span></span><span class="line"><span class="cl">abind                1.4-8        4.6.0   -                          RSPM
</span></span><span class="line"><span class="cl">ade4                 1.7-24       4.6.0   aarch64-apple-darwin23     CRAN
</span></span><span class="line"><span class="cl">adegenet             2.1.11       4.6.0   aarch64-apple-darwin23     CRAN
</span></span><span class="line"><span class="cl">AdmixPoly            1.0.1        4.6.0   aarch64-apple-darwin20     RSPM
</span></span><span class="line"><span class="cl">affy                 1.90.0       4.6.1   aarch64-apple-darwin23     RSPM
</span></span><span class="line"><span class="cl">affyio               1.82.0       4.6.0   aarch64-apple-darwin20     RSPM
</span></span><span class="line"><span class="cl">[...]</span></span></code></pre></div></div>
<p><code>rig pkg</code> commands use the current default R version (as in <code>rig default</code>),
unless the <code>-r</code> or <code>--r-version</code> option specifies otherwise. They use the
default library (as in <code>rig library default</code>), unless the <code>-l</code> or
<code>--library</code> option specifies otherwise.</p>
<p><code>rig pkg doctor</code> checks the health of your package library, identifying any
issues with installed packages or their dependencies: missing dependencies,
dependency conflicts, ABI conflicts, etc. It also tells you how to fix these
issues.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg doctor
</span></span><span class="line"><span class="cl">3 problems (1 error, 2 warnings) in 559 packages (R 4.6.1, main: /Users/gaborcsardi/Library/R/arm64/4.6/library)
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Package              Version   Severity   Problem   Details
</span></span><span class="line"><span class="cl">-------------------------------------------------------------------------------------------------------------
</span></span><span class="line"><span class="cl">00LOCK-dress.graph   -         warning    lock      lock directory left behind by an interrupted installation
</span></span><span class="line"><span class="cl">dress.graph          -         warning    broken    no DESCRIPTION file
</span></span><span class="line"><span class="cl">missoNet             1.5.1     error      missing   Imports ComplexHeatmap, not installed
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">To fix the errors, run:
</span></span><span class="line"><span class="cl">  rig pkg install ComplexHeatmap
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">To remove the leftover lock directories, if no installation is running, run:
</span></span><span class="line"><span class="cl">  rm -rf /Users/gaborcsardi/Library/R/arm64/4.6/library/00LOCK-dress.graph
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">To remove the broken packages, run:
</span></span><span class="line"><span class="cl">  rm -rf /Users/gaborcsardi/Library/R/arm64/4.6/library/dress.graph
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">✗ Found 1 error in /Users/gaborcsardi/Library/R/arm64/4.6/library</span></span></code></pre></div></div>
<h2 id="installing-packages">Installing packages
</h2>
<p><code>rig pkg install</code> can install R packages from CRAN-like repositories,
git repositories, GitHub, URLs, and local paths. It uses the default R
version and the default package library (see below about libraries),
unless otherwise specified. It caches metadata and package files heavily,
avoids redundant downloads and installations, and performs downloads and
package builds in parallel. It uses the host OS&rsquo;s file cloning capabilities
to efficiently copy files when installing packages.</p>
<p>If you used the pak R package to install R packages previously, <code>rig pkg</code>
will probably feel familiar, except that you can run it from the command
line instead of from within R.</p>
<p>This is what installing a package into an empty library looks like, if the
package files are already cached:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg install dplyr
</span></span><span class="line"><span class="cl">▶ Downloading binary package metadata
</span></span><span class="line"><span class="cl">▶ Solving dependencies
</span></span><span class="line"><span class="cl">✓ Solved dependencies
</span></span><span class="line"><span class="cl">15 of 15 packages to install (R 4.6.1, test: /Users/gaborcsardi/Library/R/arm64/4.6/library/__test)
</span></span><span class="line"><span class="cl">Package     Version  Type    Action   Reason
</span></span><span class="line"><span class="cl">cli         3.6.6    binary  install  not installed
</span></span><span class="line"><span class="cl">dplyr       1.2.1    binary  install  not installed
</span></span><span class="line"><span class="cl">generics    0.1.4    binary  install  not installed
</span></span><span class="line"><span class="cl">glue        1.8.1    binary  install  not installed
</span></span><span class="line"><span class="cl">lifecycle   1.0.5    binary  install  not installed
</span></span><span class="line"><span class="cl">magrittr    2.0.5    binary  install  not installed
</span></span><span class="line"><span class="cl">pillar      1.11.1   binary  install  not installed
</span></span><span class="line"><span class="cl">pkgconfig   2.0.3    binary  install  not installed
</span></span><span class="line"><span class="cl">R6          2.6.1    binary  install  not installed
</span></span><span class="line"><span class="cl">rlang       1.3.0    binary  install  not installed
</span></span><span class="line"><span class="cl">tibble      3.3.1    binary  install  not installed
</span></span><span class="line"><span class="cl">tidyselect  1.2.1    binary  install  not installed
</span></span><span class="line"><span class="cl">utf8        1.2.6    binary  install  not installed
</span></span><span class="line"><span class="cl">vctrs       0.7.3    binary  install  not installed
</span></span><span class="line"><span class="cl">withr       3.0.3    binary  install  not installed
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">▶ Downloading 15 packages
</span></span><span class="line"><span class="cl">✓ Cached: cli
</span></span><span class="line"><span class="cl">✓ Cached: dplyr
</span></span><span class="line"><span class="cl">✓ Cached: generics
</span></span><span class="line"><span class="cl">✓ Cached: glue
</span></span><span class="line"><span class="cl">✓ Cached: lifecycle
</span></span><span class="line"><span class="cl">✓ Cached: magrittr
</span></span><span class="line"><span class="cl">✓ Cached: pillar
</span></span><span class="line"><span class="cl">✓ Cached: pkgconfig
</span></span><span class="line"><span class="cl">✓ Cached: R6
</span></span><span class="line"><span class="cl">✓ Cached: rlang
</span></span><span class="line"><span class="cl">✓ Cached: tibble
</span></span><span class="line"><span class="cl">✓ Cached: tidyselect
</span></span><span class="line"><span class="cl">✓ Cached: utf8
</span></span><span class="line"><span class="cl">✓ Cached: vctrs
</span></span><span class="line"><span class="cl">✓ Cached: withr
</span></span><span class="line"><span class="cl">Complete: 0 downloaded, 15 cached [========================================] 15/15 packages
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">▶ Installing 15 packages.
</span></span><span class="line"><span class="cl">Installed R6 2.6.1
</span></span><span class="line"><span class="cl">Installed cli 3.6.6
</span></span><span class="line"><span class="cl">Installed rlang 1.3.0
</span></span><span class="line"><span class="cl">Installed magrittr 2.0.5
</span></span><span class="line"><span class="cl">Installed pkgconfig 2.0.3
</span></span><span class="line"><span class="cl">Installed glue 1.8.1
</span></span><span class="line"><span class="cl">Installed withr 3.0.3
</span></span><span class="line"><span class="cl">Installed utf8 1.2.6
</span></span><span class="line"><span class="cl">Installed generics 0.1.4
</span></span><span class="line"><span class="cl">Installed lifecycle 1.0.5
</span></span><span class="line"><span class="cl">Installed vctrs 0.7.3
</span></span><span class="line"><span class="cl">Installed tidyselect 1.2.1
</span></span><span class="line"><span class="cl">Installed pillar 1.11.1
</span></span><span class="line"><span class="cl">Installed tibble 3.3.1
</span></span><span class="line"><span class="cl">Installed dplyr 1.2.1
</span></span><span class="line"><span class="cl">✓ Installed all 15 packages successfully
</span></span><span class="line"><span class="cl">✓ Installed 15 packages (R 4.6.1, test: /Users/gaborcsardi/Library/R/arm64/4.6/library/__test)</span></span></code></pre></div></div>
<h3 id="version-constraints">Version constraints
</h3>
<p><code>rig pkg install</code> supports version constraints for packages. Request a
specific version of a package with <code>@==&lt;version&gt;</code>:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg install ggplot2@==4.0.2</span></span></code></pre></div></div>
<p>If you are familiar with <code>~</code> and <code>^</code> version constraints from other languages,
you can use them with <code>rig pkg install</code> as well. E.g. to install the
latest version of the ggplot2 3.x.y series, you would run:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg install ggplot2@^3.0.0</span></span></code></pre></div></div>
<h3 id="dependency-solver">Dependency solver
</h3>
<p>The rig dependency solver makes sure that all package dependencies are
resolved correctly before installation. If the combination of packages
cannot be installed on the specified R version or platform, rig will report
an error and refuse to proceed with the installation. For example:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg install -r 4.0.5-x86_64 &#39;testthat@&gt;=3.3.0&#39;
</span></span><span class="line"><span class="cl">▶ Downloading binary package metadata
</span></span><span class="line"><span class="cl">▶ Solving dependencies
</span></span><span class="line"><span class="cl">✗ Cannot resolve dependencies for R 4.0.5 / x86_64-apple-darwin:
</span></span><span class="line"><span class="cl">  Because testthat &gt;=3.3.0 depends on R &gt;=4.1.0 and you requested
</span></span><span class="line"><span class="cl">  testthat &gt;=3.3.0, the requested packages cannot be installed.</span></span></code></pre></div></div>
<h3 id="packages-from-git-github-urls-paths">Packages from git, GitHub, URLs, paths
</h3>
<p>If you are familiar with pak&rsquo;s syntax for installing packages from
various non-CRAN sources, you can use the same syntax with rig. E.g. a
GitHub package is simply <code>username/repo</code>. You can use the usual syntax
for tags, branches, pull requests:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg install r-lib/cli
</span></span><span class="line"><span class="cl">❯ rig pkg install r-lib/cli@badcafe
</span></span><span class="line"><span class="cl">❯ rig pkg install r-lib/cli@some-branch
</span></span><span class="line"><span class="cl">❯ rig pkg install r-lib/cli#41</span></span></code></pre></div></div>
<p>Prefix packages in git repositories with <code>git::</code>. To install a package
from a URL simply use the full URL. For a local path use a relative path
starting with <code>./</code>, <code>../</code> or <code>~/</code> or an absolute path:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg install .
</span></span><span class="line"><span class="cl">❯ rig pkg install ./mypkg
</span></span><span class="line"><span class="cl">❯ rig pkg install ../mypkg
</span></span><span class="line"><span class="cl">❯ rig pkg install ~/works/mypkg
</span></span><span class="line"><span class="cl">❯ rig pkg install /opt/src/mypkg
</span></span><span class="line"><span class="cl">❯ rig pkg install ./mypkg_1.0.0.tar.gz</span></span></code></pre></div></div>
<h3 id="preferring-binary-packages">Preferring binary packages
</h3>
<p>rig prefers to install the binary package for a certain package version if
it is available, instead of building and potentially compiling it from
source. By default it does not choose an older version over a newer one
just because a binary is available for the older version. The
<code>--prefer-binary</code> option changes this. Use it if you prefer older binary
packages over newer source packages:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg install --prefer-binary tidyverse</span></span></code></pre></div></div>
<h3 id="installing-dependencies">Installing dependencies
</h3>
<p>To install the dependencies of a package, without installing the package
itself, use <code>--no-install-project</code>. This is especially useful to install
all dependencies of a package tree in the current working directory. The
second variant also installs soft (development) dependencies:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg install --no-install-project .
</span></span><span class="line"><span class="cl">❯ rig pkg install --no-install-project --dev .</span></span></code></pre></div></div>
<h2 id="repositories">Repositories
</h2>
<p><code>rig pkg</code> subcommands always use the configured repositories, see the
<code>rig repos</code> command. They also have <code>--with-repos</code> and <code>--without-repos</code>
options to include or exclude specific repositories when performing a single
package operation, without modifying the configured repositories. E.g. to
query the version of a package on CRAN and P3M you can run:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg info otel --without-repos --with-repos=p3m --versions
</span></span><span class="line"><span class="cl">otel — 2 versions (latest 0.2.0)
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Version   Published    R          Deps
</span></span><span class="line"><span class="cl">-------------------------------------------------------
</span></span><span class="line"><span class="cl">0.1.0     2025-07-31   &gt;= 3.6.0      0
</span></span><span class="line"><span class="cl">0.2.0     2025-08-29   &gt;= 3.6.0      0   ← latest</span></span></code></pre></div></div>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg info otel --without-repos --with-repos=cran --versions
</span></span><span class="line"><span class="cl">otel — 1 version (latest 0.2.0)
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Version   Published   R          Deps
</span></span><span class="line"><span class="cl">-------------------------------------------------------
</span></span><span class="line"><span class="cl">0.2.0     ?           &gt;= 3.6.0      0   ← latest</span></span></code></pre></div></div>
<h2 id="package-queries">Package queries
</h2>
<p><code>rig pkg info</code> prints information about a package, by default about the
latest version:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg info tidymodels
</span></span><span class="line"><span class="cl">tidymodels 1.5.0 (RSPM)
</span></span><span class="line"><span class="cl">Easily Install and Load the &#39;Tidymodels&#39; Packages
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">The tidy modeling &#34;verse&#34; is a collection of packages for modeling and
</span></span><span class="line"><span class="cl">statistical analysis that share the underlying design philosophy, grammar, and
</span></span><span class="line"><span class="cl">data structures of the tidyverse.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Maintainer    Max Kuhn &lt;max@posit.co&gt;
</span></span><span class="line"><span class="cl">License       MIT + file LICENSE
</span></span><span class="line"><span class="cl">Published     2026-04-23 06:20:02 UTC
</span></span><span class="line"><span class="cl">URL           https://tidymodels.tidymodels.org,
</span></span><span class="line"><span class="cl">              https://github.com/tidymodels/tidymodels
</span></span><span class="line"><span class="cl">BugReports    https://github.com/tidymodels/tidymodels/issues
</span></span><span class="line"><span class="cl">Compilation   no
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Depends       R (&gt;= 4.1)
</span></span><span class="line"><span class="cl">Imports       broom (&gt;= 1.0.12), cli (&gt;= 3.6.6), conflicted (&gt;= 1.2.0), dials
</span></span><span class="line"><span class="cl">              (&gt;= 1.4.3), dplyr (&gt;= 1.2.1), ggplot2 (&gt;= 4.0.3), hardhat (&gt;=
</span></span><span class="line"><span class="cl">              1.4.3), infer (&gt;= 1.1.0), modeldata (&gt;= 1.5.1), parsnip (&gt;=
</span></span><span class="line"><span class="cl">              1.5.0), purrr (&gt;= 1.2.2), recipes (&gt;= 1.3.2), rlang (&gt;= 1.2.0),
</span></span><span class="line"><span class="cl">              rsample (&gt;= 1.3.2), rstudioapi (&gt;= 0.18.0), tailor (&gt;= 0.1.0),
</span></span><span class="line"><span class="cl">              tidyr (&gt;= 1.3.2), tune (&gt;= 2.1.0), workflows (&gt;= 1.3.0),
</span></span><span class="line"><span class="cl">              workflowsets (&gt;= 1.1.1), yardstick (&gt;= 1.4.0)
</span></span><span class="line"><span class="cl">Suggests      covr, glue, knitr, rmarkdown, testthat (&gt;= 3.0.0), xml2</span></span></code></pre></div></div>
<p><code>rig pkg info --versions</code> lists all versions of a package. This only works
with P3M repositories because it needs extended metadata that plain
CRAN-like repositories typically do not have:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg info tidymodels --versions
</span></span><span class="line"><span class="cl">tidymodels — 17 versions (latest 1.5.0)
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Version   Published    R        Deps
</span></span><span class="line"><span class="cl">-------------------------------------------------------
</span></span><span class="line"><span class="cl">0.0.1     2018-07-27   &gt;= 3.1     18
</span></span><span class="line"><span class="cl">0.0.2     2018-11-27   &gt;= 3.1     20
</span></span><span class="line"><span class="cl">0.0.3     2019-10-04   &gt;= 3.1     20
</span></span><span class="line"><span class="cl">0.1.0     2020-02-16   &gt;= 3.1     22
</span></span><span class="line"><span class="cl">0.1.1     2020-07-14   &gt;= 3.1     20
</span></span><span class="line"><span class="cl">0.1.2     2020-11-22   &gt;= 3.1     19
</span></span><span class="line"><span class="cl">0.1.3     2021-04-19   &gt;= 3.1     20
</span></span><span class="line"><span class="cl">0.1.4     2021-10-01   &gt;= 3.1     21
</span></span><span class="line"><span class="cl">0.2.0     2022-03-19   &gt;= 3.4     21
</span></span><span class="line"><span class="cl">1.0.0     2022-07-13   &gt;= 3.4     21
</span></span><span class="line"><span class="cl">1.1.0     2023-05-01   &gt;= 3.4     21
</span></span><span class="line"><span class="cl">1.1.1     2023-08-24   &gt;= 3.4     21
</span></span><span class="line"><span class="cl">1.2.0     2024-03-25   &gt;= 3.6     21
</span></span><span class="line"><span class="cl">1.3.0     2025-02-21   &gt;= 3.6     21
</span></span><span class="line"><span class="cl">1.4.0     2025-09-05   &gt;= 4.1     21
</span></span><span class="line"><span class="cl">1.4.1     2025-09-08   &gt;= 4.1     21
</span></span><span class="line"><span class="cl">1.5.0     2026-04-23   &gt;= 4.1     21   ← latest</span></span></code></pre></div></div>
<p><code>rig pkg deps</code> prints the dependencies of a package. <code>rig pkg tree</code> does
the same, but as a dependency tree. You can use these commands to query
non-CRAN-like packages. E.g. the dependency tree of the package in the
current working directory is</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg tree --dev .
</span></span><span class="line"><span class="cl">otelsdk 0.2.4.9000 (local: /Users/gaborcsardi/works/otelsdk) — 14 direct, 51 total
</span></span><span class="line"><span class="cl">├── otel 0.2.0
</span></span><span class="line"><span class="cl">│   └── R (&gt;= 3.6.0) [D]
</span></span><span class="line"><span class="cl">└── utils
</span></span><span class="line"><span class="cl">[Suggests]
</span></span><span class="line"><span class="cl">├── callr 3.8.0
</span></span><span class="line"><span class="cl">│   ├── R (&gt;= 3.4) [D]
</span></span><span class="line"><span class="cl">│   ├── otel 0.2.0 (&gt;= 0.2.0) (*)
</span></span><span class="line"><span class="cl">│   ├── processx 3.9.0 (&gt;= 3.6.1)
</span></span><span class="line"><span class="cl">│   │   ├── R (&gt;= 3.4.0) [D]
</span></span><span class="line"><span class="cl">│   │   ├── ps 1.9.3 (&gt;= 1.9.3)
</span></span><span class="line"><span class="cl">│   │   │   ├── R (&gt;= 3.4) [D]
</span></span><span class="line"><span class="cl">│   │   │   └── utils
</span></span><span class="line"><span class="cl">│   │   ├── R6 2.6.1
</span></span><span class="line"><span class="cl">│   │   │   └── R (&gt;= 3.6) [D]
</span></span><span class="line"><span class="cl">│   │   └── utils
</span></span><span class="line"><span class="cl">│   ├── R6 2.6.1 (*)
</span></span><span class="line"><span class="cl">│   └── utils
</span></span><span class="line"><span class="cl">├── cli 3.6.6
</span></span><span class="line"><span class="cl">│   ├── R (&gt;= 3.4) [D]
</span></span><span class="line"><span class="cl">│   └── utils
</span></span><span class="line"><span class="cl">├── curl 8.0.0
</span></span><span class="line"><span class="cl">│   └── R (&gt;= 3.0.0) [D]
</span></span><span class="line"><span class="cl">[...]</span></span></code></pre></div></div>
<p>The <code>--dev</code> flag includes development dependencies as well.</p>
<p><code>rig pkg search</code> searches all CRAN packages using R-hub package search
service:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig pkg search palette --short
</span></span><span class="line"><span class="cl">- &#34;palette&#34; ----------------------------------- 177 packages in 0.009 seconds -
</span></span><span class="line"><span class="cl"> #     package      version  by                     @ title
</span></span><span class="line"><span class="cl"> 1 100 RColorBrewer 1.1-3    Erich Neuwirth        5y ColorBrewer Palettes
</span></span><span class="line"><span class="cl"> 2  46 colorspace   2.1-3    Achim Zeileis         3M A Toolbox for Manipula...
</span></span><span class="line"><span class="cl"> 3  23 paletteer    1.7.0    Emil Hvitfeldt        9M Comprehensive Collecti...
</span></span><span class="line"><span class="cl"> 4  16 ggsci        5.2.0    Nan Xiao              2M Scientific Journal and...
</span></span><span class="line"><span class="cl"> 5  13 wesanderson  0.3.7    Karthik Ram           3y A Wes Anderson Palette...
</span></span><span class="line"><span class="cl"> 6   8 rcartocolor  2.1.2    Jakub Nowosad         1y &#39;CARTOColors&#39; Palettes
</span></span><span class="line"><span class="cl"> 7   8 pals         1.10     Kevin Wright          2y Color Palettes, Colorm...
</span></span><span class="line"><span class="cl"> 8   8 scico        1.5.0    Thomas Lin Pedersen   3y Colour Palettes Based...
</span></span><span class="line"><span class="cl"> 9   6 palette      0.0.3    Christopher T. Kenny  1y Color Scheme Helpers
</span></span><span class="line"><span class="cl">10   6 MetBrewer    0.2.0    Blake Robert Mills    5y Color Palettes Inspire...
</span></span><span class="line"><span class="cl">11   6 palr         0.5.0    Michael D. Sumner     2M Colour Palettes for Data
</span></span><span class="line"><span class="cl">12   6 blends       0.1.2    David Hodge           3M Blend Colours and Pale...
</span></span><span class="line"><span class="cl">13   6 biscale      1.1.0    Christopher Prener    1y Tools and Palettes for...
</span></span><span class="line"><span class="cl">14   5 palettes     0.2.2    Michael McCarthy      1y Methods for Colour Vec...
</span></span><span class="line"><span class="cl">15   5 PrettyCols   1.1.0    Nicola Rennie         2y Pretty Colour Palettes
</span></span><span class="line"><span class="cl">16   5 gifski       1.32.0-2 Jeroen Ooms           2y Highest Quality GIF En...
</span></span><span class="line"><span class="cl">17   5 wacolors     0.3.1    Cory McCartan         5y Colorblind-Friendly Pa...
</span></span><span class="line"><span class="cl">18   4 colourpicker 1.3.0    Dean Attali           3y A Colour Picker Tool f...
</span></span><span class="line"><span class="cl">19   4 amerika      0.1.1    Philip Waggoner       1y American Politics-Insp...
</span></span><span class="line"><span class="cl">20   4 makePalette  0.1.2    Jorge L. C. Musaja    3y Make Palette
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Next 20 results: rig pkg search palette --from 21 --short</span></span></code></pre></div></div>
<h2 id="package-libraries">Package libraries
</h2>
<p>rig creates a user-level package library for each R installation by default.
(See the <a href="https://rig.r-lib.org/faq.html" target="_blank" rel="noopener">rig FAQ</a> why.) This is the package
library that <code>rig pkg</code> commands use by default.</p>
<p>The <code>rig library</code> command supports creating other package libraries, still
stored in the user&rsquo;s home directory. You can refer to them by name and make
them the default library for <code>rig pkg</code> commands with <code>rig library default</code>.</p>
<p>For example to create a temporary library and install the Shiny package from
GitHub into it, including development dependencies, you can run:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rig library add <span class="nb">test</span>
</span></span><span class="line"><span class="cl">rig library default <span class="nb">test</span>
</span></span><span class="line"><span class="cl">rig pkg install --dev rstudio/shiny</span></span></code></pre></div></div>
<p>You can also use the <code>-l</code> or <code>--library</code> option of the <code>rig pkg</code> commands to
change the package library temporarily for one command, without changing the
default.</p>
<p>If you are using the <a href="https://rig.r-lib.org/macos-app.html" target="_blank" rel="noopener">macOS menu bar app</a>, then you can also manage package
libraries through the app&rsquo;s interface.</p>
<h2 id="system-requirements">System requirements
</h2>
<p>On certain Linux systems rig supports automatic system requirements
installation. These are currently:</p>
<ul>
<li>Ubuntu Linux</li>
<li>RedHat Enterprise Linux and clones</li>
<li>openSUSE Linux and SUSE Linux Enterprise</li>
<li>Debian Linux</li>
<li>Fedora Linux</li>
<li>Alpine Linux</li>
</ul>
<p>For the automatic system requirements installation to work, rig must run
as the <code>root</code> user or with password-less <code>sudo</code> privileges to call the
system package manager.</p>
<p>Note that in user mode, rig installs the self-contained manylinux R build,
which does not require any system-level dependencies and also sets up
Posit&rsquo;s manylinux package repository, which has self-contained binaries for
most CRAN and Bioconductor packages. So in user mode you typically do not
need to worry about system-level dependencies.</p>
<h2 id="your-feedback-is-welcome">Your feedback is welcome!
</h2>
<p>We would love to hear your thoughts, suggestions, and any issues you
encounter while using rig. Please use the <a href="https://github.com/r-lib/rig/issues" target="_blank" rel="noopener">issue tracker</a> for bug reports and feature
requests, and the <a href="https://github.com/r-lib/rig/discussions" target="_blank" rel="noopener">discussion forum</a> or <a href="https://forum.posit.co/" target="_blank" rel="noopener">Posit community</a> for general questions and discussions.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-12_rig-0-11-0-part-two/featured.jpg" length="427378" type="image/jpeg" />
    </item>
    <item>
      <title>Correct, transparent, and reproducible data agents</title>
      <link>https://opensource.posit.co/blog/2026-10-09_ai-newsletter/</link>
      <pubDate>Fri, 09 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-09_ai-newsletter/</guid>
      <dc:creator>Sara Altman</dc:creator>
      <dc:creator>Simon Couch</dc:creator><description><![CDATA[<div class="callout callout-tip" role="note" aria-label="Tip">
<div class="callout-header">
<span class="callout-title"><strong>Subscribe to the AI Newsletter!</strong></span>
</div>
<div class="callout-body">
<p>The AI newsletter is published as an RSS feed. Follow it in your favorite reader:</p>
<p><a href="https://opensource.posit.co/tags/ai-newsletter/index.xml" target="_blank" rel="noopener noreferrer" class="btn-shortcode inline-flex mb-5 mr-5 items-center px-4 py-3 text-sm leading-5 gap-2 rounded-lg bg-blue-400 !text-white font-semibold align-middle hover:bg-blue-500 transition no-underline">Subscribe via RSS</a></p>
<p><strong>Want the newsletter as an email?</strong> Paste the feed URL, <a href="https://opensource.posit.co/tags/ai-newsletter/index.xml" target="_blank" rel="noopener">https://opensource.posit.co/tags/ai-newsletter/index.xml</a>, into a free RSS-to-email service such as <a href="https://blogtrottr.com/" target="_blank" rel="noopener">Blogtrottr</a>, <a href="https://feedrabbit.com/" target="_blank" rel="noopener">Feedrabbit</a>, or <a href="https://follow.it/" target="_blank" rel="noopener">Follow.it</a>, and each new issue will arrive in your inbox.</p>
</div>
</div>
<style>
.blog-toc-content ul ul {
  display: none;
}
.prose img[src*="images/slides/"],
.prose video.column-page {
  border-radius: 0.25rem;
  box-shadow:
    0 1rem 2.5rem rgba(28, 45, 70, 0.14),
    0 0.2rem 0.6rem rgba(28, 45, 70, 0.1);
}
.prose img[src*="images/slides/"] {
  transition:
    box-shadow 160ms ease,
    transform 160ms ease;
}
.prose img[src*="images/slides/"]:hover,
.prose img[src*="images/slides/"]:focus-visible {
  box-shadow:
    0 1.2rem 3rem rgba(28, 45, 70, 0.2),
    0 0.25rem 0.75rem rgba(28, 45, 70, 0.14);
  transform: translateY(-2px);
}
</style>
<p>Last month, we gave a posit::conf(2026) keynote on building correct, transparent, and reproducible data agents. The talk brings together many themes from this newsletter, so this week we&rsquo;re sharing an annotated walkthrough. You can also see the full slide deck <a href="https://pos.it/keynote" target="_blank" rel="noopener">here</a>.</p>
<h2 id="correctness-vsconvenience">Correctness vs. convenience
</h2>
<p><strong>(Simon)</strong></p>
<p>This morning, your VP pulled up a coding agent and asked a reasonable question:</p>
<blockquote>
<p>How is traffic trending for our site?</p>
</blockquote>
<p>The agent looked around the workspace, found a table that seemed relevant,
wrote a SQL query against it, and returned a polished chart. Daily visits, it
said, were down 64% over the last 90 days.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/vp-site-traffic-reminder.webp" class="column-page" loading="lazy" data-fig-alt="A chat interface shows the question “how is traffic trending for our site?” The agent answers that daily visits are down 64 percent and displays a sharply declining line chart." width="1280" height="720" />
<p>The variation looks a little tight, and the bend is a little sharp. Is there
any possible reason we might see that bend other than a genuine change in site
traffic?</p>
<p>It turns out that a version of Chrome released 45 days earlier fired the
page-view event differently, so it was not aggregated correctly in the
database. As people updated Chrome, it appeared that site visits were trending
down. This was not even the table the data science team used to track site
traffic.</p>
<p>But you are not there! Your VP sees this chart and takes it to the rest of the
leadership team. They decide to restructure the organization and spend millions
of dollars to reverse the trend.</p>
<p>A month later, somebody asks, &ldquo;Could you recreate that chart? Let&rsquo;s see how
things are trending now.&rdquo; The agent cannot find it. Many coding agents delete
conversation histories after 30 days, and they often do data analysis in
temporary files so they do not clutter the project directory. The source code
for the analysis is long gone.</p>
<p>The coding agent offers to recreate the chart. It looks around the workspace,
finds a table, and runs some SQL. The number was going up the whole time.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/site-traffic-recreated.webp" class="column-page" loading="lazy" data-fig-alt="A chat interface cannot find the earlier conversation or its files. After recreating the analysis with a different warehouse table, it reports that daily visits increased 22 percent and shows an upward-trending chart." width="1280" height="720" />
<p>This is a fictional story, but we&rsquo;e seen situations like this internally
at Posit and at many of the organizations we work with. It is becoming normal
to <em>vibe-analyze</em> data: ask an agent a question, receive a plausible answer,
and move on without understanding how it was produced.</p>
<h3 id="the-tension-between-correctness-and-convenience-is-not-new">The tension between correctness and convenience is not new
</h3>
<p>Posit CTO Joe Cheng summarized the current moment this way:</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/convenience-versus-correctness.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide displays the quotation “In the battle between convenience and correctness, convenience is winning,” attributed to Joe Cheng, Posit CTO." width="1280" height="720" />
<p>AI has broadened the group of people who can convincingly do data analysis, but
many may have no idea what data scientists go through to produce a trustworthy
analysis.</p>
<p>Joe said this a month before the keynote, but he could have said it seven years
ago. In 2019, the beverage company Conviviality disclosed that <a href="https://www.accountingweb.co.uk/business/management-accounting/convivialitys-spreadsheet-hell-sinks-the-business" target="_blank" rel="noopener">a spreadsheet
arithmetic error had contributed £5.2 million to a £14 million forecasting
mistake</a>.
When that &ldquo;innocent spreadsheeting mistake&rdquo; came to light, the business sank.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/conviviality-spreadsheet-error.webp" class="column-page" loading="lazy" data-fig-alt="A news article about Conviviality reporting a spreadsheet arithmetic error that contributed 5.2 million pounds to a 14 million pound forecasting error." width="1280" height="720" />
<p>Or Joe could have said it 20 years ago, when <a href="https://www.science.org/doi/10.1126/science.314.5807.1856" target="_blank" rel="noopener">a sign error in closed-source
protein-modeling
software</a> sent a
research field down the wrong path. A lab published landmark study after
landmark study while other labs struggled to reproduce its findings. Only
after another lab found a protein structure that was nearly a mirror image of
one that the first lab had published did the first lab audit its source code.
They found a negative sign where it did not belong and retracted five papers.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/protein-modeling-software-error.webp" class="column-page" loading="lazy" data-fig-alt="A Science article titled &#39;Error prompts retractions&#39; describing a sign error in protein-modeling software." width="1280" height="720" />
<p>There were threats to correctness in data analysis long before AI. Posit&rsquo;s
stance has never been that people must sacrifice convenience for correctness.
While preparing the talk, I found this quote in a blog post old enough to
refer to itself as a &ldquo;weblog&rdquo;:</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/trustworthy-and-intuitive.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide quotes JJ Allaire: “Our goal is to develop a powerful tool that supports trustworthy, high quality analysis. At the same time, we want RStudio to be as straightforward and intuitive as possible.”" width="1280" height="720" />
<p>JJ was saying that a tool could be both correct and convenient. (By
convenient, we do not mean 7-Eleven. We mean straightforward and intuitive.😜)</p>
<p>Can we take the same stance toward AI? Is it possible to make data analysis
agents that are both correct and convenient for end users?</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/correct-and-convenient.webp" class="column-page" loading="lazy" data-fig-alt="Two overlapping circles, one blue and one orange, form a Venn diagram above the words &#39;Correct and convenient.&#39;" width="1280" height="720" />
<h2 id="why-build-ai-tools-at-all">Why build AI tools at all?
</h2>
<p><strong>(Sara)</strong></p>
<p>This pull between correctness and convenience has been on our minds throughout
the new, exciting age of LLMs. In 2025 and early 2026, AI started to feel
really, really convenient for data analysis. That made us worry about
correctness.</p>
<p>In August 2025, when we released Databot, our state-of-the-art exploratory data
analysis agent, we did so under what was essentially a warning label. The
release post was one of the first things I worked on after joining the AI team,
and it gave me the chance to do something I think I am particularly good at:
be pessimistic.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/databot-flotation-device.webp" class="column-page" loading="lazy" data-fig-alt="A split slide dated August 2025 shows an illustration of the Databot mascot wearing a bright orange flotation device." width="1280" height="720" />
<p>We were all really excited about Databot. It felt like flying through your
data, gathering insights faster than you thought would ever be possible. It was
precisely that convenience that worried us. People might trust it because they
were having so much fun, even when it was wrong. So we wrote an entire article
detailing basically every way we thought Databot might fail.</p>
<p>If you were at posit::conf(2025), you might remember Joe Cheng describing it as
both the most exciting and the most dangerous software he had worked on in his
30-year career.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/exciting-and-dangerous.webp" class="column-page" loading="lazy" data-fig-alt="A quotation from Joe Cheng says that Databot is both the most exciting software and the most dangerous software he has worked on in his 30-year career." width="1280" height="720" />
<p>That raises a fair question, one we contemplate ourselves on a weekly basis:
If AI causes all this chaos and makes all these mistakes, why are we doing
this? Why involve ourselves at all?</p>
<p>There are many answers. We&rsquo;ll focus on one.</p>
<h3 id="curiosity-and-exploration">Curiosity and exploration
</h3>
<p>Before joining the AI team, I taught data science. One thing that always
struck me was what brought people with very different backgrounds into the
field. The thing that united many of them was a sense of curiosity. Maybe they
were curious about a scientific field, computers, statistics, or how R and
Python themselves work. Data rewards that curiosity: There are datasets on
almost everything.</p>
<p>But even as an undergraduate who knew some statistics and a little R, I often
felt like I was looking at an ocean from above. The dataset was right in front of
me, and I knew there was so much going on, but I just couldn&rsquo;t see it.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/mission-ocean.webp" class="column-page" loading="lazy" data-fig-alt="An aerial photograph shows pale blue ocean water meeting a sandy shoreline, with a small dark shape visible below the surface." width="1280" height="720" />
<p>As a graduate student, I learned the tidyverse and more about data science. As
I got better at using those tools, I finally felt like I had what I needed to
ask and answer questions about my data.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/below-the-surface.webp" class="column-page" loading="lazy" data-fig-alt="A split slide pairs the words &#39;The right tools let us see below the surface&#39; with a photograph of rays swimming underwater." width="1280" height="720" />
<p>The right tools let us see below the surface. They enable that curiosity.</p>
<p>That same curiosity motivates our work now. We are curious about how these
models work, how we can build things around them to make them work better, and,
maybe most importantly, how we can turn them into tools that open new worlds of
analysis. For us, AI is a continuation of work we have always done: finding new
ways to explore data.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/ai-as-continuation.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide reads, &#39;AI is a continuation of our work to find new ways to explore data,&#39; with &#39;continuation&#39; and &#39;new ways to explore data&#39; highlighted." width="1280" height="720" />
<h3 id="the-models-got-better">The models got better
</h3>
<p>I also wanted to spend some time on what has changed since August 2025, when
we released that warning-label image. One major thing happened: The models got
better.</p>
<p>About a year before the keynote, we ran an experiment to understand how well
models interpret plots. We showed them plots based on a transformed diamonds
dataset and asked them to describe what they saw.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/bluffbench-counterintuitive-plot.webp" class="column-page" loading="lazy" data-fig-alt="A scatterplot shows diamond price decreasing as carat increases. An overlaid model response incorrectly says there is a strong positive relationship, followed by the question of whether models can interpret plots that contradict their expectations." width="1280" height="720" />
<p>The models gave answers like, &ldquo;There is a strong positive relationship between
carat and price.&rdquo; That sounds plausible until you look at the plot, which shows
the opposite. Behind the scenes, we had manipulated the data to reverse a
canonical relationship, so larger diamonds were, unintuitively, less expensive.</p>
<p>We wanted to know whether the models could see what was in front of them and
interpret plots that contradicted their expectations. A year ago, the answer
was largely no.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/bluffbench-november-2025.webp" class="column-page" loading="lazy" data-fig-alt="A horizontal stacked bar chart titled “Models often report what they expect to see, not what’s plotted.” GPT-5, Gemini Pro 2.5, and Claude Sonnet 4.5 are mostly marked incorrect." width="1280" height="720" />
<p>In November 2025, even the best models of the time were abysmal at this task.
They said what they expected to see instead of paying attention to what was
actually happening in the plot.</p>
<p>We tried all sorts of interventions to improve the
<a href="https://posit-dev.github.io/bluffbench/" target="_blank" rel="noopener">bluffbench</a> scores, and absolutely
nothing worked. Then we waited six months.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/bluffbench-september-2026.webp" class="column-page" loading="lazy" data-fig-alt="A horizontal stacked bar chart titled “Models got better at interpreting counterintuitive plots.” Recent thinking models have much larger correct segments than models evaluated in 2025." width="1280" height="720" />
<p>By May 2026, the major AI companies were releasing models that
were noticeably better at the task. By September, the numbers had jumped dramatically:
The models could interpret these counterintuitive plots.</p>
<p>The models got better. That does not mean data science is solved.</p>
<h3 id="models-still-make-mistakes">Models still make mistakes
</h3>
<p>After that experiment, we asked another question: Can models identify
data-quality issues in visualizations? In
<a href="https://github.com/posit-dev/bluffbench2" target="_blank" rel="noopener">bluffbench2</a>, we again showed them
plots and asked what they saw.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/bluffbench2-data-artifact.webp" class="column-page" loading="lazy" data-fig-alt="A scatterplot of sleep hours against stress score has an overall negative trend. Within the cloud, a suspicious subset of points falls exactly along a straight line." width="1280" height="720" />
<p>If you look carefully, there&rsquo;s a suspiciously straight line through the cloud
of points. If we really cared about this data, that&rsquo;s something to investigate: Did something weird happen when the data was
created? We wanted to know whether models would do the same.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/bluffbench2-results.webp" class="column-page" loading="lazy" data-fig-alt="A horizontal bar chart titled “Frontier models still struggle to notice subtle data quality issues.” Every evaluated model scores below 50 percent." width="1280" height="720" />
<p>It turns out they don&rsquo;t really. Even the leading models were not very good at
this task. They struggle to notice subtle data-quality issues.</p>
<p>But there&rsquo;s another problem. Data analysis is not just you, plus a good model,
plus your data. It also depends on context that is not necessarily in your CSV
file, warehouse table, or JSON file.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/context-outside-the-data.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide reads, &#39;Data analysis depends on context that is not in the data,&#39; with the word &#39;context&#39; highlighted." width="1280" height="720" />
<p>All data is constructed. It all has context. That context
might live in a data dictionary, a Markdown file, or a semantic view. Maybe it
just lives in the head of a coworker who has been at the organization for 15
years, knows absolutely everything, and has never written a single thing down.</p>
<p>That context is not inherently inaccessible to models. We could give it to
them. But it has to be in the right format, it has to be curated, and it has to
itself be correct.</p>
<p>So the models have gotten better, but data analysis with AI is not solved. The
question then becomes: How do we make AI-involved analysis correct?</p>
<h2 id="how-do-we-make-ai-for-data-analysis-trustworthy">How do we make AI for data analysis trustworthy?
</h2>
<p><strong>(Sara)</strong></p>
<p>Here&rsquo;s a common thought about AI: It&rsquo;s untrustworthy, but useful. To make it
trustworthy, we need to add in a person.</p>
<p>Here&rsquo;s a simple version of what that might look like. The agent or model does stuff, probably writes a bunch of code. A person then looks at that code and verifies, approves, or
redirects as needed. That feeds back into the agent. This intuitively can feel really appealing. The agent gets to do what it&rsquo;s
good at, the person does what they&rsquo;re good at, and there&rsquo;s an expert there to keep everything
from going off the rails.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/human-in-the-loop.webp" class="column-page" loading="lazy" data-fig-alt="A diagram presents a common division of labor in which an AI system produces work and a human verifies or supervises it." width="1280" height="720" />
<p>And so it&rsquo;s kind of tempting to apply this pattern everywhere. Any time the agent might make
a mistake, we have a person there to clean it up and make sure nothing bad
happens. We call this relatively simplistic view the <em>slap a human on it</em>
approach.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/slap-a-human-on-it.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide shows a roll of black repair tape, used as a metaphor for attaching a human reviewer to an AI system without designing the interaction." width="1280" height="720" />
<p>In this approach, you don&rsquo;t really think very much about what the person will actually do. How will
they apply their expertise? What is the purpose of their involvement? How will
we keep them from technically being in the loop but without actually applying
their expertise?</p>
<p>I&rsquo;m being a bit facetious, but this isn&rsquo;t that far from how we wrote risk mitigation with Databot a year earlier. We said that
Databot and LLMs were not at a point where users could abdicate responsibility.
You still needed all of your data skills to catch errors, interpret results in
context, and avoid being misled by confident but incorrect claims.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/user-responsibility.webp" class="column-page" loading="lazy" data-fig-alt="A quotation over a beach image says that people cannot abdicate responsibility or suspend skepticism when working with LLMs and that their expertise helps them catch errors and avoid confident but incorrect claims." width="1280" height="720" />
<p>And all of that is still true! But
we never said <em>how</em> this was supposed to happen. We assumed that if an expert
was there, they would catch the mistakes.</p>
<p>But just adding a person doesn&rsquo;t really guarantee a better result. Human&ndash;AI combinations do
not reliably outperform the better of the human or AI working
alone.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/human-ai-evidence.webp" class="column-page" loading="lazy" data-fig-alt="A slide reads, &#39;Adding a human does not guarantee a better result,&#39; followed by points about human-AI performance, approval fatigue, trust, timing, cognitive load, social cues, and information design." width="1280" height="720" />
<p>People also get tired of approving requests, and then they stop reading them.
Think about the last time your coding agent showed you a command to approve.
Did you carefully read it, or did you hit approve as quickly as possible and
feel annoyed that it even bothered to ask?</p>
<p>Human decision-making is not fixed. How much you trust the system, how much you
trust the people who built it, the timing of the information, your cognitive
load, and how much your coworkers trust the agent can all influence the
decision you make. Even if you are an expert who makes the right decision
outside an interaction with an agent, adding the agent might change that
decision.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/people-are-not-fixed.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide reads, &#39;People are not fixed safety components,&#39; with the final phrase highlighted." width="1280" height="720" />
<p>So how do we design the entire system to produce correct work? How do we build
trust and correctness into the agent itself, and design interactions with
users that actually support their expertise?</p>
<p>That maps onto two principles we returned to throughout the talk:</p>
<ol>
<li>Help the agent be correct.</li>
<li>Make it less bad when the agent is wrong.</li>
</ol>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/agent-correctness-goals.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide reads, &#39;Help the agent be correct&#39; and &#39;Make it less bad when the agent is wrong.&#39;" width="1280" height="720" />
<h2 id="posit-assistant">Posit Assistant
</h2>
<p><strong>(Simon)</strong></p>
<p><a href="https://pos.it/assistant" target="_blank" rel="noopener">Posit Assistant</a> is Posit&rsquo;s coding and data science
agent. It is available in RStudio, Positron, and the terminal. When it is
running inside an IDE, it works in the same R or Python session you&rsquo;re using.
You can use whatever model you want from whatever provider you have access to.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/posit-assistant.webp" class="column-page" loading="lazy" data-fig-alt="A blue slide displays the Posit Assistant wordmark and orange circular logo." width="1280" height="720" />
<p>For the demo, I returned to one of my first experiences of seeing below the
surface with data science. In an introductory statistics class, I analyzed
flight data to understand whether I could book tickets that were less likely
to be delayed. I used ggplot2 and dplyr, pushing data frames around and
visualizing them.</p>
<p>I asked Posit Assistant to find an R package with Houston flight data and
retrieve data from the previous year. It found <code>anyflights</code>, read its
documentation, and generated the correct call.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="Posit Assistant searches for an R package that provides data about flights from Houston.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/posit-assistant-web-fetch.mp4" type="video/mp4">
</video>
<p>Next, I asked it to grab data from the same time the previous year. The agent read the package documentation and so was able to write the code with the right arguments the first time.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="Posit Assistant reads the anyflights package documentation and writes code to retrieve Houston flight data.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/posit-assistant-docs.mp4" type="video/mp4">
</video>
<p>We have seen that many coding agents have a superficial relationship with data quality, and we wondered whether we could do better. Posit
Assistant proactively recommends cleaning the data and has a dedicated data-cleaning mode. It runs scratch code to look for
missing values, outliers, and similar issues. Once it finds them, it surfaces questions to the user in an interactive dialog.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="Posit Assistant enters data-cleaning mode, asks the user about missing values and outliers, and records the decisions in a persistent cleaning script.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/posit-assistant-clean-data.mp4" type="video/mp4">
</video>
<p>In the demo, the agent found missing values in a relevant column, then found some flights with departure delays of multiple days. I chose to keep both:
Those outliers represented what really happened.</p>
<p>At the end of cleaning mode, the agent wrote a persistent file in the project
directory to ingest and clean the data. When someone revisits the analysis,
they can reproduce those steps.</p>
<p>Posit Assistant also shows plots inside the conversation. It is nice to be able to see them, but we
also think it is necessary: Our evaluations show that agents cannot reliably
interpret plots. When one carrier appeared unusually delayed, it checked the sample size
and found only 32 flights, suggesting that we should not read too much into the
pattern.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="Posit Assistant plots departure delays by carrier, checks the sample size behind an apparent anomaly, and finds that the carrier has only 32 flights.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/posit-assistant-carriers.mp4" type="video/mp4">
</video>
<p>Once the analysis was complete, I asked the agent to turn it into a persistent
Quarto report.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="Posit Assistant uses a specialized skill to turn the flight-delay analysis into a persistent Quarto report.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/posit-assistant-report.mp4" type="video/mp4">
</video>
<p>I have one more &ldquo;little zoomy zoom&rdquo;: The entire conversation cost five cents.
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="The Posit Assistant conversation displays the selected GLM 5.3 Flash model, token usage, and a total cost of five cents."><source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/posit-assistant-model-cost.mp4" type="video/mp4"></video></p>
<p>Part of our mission at Posit is to provide tools to people regardless of their
economic means.</p>
<p>Posit Assistant is designed to be
token-efficient and can use capable, inexpensive open-weight models such as GLM
5.3 Flash through Posit AI Pass. We spend a lot of time
watching the open-weights model space for models on the Pareto frontier:
capable of data analysis and orders of magnitude cheaper than frontier models.</p>
<p>Returning to the two principles, part of helping the agent be correct is, quite
literally, asking nicely. We say, &ldquo;Pretty please pay attention to data
cleanliness. Pretty please be open to uncertainty when carrying out data
analysis.&rdquo;</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/posit-assistant-correctness.webp" class="column-page" loading="lazy" data-fig-alt="A slide says to help the agent be correct by encouraging sound statistics and reproducibility practices, and make errors less bad by using the user&#39;s expertise and sharing an R or Python environment." width="1280" height="720" />
<p>We also design interactions around the user&rsquo;s expertise: Cleaning mode asks
about the data-generating process, plots remain visible, and the user shares
the agent&rsquo;s R or Python session.</p>
<p>Posit Assistant assumes that the user is a data scientist, analyst, or someone
else who writes code and wants to work in an IDE, close to that code. But what
if the user is not a data scientist? How do we help them get correct answers,
too?</p>
<h2 id="introducing-commons">Introducing commons
</h2>
<p><strong>(Sara)</strong></p>
<p>Let&rsquo;s return to our vibe-analyzing VP. I think it&rsquo;s easy to say, &ldquo;They just
shouldn&rsquo;t be doing this kind of analysis.&rdquo; But let&rsquo;s be on their side for a
moment. They had a question, they wanted it answered, and so they&rsquo;re going to
reach for a tool that gives them an answer.</p>
<p>The problem is that they reached for the wrong tool and it gave them the wrong answer.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/vp-site-traffic-reminder.webp" class="column-page" loading="lazy" data-fig-alt="A chat interface shows the VP asking how traffic is trending for the site. The agent reports that daily visits are down 64 percent and displays a sharply declining line chart." width="1280" height="720" />
<p>The data team already has vetted, maintained code that computes site traffic
correctly. We call this <em>trusted code</em>. Trusted code might live in a package, Shiny app,
Quarto document, report, or dashboard.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/trusted-code.webp" class="column-page" loading="lazy" data-fig-alt="A cream-colored slide displays the words &#39;Trusted code,&#39; with &#39;Trusted&#39; highlighted in orange." width="1280" height="720" />
<p>Instead of having the model write bespoke code from scratch every time someone
asks a question, what if it could use that trusted code?</p>
<p>This is one of the core ideas behind a new open-source package that we&rsquo;re
excited to share with you all today. It&rsquo;s called commons.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/commons.webp" class="column-page" loading="lazy" data-fig-alt="A blue slide displays the orange commons bird logo and a link to pos.it/commons." width="1280" height="720" />
<p><a href="https://pos.it/commons" target="_blank" rel="noopener">commons</a> helps data scientists build trustworthy data
agents for their collaborators. It is an open-source R and Python package built
on the ellmer, chatlas, and shinychat stack.</p>
<p><strong>(Simon)</strong></p>
<p>Here is how the VP&rsquo;s analysis works with a commons agent. When the VP asks,
&ldquo;How is traffic trending for our site?&rdquo; the first thing the agent does is
search for a trusted calculation. If it finds one that answers the question,
it invokes that calculation directly.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="A commons agent answers a site-traffic question by running a trusted calculation, displaying a chart showing a 22 percent increase, and marking the answer with a green shield.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/commons-traffic-trend.mp4" type="video/mp4">
</video>
<p>The calculation returns a plot and a green shield indicating that the answer
came from a trusted calculation. commons adds that marker deterministically;
the agent itself does not control it.</p>
<p>What makes coding agents so convenient is that they are everything tools. They
will write their own R, Python, or SQL code to answer a question. Trusted
calculations cannot cover every question, so commons has a fallback path.</p>
<p>When no trusted calculation exists, the agent can use context authored by the
data team. commons verifies any citation against that context before displaying
its blue citation marker.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="A commons agent charts declining page views, uses trusted context to explain the instrumentation change behind the decline, and displays a blue citation marker.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/commons-page-views.mp4" type="video/mp4">
</video>
<p>If there is neither a trusted calculation nor supporting context to cite, the agent
can write code, but commons displays a yellow warning so the user knows to treat
the answer cautiously.</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="A commons agent writes custom code to find the day with the most site visits, then marks the answer with a yellow warning because it did not use a trusted calculation or cite trusted context.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/commons-most-visits.mp4" type="video/mp4">
</video>
<p>Here&rsquo;s a diagram of the various ways the agent can come up with answers and how the trust relationships are mapped.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/commons-trust-flow.webp" class="column-page" loading="lazy" data-fig-alt="A flow diagram shows commons first searching trusted calculations. A found calculation leads to a verified marker. Otherwise the agent searches context and writes SQL, R, or Python, leading to either a citation marker or a lower-trust warning." width="1280" height="720" />
<p>So far, we&rsquo;ve been talking about the VP&rsquo;s experience with the commons agent. What is it like to work with
commons as a data scientist? There are three main loops: build, deploy, and improve.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/commons-lifecycle.webp" class="column-page" loading="lazy" data-fig-alt="Three cards describe the commons lifecycle: build by connecting the agent to trusted code, deploy it for colleagues on Connect, and improve it by reviewing behavior and covering common use cases." width="1280" height="720" />
<p>With data collection enabled, data scientists can review cases where the agent
had to write its own code. If those cases share a pattern, they can add trusted
code that moves future responses up the trust ladder, making the agent more
correct over time.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/commons-correctness.webp" class="column-page" loading="lazy" data-fig-alt="A slide says to help the agent be correct with trusted calculations and context, and make errors less bad by signaling trust and introducing feedback loops." width="1280" height="720" />
<p>Returning to our two principles, commons helps the agent be correct by letting
it directly use trusted code. It makes mistakes less bad by telling the user
when the agent did not directly use trusted code, and by moving responses up
the trust ladder over time.</p>
<h3 id="other-use-cases-for-commons">Other use-cases for commons
</h3>
<p><strong>(Sara)</strong></p>
<p>The VP example is business intelligence, but commons is not only for BI or
vice presidents. It&rsquo;s for any data person who wants to build an agent that
gives correct answers to their collaborators.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/commons-examples.webp" class="column-page" loading="lazy" data-fig-alt="A table pairs a biostatistician with a physician comparing treatment groups, a UX researcher with a product manager summarizing experiment results, and a policy analyst with a program lead simulating a policy&#39;s budget impact." width="1280" height="720" />
<p>We&rsquo;ve made a sample <a href="https://pos.it/clinical-trials-agent" target="_blank" rel="noopener">clinical trials
agent</a> to highlight this functionality.
Its data is simulated. The trusted code is a TLG catalog: code written and
trusted by data people to work on this type of data and produce correct
answers. You can ask it questions such as, &ldquo;Plot Kaplan&ndash;Meier curves.&rdquo;</p>
<video class="column-page" loop muted playsinline controls preload="metadata" aria-label="A clinical trials agent runs a trusted calculation for the safety population and produces a Kaplan–Meier plot of serious adverse-event-free probability.">
<source src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/videos/clinical-trials-agent-demo.mp4" type="video/mp4">
</video>
<h2 id="it-is-still-very-bad-to-be-wrong">It is still very bad to be wrong
</h2>
<p><strong>(Sara)</strong></p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/conclusion.webp" class="column-page" loading="lazy" data-fig-alt="A blue slide reads “It’s (still) very bad to be wrong” in large cream-colored text." width="1280" height="720" />
<p>It&rsquo;s now so easy to ask any kind of agent a question about your data and get a
wrong answer that looks completely plausible.</p>
<p>The problem is not just that the answer is wrong, and it&rsquo;s also not just that you might be unable to reproduce it or have no
idea how it arrived at the answer.</p>
<p>These are bad enough, but there&rsquo;s another problem. If we become accustomed to, say, 15% of our numbers
being wrong, we might lose trust in analysis itself and its ability to tell us things about the world, or become used to numbers just being a bit wrong all the time.</p>
<p>But correctness matters, especially in particular industries, and Posit has always
built tools to support correct analysis. We do not think that standard should
change just because AI is here.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/conclusion-infrastructure.webp" class="column-page" loading="lazy" data-fig-alt="A blue slide reads, &#39;AI has expanded who can get answers from data. That changes the infrastructure we need for correct, transparent, and reproducible analysis.&#39;" width="1280" height="720" />
<p>But AI has expanded who can get answers from data. Now anyone can ask a
question about their data. That changes how we need to think about the
infrastructure for building correct, transparent, and reproducible agents.</p>
<p>With commons, a data team establishes which code and calculations it trusts
and provides the organizational context the agent needs. The team can give that
agent to someone who might otherwise perform a vibe analysis. That person keeps
the convenience of asking questions in natural language, while the answers are
grounded in the data team&rsquo;s trusted work and can be traced and reproduced.</p>
<p>That is where data scientists and analysts come in. This infrastructure must be
built by people who understand the data, calculations, and organization.
commons helps them build it and make it available to others.</p>
<h2 id="looking-forward">Looking forward
</h2>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/canvas.webp" class="column-page" loading="lazy" data-fig-alt="A Canvas application displays a polished data-analysis workspace with an agent conversation, visual results, and interactive controls arranged across a large visual canvas." width="1280" height="720" />
<p>Looking forward, we have been experimenting with something called Canvas.</p>
<p>Canvas is a next-generation agent experience. It assumes that you might not
always want to look at the code. That does not mean the code is not there when
you need it, but you might not always want to work in an IDE.</p>
<p>This frees up real estate for expansive, new agent-collaboration interfaces.
Canvas feels a little aggressively agentic to us, in the way Databot felt a
year ago.</p>
<img src="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/slides/thank-you.webp" class="column-page" loading="lazy" data-fig-alt="A green slide says &#39;Thank you!&#39; above resource cards linking to the keynote slides, commons, and the AI Newsletter." width="1280" height="720" />
<h3 id="recent-past-newsletters">Recent past newsletters
</h3>
<ul>
<li><a href="https://opensource.posit.co/blog/2026-09-18_ai-newsletter">New releases from ellmer, shinychat, and commons</a></li>
<li><a href="https://opensource.posit.co/blog/2026-09-04_ai-newsletter">You probably don&rsquo;t want to fine-tune</a></li>
</ul>
<p><a href="https://opensource.posit.co/tags/ai-newsletter/index.xml" target="_blank" rel="noopener noreferrer" class="btn-shortcode inline-flex mb-5 mr-5 items-center px-4 py-3 text-sm leading-5 gap-2 rounded-lg bg-blue-400 !text-white font-semibold align-middle hover:bg-blue-500 transition no-underline">Subscribe via RSS</a></p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-09_ai-newsletter/images/hero.webp" length="15396" type="image/webp" />
    </item>
    <item>
      <title>rig 0.11.0 part one: R installations</title>
      <link>https://opensource.posit.co/blog/2026-10-09_rig-0-11-0-part-one/</link>
      <pubDate>Fri, 09 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-09_rig-0-11-0-part-one/</guid>
      <dc:creator>Gábor Csárdi</dc:creator><description><![CDATA[<!--
TODO:
- [x] Add image (1920×1080 PNG or JPG) and image-alt
- [x] Trim topics, software, and languages to only what applies
- [x] Open a PR against main for a Netlify preview
-->
<style>
.prose pre {
  font-size: 0.65em;
}
</style>
<p>We are thrilled to announce rig 0.11.0 (and 0.10.0), with lots of new
functionalities: user mode R installations, R package and project management
and much more. This is the first of three blog posts about the new rig
release. This post is about managing R installations and the new user mode.
The <a href="https://opensource.posit.co/blog/2026-10-12_rig-0-11-0-part-two/">second post</a> shows how rig can help with <a href="https://rig.r-lib.org/pkg-guide.html" target="_blank" rel="noopener">managing R packages</a>, and the <a href="https://opensource.posit.co/blog/2026-10-15_rig-0-11-0-part-three/">third</a> focuses on
<a href="https://rig.r-lib.org/proj-guide.html" target="_blank" rel="noopener">project management</a>.</p>
<p><a href="https://rig.r-lib.org/news.html" target="_blank" rel="noopener">Full changelog on the rig web site</a>.</p>
<h2 id="new-web-site">New Web Site
</h2>
<p>rig has a new web site at <a href="https://rig.r-lib.org" target="_blank" rel="noopener">https://rig.r-lib.org</a>! See this web site for
installation instructions, including the new user mode install; reference
documentation (also in <code>rig help</code>!), guides about larger topics and
tutorials to get started.</p>
<figure>
<a href="https://rig.r-lib.org"><img src="https://opensource.posit.co/blog/2026-10-09_rig-0-11-0-part-one/rig-website.png" /></a>
<figcaption>The home page of the new rig web site, with a sidebar listing tutorials, guides and reference pages, and a quick start section.</figcaption>
</figure>
<h2 id="user-mode-r-installations">User Mode R Installations
</h2>
<p>rig can now install and manage R installations without
requiring administrative privileges. rig calls this <em>user mode</em>. In user
mode, R installations are installed in the user&rsquo;s home directory rather
than system-wide. System-wide installations are still the default currently,
and they are called <em>admin mode</em>.</p>
<p>You may have both user mode and admin mode installations on one computer,
but each rig command runs in either user mode or admin mode. The default is
admin mode. See below for how to change it. Use <code>--admin</code> or <code>--user</code> to
pick the mode for a single command, e.g. <code>rig ls --admin</code> always lists
admin mode installations, and <code>rig ls --user</code> always lists user mode ones.</p>
<p>Advantages of using user mode:</p>
<ul>
<li><strong>No admin</strong>: no need for administrative privileges.</li>
<li><strong>All Linux</strong>: works on all glibc (from glibc 2.34) and musl (from musl
1.2) based Linux systems.</li>
<li><strong>Multiple patch versions</strong>: on macOS you can install multiple patch
versions side by side.</li>
<li><strong>Convenience</strong>: no need to use <code>sudo</code> or an admin account to install and
manage R.</li>
</ul>
<p>User mode is quite new, though. It is much less tested than admin mode,
and you may encounter bugs or unexpected behavior more frequently. On Linux,
the generic distro-agnostic builds may be slower for numerical work than
builds specifically compiled for the distribution.</p>
<p>User mode (admin mode as well, actually) is slightly different on each
operating system. Here is a table about where rig stores its files on each
OS in both modes.</p>
<table>
  <thead>
      <tr>
          <th>Platform</th>
          <th>Mode</th>
          <th>R install root</th>
          <th>Binary directory (<code>R</code>, <code>Rscript</code>, <code>R-*</code>)</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>macOS</td>
          <td>admin</td>
          <td><code>/Library/Frameworks/R.framework</code></td>
          <td><code>/usr/local/bin</code></td>
      </tr>
      <tr>
          <td>macOS</td>
          <td>user</td>
          <td><code>~/.local/share/rig/r</code></td>
          <td><code>~/.local/bin</code></td>
      </tr>
      <tr>
          <td>Linux</td>
          <td>admin</td>
          <td><code>/opt/R</code></td>
          <td><code>/usr/local/bin</code></td>
      </tr>
      <tr>
          <td>Linux</td>
          <td>user</td>
          <td><code>~/.local/share/rig/r</code></td>
          <td><code>~/.local/bin</code></td>
      </tr>
      <tr>
          <td>Windows</td>
          <td>admin</td>
          <td><code>C:\Program Files\R</code></td>
          <td><code>C:\Program Files\R\bin</code></td>
      </tr>
      <tr>
          <td>Windows</td>
          <td>user</td>
          <td><code>%APPDATA%\rig\data\r</code></td>
          <td><code>%USERPROFILE%\.local\bin</code></td>
      </tr>
  </tbody>
</table>
<p>You can call the new <code>rig system dirs</code> command to see where rig stores its
various files:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig system dirs
</span></span><span class="line"><span class="cl">Mode                  user
</span></span><span class="line"><span class="cl">Architecture          arm64
</span></span><span class="line"><span class="cl">R root                /Users/gaborcsardi/.local/share/rig/r
</span></span><span class="line"><span class="cl">Binary dir            /Users/gaborcsardi/.local/bin
</span></span><span class="line"><span class="cl">Config file           /Users/gaborcsardi/Library/Application Support/com.gaborcsardi.rig/config.json
</span></span><span class="line"><span class="cl">Data dir              /Users/gaborcsardi/Library/Application Support/com.gaborcsardi.rig
</span></span><span class="line"><span class="cl">Cache dir             /Users/gaborcsardi/Library/Caches/com.gaborcsardi.rig
</span></span><span class="line"><span class="cl">Download dir          /var/folders/h9/6ct_py4s319fxt88dxn506l00000gp/T/rig-502
</span></span><span class="line"><span class="cl">Logs dir              /Users/gaborcsardi/Library/Logs/com.gaborcsardi.rig
</span></span><span class="line"><span class="cl">Project library root  (in-project, .rvenv/lib)</span></span></code></pre></div></div>
<p>The same in admin mode:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig system dirs --admin
</span></span><span class="line"><span class="cl">Mode                  admin
</span></span><span class="line"><span class="cl">Architecture          arm64
</span></span><span class="line"><span class="cl">R root                /Library/Frameworks/R.framework/Versions
</span></span><span class="line"><span class="cl">Binary dir            /usr/local/bin
</span></span><span class="line"><span class="cl">Config file           /Users/gaborcsardi/Library/Application Support/com.gaborcsardi.rig/config.json
</span></span><span class="line"><span class="cl">Data dir              /Users/gaborcsardi/Library/Application Support/com.gaborcsardi.rig
</span></span><span class="line"><span class="cl">Cache dir             /Users/gaborcsardi/Library/Caches/com.gaborcsardi.rig
</span></span><span class="line"><span class="cl">Download dir          /var/folders/h9/6ct_py4s319fxt88dxn506l00000gp/T/rig-502
</span></span><span class="line"><span class="cl">Logs dir              /Users/gaborcsardi/Library/Logs/com.gaborcsardi.rig
</span></span><span class="line"><span class="cl">Project library root  (in-project, .rvenv/lib)</span></span></code></pre></div></div>
<h3 id="macos">macOS
</h3>
<p>On arm64 macOS rig can install both arm64 and x86_64 builds of R. The latter
ones need Rosetta to run. User mode has a different, simpler naming scheme
than admin mode on macOS, matching Linux and Windows. This is an example
list of user mode R installations:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig ls
</span></span><span class="line"><span class="cl">* name          version    aliases
</span></span><span class="line"><span class="cl">------------------------------------------
</span></span><span class="line"><span class="cl">  3.6.3-x86_64  (R 3.6.3)
</span></span><span class="line"><span class="cl">  4.0.5-x86_64  (R 4.0.5)
</span></span><span class="line"><span class="cl">  4.1.3
</span></span><span class="line"><span class="cl">  4.1.3-x86_64  (R 4.1.3)
</span></span><span class="line"><span class="cl">  4.2.3
</span></span><span class="line"><span class="cl">  4.3.3
</span></span><span class="line"><span class="cl">  4.4.3
</span></span><span class="line"><span class="cl">  4.5.3                    oldrel
</span></span><span class="line"><span class="cl">  4.5.3-x86_64  (R 4.5.3)  oldrel-x86_64
</span></span><span class="line"><span class="cl">  4.6.0
</span></span><span class="line"><span class="cl">* 4.6.1                    release
</span></span><span class="line"><span class="cl">  4.6.1-x86_64  (R 4.6.1)  release-x86_64
</span></span><span class="line"><span class="cl">  devel         (R 4.7.0)
</span></span><span class="line"><span class="cl">  devel-x86_64  (R 4.7.0)
</span></span><span class="line"><span class="cl">  next          (R 4.6.1)
</span></span><span class="line"><span class="cl">  next-x86_64   (R 4.6.1)</span></span></code></pre></div></div>
<ul>
<li>The native (arm64) builds are named simply with the version number.</li>
<li>R-devel is simply named <code>devel</code> and the next version of R (R-patched,
R-alpha, etc.) is named <code>next</code>.</li>
<li>The x86_64 builds are suffixed with <code>-x86_64</code>.</li>
<li>You can use the <code>release</code> alias for the most recent version of R and
the <code>oldrel</code> alias for the previous minor release branch. E.g. the
<code>R-release</code> quick link starts the latest version of R.</li>
</ul>
<h3 id="windows">Windows
</h3>
<p>On Windows rig installs CRAN&rsquo;s R builds as a regular user in user mode.
This installation writes the user&rsquo;s registry settings instead of the
system-wide registry settings.</p>
<p>The names of the R installations are the same as for admin mode. rig now
supports installing x86_64 and aarch64 R builds on aarch64 Windows, and
similarly to macOS, the non-native builds get a <code>-x86_64</code> suffix:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">PS C:\Users\Gabor Csardi&gt; rig ls
</span></span><span class="line"><span class="cl">* name          version    aliases
</span></span><span class="line"><span class="cl">------------------------------------------
</span></span><span class="line"><span class="cl">  4.4.3
</span></span><span class="line"><span class="cl">  4.4.3-x86_64  (R 4.4.3)
</span></span><span class="line"><span class="cl">  4.5.3
</span></span><span class="line"><span class="cl">* 4.6.1                    release
</span></span><span class="line"><span class="cl">  devel         (R 4.7.0)
</span></span><span class="line"><span class="cl">  next          (R 4.6.1)</span></span></code></pre></div></div>
<p>The new <code>rig rtools</code> command lets you manage Rtools installations. In user
mode they are installed into the user&rsquo;s roaming profile directory, and rig
configures R and Rtools to work together correctly. On aarch64 Windows,
you can install both x86_64 and aarch64 versions of Rtools.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">PS C:\Users\Gabor Csardi&gt; rig rtools ls
</span></span><span class="line"><span class="cl">name  version  full-version   arch     path
</span></span><span class="line"><span class="cl">------------------------------------------------------
</span></span><span class="line"><span class="cl">40    4.0      4.0.3.0        x86_64   C:\Users\Gabor Csardi\AppData\Roaming\rig\data\rtools\40-x86_64
</span></span><span class="line"><span class="cl">44    4.4      4.4.6459.6401  aarch64  C:\Users\Gabor Csardi\AppData\Roaming\rig\data\rtools\44
</span></span><span class="line"><span class="cl">45    4.5      4.5.6768.6492  aarch64  C:\Users\Gabor Csardi\AppData\Roaming\rig\data\rtools\45</span></span></code></pre></div></div>
<h3 id="linux">Linux
</h3>
<p>On Linux rig installs a <a href="https://github.com/rstudio/r-builds#portable-builds-experimental" target="_blank" rel="noopener">portable (manylinux) R build</a> in user
mode. These builds are self-contained, generic glibc (or musl) builds of R.
These builds are intended to work on a wide range of Linux distributions.
However, they are not as battle-tested as the builds rig uses in admin mode.</p>
<p>On glibc systems rig also configures the <a href="https://posit.co/blog/introducing-portable-linux-r-binary-packages" target="_blank" rel="noopener">manylinux repository</a>
for CRAN, that pairs very well with the portable R builds. These packages
are self-contained and compatible with most glibc-based Linux distributions:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="o">&gt;</span> <span class="nf">getOption</span><span class="p">(</span><span class="s">&#34;repos&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">                                                         <span class="n">P3M</span><span class="o">-</span><span class="n">manylinux</span>
</span></span><span class="line"><span class="cl"><span class="s">&#34;https://packagemanager.posit.co/cran/__linux__/manylinux_2_28/latest&#34;</span>
</span></span><span class="line"><span class="cl">                                                                  <span class="n">CRAN</span>
</span></span><span class="line"><span class="cl">                                         <span class="s">&#34;https://cloud.r-project.org&#34;</span></span></span></code></pre></div></div>
<h3 id="positron-and-rstudio-configuration">Positron and RStudio configuration
</h3>
<p>rig automatically configures RStudio (when running <code>rig add</code> and
<code>rig default</code>), so that the rig-default R version is also the default in
RStudio. On macOS and Windows this is automatic. On Linux rig puts the rig
binary directory (see the table above) on the PATH in user mode, and it
is generally on the PATH in admin mode. This is enough to ensure that the
rig-default R version is also the default in RStudio on Linux.</p>
<p>Positron does not have a generic default R version like RStudio does, but
you can choose a default for each workspace. rig (in <code>rig add</code>
and <code>rig default</code>) updates your Positron configuration (the current user&rsquo;s
config file) to make sure that Positron finds all user-mode R installations.</p>
<h3 id="switching-to-user-mode">Switching to user mode
</h3>
<p>Call <code>rig system user-mode</code> to switch a previous setup from admin mode to
user mode. This will reinstall your current R installations in user mode,
and remove the admin mode installation. (But see its options to adjust this!)</p>
<p>See more about the migration at the <a href="https://rig.r-lib.org/tutorial-migrate.html" target="_blank" rel="noopener">rig homepage</a>.</p>
<h2 id="portable-linux">Portable Linux
</h2>
<p>Above you have seen how rig installs portable manylinux builds in user mode.
It is also possible to install them in admin mode. This can be useful for
Linux systems that rig does not have native builds for. To install a
portable Linux build use <code>--platform portable</code>:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rig add --platform portable 4.6</span></span></code></pre></div></div>
<p>Moreover, if rig does not support a Linux distribution natively, it will
install the manylinux (or musllinux) builds instead, assuming that they
are supported, even in admin mode. With this, most Linux distributions
work automatically, in both admin and user modes.</p>
<h2 id="repository-management">Repository management
</h2>
<p>The rig release improved the <code>rig repos</code> subcommand substantially. These
are the biggest changes.</p>
<h3 id="p3m-by-default">P3M by default
</h3>
<p>rig now configures Posit Public Package Manager (P3M) as a default
repository, on all platforms except aarch64 Windows. (Because P3M would
serve incompatible x86_64 binaries here.) This is because we found
P3M more reliable and because P3M includes older package versions and has
more extensive metadata.</p>
<p>Nevertheless you can opt out with <code>rig add --without-repos=p3m ...</code> at
installation time, or with <code>rig repos setup --without-repos=p3m</code> at any
time.</p>
<h3 id="custom-repositories">Custom repositories
</h3>
<p>You can now add custom repositories to your rig configuration using
<code>rig repos add &lt;name&gt; &lt;url&gt;</code>. For example:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-sh" data-lang="sh"><span class="line"><span class="cl">rig repos add myrepo https://myrepo.example.com</span></span></code></pre></div></div>
<p>You can then turn these (and also the built-in) repositories on or off
using <code>rig repos enable</code> and <code>rig repos disable</code>.</p>
<h3 id="improved-repository-list">Improved repository list
</h3>
<p>The output of <code>rig repos available</code> is now more informative and easier to
read. Type <code>rig repos available &lt;reponame&gt;</code> to get more information about a
repository.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig repos available
</span></span><span class="line"><span class="cl">8 repositories
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Name              Default   Type       Title
</span></span><span class="line"><span class="cl">-----------------------------------------------------------------------------
</span></span><span class="line"><span class="cl">P3M               depends   built-in   Posit Public Package Manager
</span></span><span class="line"><span class="cl">P3M-manylinux     depends   built-in   Posit Package Manager manylinux portable packages
</span></span><span class="line"><span class="cl">RHUB              no        built-in   R-Hub repositories
</span></span><span class="line"><span class="cl">r-universe/cran   depends   built-in   R-universe CRAN mirror
</span></span><span class="line"><span class="cl">r-universe/bioc   no        built-in   R-universe Bioconductor mirror
</span></span><span class="line"><span class="cl">CRAN              yes       built-in   The Comprehensive R Archive Network
</span></span><span class="line"><span class="cl">CRAN-archive      depends   built-in   CRAN archive
</span></span><span class="line"><span class="cl">Bioconductor      no        built-in   Open source software for Bioinformatics
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Use `rig repos available &lt;name&gt;` to see a repository&#39;s URLs.
</span></span><span class="line"><span class="cl">`depends`: a default only on some platforms, architectures or R versions.</span></span></code></pre></div></div>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig repos available r-universe/cran
</span></span><span class="line"><span class="cl">r-universe/cran (1 URL)
</span></span><span class="line"><span class="cl">R-universe CRAN mirror
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">R-universe&#39;s mirror of CRAN. The only repository serving arm64 Windows binary
</span></span><span class="line"><span class="cl">packages.
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">Default      only on platforms matching aarch64-*-mingw32
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">URL          https://cran.r-universe.dev
</span></span><span class="line"><span class="cl">Platforms    windows, *-mingw32
</span></span><span class="line"><span class="cl">Archs        aarch64</span></span></code></pre></div></div>
<h3 id="repository-status">Repository status
</h3>
<p>Use <code>rig repos status</code> to check the status of all enabled repositories.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">❯ rig repos status
</span></span><span class="line"><span class="cl">6 repositories of R 4.6.1, index bin/macosx/sonoma-arm64/contrib/4.6
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">name              ping   status        types              updated            url
</span></span><span class="line"><span class="cl">-----------------------------------------------------------------------------
</span></span><span class="line"><span class="cl">P3M             601 ms   ok            source, win, mac   -                  https://packagemanager.posit.co/cran/latest
</span></span><span class="line"><span class="cl">BioCsoft        233 ms   ok            source, win, mac   2026-10-01 17:08   https://bioconductor.org/packages/3.23/bioc
</span></span><span class="line"><span class="cl">BioCann         120 ms   source only   source, win, mac   2026-08-01 16:49   https://bioconductor.org/packages/3.23/data/annotation
</span></span><span class="line"><span class="cl">BioCexp         111 ms   source only   source, win, mac   2026-09-15 20:32   https://bioconductor.org/packages/3.23/data/experiment
</span></span><span class="line"><span class="cl">BioCworkflows   111 ms   source only   source, win, mac   2026-08-01 16:39   https://bioconductor.org/packages/3.23/workflows
</span></span><span class="line"><span class="cl">BioCbooks       120 ms   source only   source, win, mac   2026-08-01 16:25   https://bioconductor.org/packages/3.23/books
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">`ping` is the time the repository took to answer for the index above.
</span></span><span class="line"><span class="cl">`types` is what the R installation&#39;s `repositories` file declares.
</span></span><span class="line"><span class="cl">`source only`: this repository has no index for this platform and R version.</span></span></code></pre></div></div>
<div class="callout callout-note" role="note" aria-label="Note">
<div class="callout-header">
<span class="callout-title">Note</span>
</div>
<div class="callout-body">
<p>rig does not manage repositories in Positron and RStudio sessions. Use
the built-in Positron and RStudio tools instead.</p>
</div>
</div>
<h2 id="other-improvements">Other improvements
</h2>
<h3 id="avoid-unneeded-reinstalls">Avoid unneeded reinstalls
</h3>
<p><code>rig add</code> now does not reinstall an R version if it is already installed.
Use <code>--reinstall</code> to force a reinstall.</p>
<h3 id="exe-quick-links-on-windows"><code>.exe</code> quick links on Windows
</h3>
<p>On Windows rig now uses <code>.exe</code> quick links instead of <code>.bat</code> files.
<code>.bat</code> files have a lot of issues with passing arguments, <code>.exe</code> files
work much better.</p>
<h3 id="run-r-with-r-on-windows">Run R with <code>R</code> on Windows
</h3>
<p>The new <code>rig system fix-r-alias</code> subcommand deletes the <code>R</code> alias from
PowerShell, so you can now use <code>R</code> to start R.</p>
<h3 id="rig-is-now-signed-on-windows">rig is now signed on Windows
</h3>
<p>Thanks to the <a href="https://signpath.org" target="_blank" rel="noopener">SignPath Foundation</a>, the rig
executables and the rig installer are all signed now.</p>
<h3 id="rig-system-blas"><code>rig system blas</code>
</h3>
<p>The new <code>rig system blas</code> command lets you manage the BLAS/LAPACK library
used by R on macOS.</p>
<h3 id="update-and-uninstall">Update and uninstall
</h3>
<p>Use <code>rig self update</code> to update rig itself, and <code>rig self uninstall</code> to
uninstall it. These commands only work if you installed rig using the
install script. If you installed it with a package manager or ran the
installer manually, you have to use the same package manager or
uninstall it manually.</p>
<h2 id="your-feedback-is-welcome">Your feedback is welcome!
</h2>
<p>We would love to hear your thoughts, suggestions, and any issues you
encounter while using rig. Please use the <a href="https://github.com/r-lib/rig/issues" target="_blank" rel="noopener">issue tracker</a> for bug reports and feature
requests, and the <a href="https://github.com/r-lib/rig/discussions" target="_blank" rel="noopener">discussion forum</a> or <a href="https://forum.posit.co/" target="_blank" rel="noopener">Posit community</a> for general questions and discussions.</p>
<h2 id="acknowledgments">Acknowledgments
</h2>
<p>Huge thanks to everyone who contributed to rig 0.10.0 and 0.11.0:
<a href="https://github.com/achubaty" target="_blank" rel="noopener">@achubaty</a>,
<a href="https://github.com/AdaemmerP" target="_blank" rel="noopener">@AdaemmerP</a>,
<a href="https://github.com/AdrienLeGuillou" target="_blank" rel="noopener">@AdrienLeGuillou</a>,
<a href="https://github.com/Adrilihan" target="_blank" rel="noopener">@Adrilihan</a>,
<a href="https://github.com/Andryas" target="_blank" rel="noopener">@Andryas</a>,
<a href="https://github.com/bashirhamidi" target="_blank" rel="noopener">@bashirhamidi</a>,
<a href="https://github.com/benyamins" target="_blank" rel="noopener">@benyamins</a>,
<a href="https://github.com/biocyberman" target="_blank" rel="noopener">@biocyberman</a>,
<a href="https://github.com/Bisaloo" target="_blank" rel="noopener">@Bisaloo</a>,
<a href="https://github.com/cderv" target="_blank" rel="noopener">@cderv</a>,
<a href="https://github.com/CGMossa" target="_blank" rel="noopener">@CGMossa</a>,
<a href="https://github.com/danielloader" target="_blank" rel="noopener">@danielloader</a>,
<a href="https://github.com/dkczk" target="_blank" rel="noopener">@dkczk</a>,
<a href="https://github.com/eitsupi" target="_blank" rel="noopener">@eitsupi</a>,
<a href="https://github.com/elendil95" target="_blank" rel="noopener">@elendil95</a>,
<a href="https://github.com/eliocamp" target="_blank" rel="noopener">@eliocamp</a>,
<a href="https://github.com/EllaKaye" target="_blank" rel="noopener">@EllaKaye</a>,
<a href="https://github.com/etiennebacher" target="_blank" rel="noopener">@etiennebacher</a>,
<a href="https://github.com/frosforever" target="_blank" rel="noopener">@frosforever</a>,
<a href="https://github.com/gdevenyi" target="_blank" rel="noopener">@gdevenyi</a>,
<a href="https://github.com/ggrothendieck" target="_blank" rel="noopener">@ggrothendieck</a>,
<a href="https://github.com/grantmcdermott" target="_blank" rel="noopener">@grantmcdermott</a>,
<a href="https://github.com/gvelasq" target="_blank" rel="noopener">@gvelasq</a>,
<a href="https://github.com/hadley" target="_blank" rel="noopener">@hadley</a>,
<a href="https://github.com/jabenninghoff" target="_blank" rel="noopener">@jabenninghoff</a>,
<a href="https://github.com/jameslairdsmith" target="_blank" rel="noopener">@jameslairdsmith</a>,
<a href="https://github.com/jennybc" target="_blank" rel="noopener">@jennybc</a>,
<a href="https://github.com/jeroen" target="_blank" rel="noopener">@jeroen</a>,
<a href="https://github.com/jfin4" target="_blank" rel="noopener">@jfin4</a>,
<a href="https://github.com/John15321" target="_blank" rel="noopener">@John15321</a>,
<a href="https://github.com/jonbry" target="_blank" rel="noopener">@jonbry</a>,
<a href="https://github.com/JosiahParry" target="_blank" rel="noopener">@JosiahParry</a>,
<a href="https://github.com/kalenkovich" target="_blank" rel="noopener">@kalenkovich</a>,
<a href="https://github.com/kenahoo" target="_blank" rel="noopener">@kenahoo</a>,
<a href="https://github.com/kieran-mace" target="_blank" rel="noopener">@kieran-mace</a>,
<a href="https://github.com/klmr" target="_blank" rel="noopener">@klmr</a>,
<a href="https://github.com/krlmlr" target="_blank" rel="noopener">@krlmlr</a>,
<a href="https://github.com/lotum-david-j" target="_blank" rel="noopener">@lotum-david-j</a>,
<a href="https://github.com/malcolmbarrett" target="_blank" rel="noopener">@malcolmbarrett</a>,
<a href="https://github.com/mcanouil" target="_blank" rel="noopener">@mcanouil</a>,
<a href="https://github.com/mhurtado13" target="_blank" rel="noopener">@mhurtado13</a>,
<a href="https://github.com/MilesMcBain" target="_blank" rel="noopener">@MilesMcBain</a>,
<a href="https://github.com/mitsuki5284" target="_blank" rel="noopener">@mitsuki5284</a>,
<a href="https://github.com/mns-nordicals" target="_blank" rel="noopener">@mns-nordicals</a>,
<a href="https://github.com/morphatic" target="_blank" rel="noopener">@morphatic</a>,
<a href="https://github.com/Nerwosolek" target="_blank" rel="noopener">@Nerwosolek</a>,
<a href="https://github.com/noamross" target="_blank" rel="noopener">@noamross</a>,
<a href="https://github.com/paluigi" target="_blank" rel="noopener">@paluigi</a>,
<a href="https://github.com/robjhyndman" target="_blank" rel="noopener">@robjhyndman</a>,
<a href="https://github.com/rumichaska" target="_blank" rel="noopener">@rumichaska</a>,
<a href="https://github.com/SaintRod" target="_blank" rel="noopener">@SaintRod</a>,
<a href="https://github.com/sammieephung" target="_blank" rel="noopener">@sammieephung</a>,
<a href="https://github.com/sda030" target="_blank" rel="noopener">@sda030</a>,
<a href="https://github.com/ShixiangWang" target="_blank" rel="noopener">@ShixiangWang</a>,
<a href="https://github.com/t-kalinowski" target="_blank" rel="noopener">@t-kalinowski</a>,
<a href="https://github.com/tylermorganwall" target="_blank" rel="noopener">@tylermorganwall</a>,
<a href="https://github.com/venpopov" target="_blank" rel="noopener">@venpopov</a>,
<a href="https://github.com/vikasrawal" target="_blank" rel="noopener">@vikasrawal</a>,
<a href="https://github.com/wzbillings" target="_blank" rel="noopener">@wzbillings</a>, and
<a href="https://github.com/zivankaraman" target="_blank" rel="noopener">@zivankaraman</a>.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-09_rig-0-11-0-part-one/featured.jpg" length="299922" type="image/jpeg" />
    </item>
    <item>
      <title>Genomes, Prompts, and Shiny: What I Built During My Summer at Posit</title>
      <link>https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/</link>
      <pubDate>Thu, 08 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/</guid>
      <dc:creator>Samuel Bharti</dc:creator>
      <dc:creator>Shiny Team</dc:creator>
      <dc:creator>Barret Schloerke</dc:creator>
      <dc:creator>Carson Sievert</dc:creator>
      <dc:creator>Joe Cheng</dc:creator><description><![CDATA[<p>My name is Samuel Bharti and I am a PhD candidate at the University of Alabama at Birmingham, working on rare diseases and cancers, particularly focusing on Neurofibromatosis Type 1 and the cancers associated with it. I spent this summer as a software engineering intern on the Shiny team at Posit. In three short months, I built <strong>10 open-source applications and 5 supporting packages</strong> for computational biology, across R, Python, TypeScript, and JavaScript. Some are tools researchers can use directly. Others sit underneath those applications and solve recurring infrastructure problems.</p>
<p>I came into the internship as a computational biologist. In my PhD research, I work with single-cell sequencing, genomics, and multi-omics data, and with the public databases and identifiers that come with them.</p>
<p>Across different projects, I kept running into the same problems:</p>
<ul>
<li>Biological datasets are getting enormous.</li>
<li>The information needed to interpret them is scattered across many databases.</li>
<li>Identifiers are surprisingly inconsistent.</li>
<li>The same API and data-access logic gets rewritten again and again.</li>
<li>Even when excellent public datasets exist, there can still be a huge gap between <strong>the data being available</strong> and <strong>a researcher being able to use it comfortably</strong>.</li>
</ul>
<p>Those gaps became the theme of my summer.</p>
<blockquote>
<p>How do we make increasingly large and complicated biological datasets genuinely usable for researchers?</p>
</blockquote>
<h2 id="making-enormous-biological-datasets-explorable">Making enormous biological datasets explorable
</h2>
<p>One of the projects I am most excited about is <a href="https://posit-tahoe-explorer.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Tahoe Explorer</strong></a> (<a href="https://github.com/samuelbharti/tahoe-explorer" target="_blank" rel="noopener">source</a>).</p>
<p><a href="https://huggingface.co/datasets/tahoebio/Tahoe-100M" target="_blank" rel="noopener">Tahoe-100M</a> contains more than 100 million single-cell perturbation profiles. That scale is scientifically exciting, but it creates a practical problem: you cannot treat 100 million observations like a normal dataframe inside an interactive application.</p>
<p>I wanted researchers to be able to answer basic questions before committing to a large analysis. Which cell lines are represented? Which drugs were tested? How much coverage exists for the combination I care about? What do we know about the genomic background of those cell lines? And once I find what I need, how do I retrieve only that part of the dataset?</p>
<p>Tahoe Explorer lets researchers move through drugs, cell lines, samples, genes, coverage, and cell-level metadata without first downloading and loading the entire resource. For the larger data, queries are pushed down to DuckDB, which returns only the rows or summaries the current view needs.</p>
<p>I integrated additional information from resources such as <a href="https://depmap.org/portal/" target="_blank" rel="noopener">DepMap</a> and <a href="https://www.cellosaurus.org/" target="_blank" rel="noopener">Cellosaurus</a>, including variant information for the cell lines. That makes it possible to think about perturbation response alongside the genomic context of each cell line.</p>
<p>The Subset builder tab then turns exploration into something reproducible. Users can define the experiment they care about and generate R or Python code for retrieving that subset later.</p>
<p>Another feature of the app is the built-in chat assistant. It can help researchers reason about Tahoe, identify useful filters, interact with supported parts of the app, and finally build those reproducible subset recipes.</p>
<p>What I like most is that the assistant lives inside the app. It can use tools over the data and help operate the workflow. To me, that is a much more interesting direction for AI in scientific software.</p>
<div class="not-prose">
<figure>
<a href="https://posit-tahoe-explorer.share.connect.posit.cloud/" target="_blank" rel="noopener"><img class="h-auto max-w-full rounded-lg" src="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/tahoe-explorer.gif" alt="An animation of Tahoe Explorer. On the Overview tab, the tiles show 100.6M cells, 50 cell lines and 379 drugs, and clicking the Breast bar in the cell lines by organ chart filters the table to HS-578T and BT-474. The Coverage tab shows a heatmap of the cells profiled for each drug and cell line. On the Subset builder tab, the assistant panel opens and is asked to build a breast cancer subset. It replies that it selected Organ: Breast in the Subset builder, names BT-474 and HS-578T, estimates 3,094,027 cells across 1,344 samples, and writes R and Python code to pull them, while the tiles change to 3.1M cells and 2 cell lines." title="A quick tour of the Overview and Coverage tabs, then the assistant setting a filter in the Subset builder and reporting what the selection covers." loading="lazy"></a>
<figcaption class="text-sm text-center text-gray-500">A quick tour of the Overview and Coverage tabs, then the assistant setting a filter in the Subset builder and reporting what the selection covers.</figcaption>
</figure>
</div>
<p>The Tahoe app solved one type of scaling problem: accessing and understanding a dataset that is much larger than the application itself. One layer later, the same issue came back, with the <strong>visualization itself</strong> as the bottleneck.</p>
<p><a href="https://opensource.posit.co/software/plotomics/"><strong>plotomics</strong></a> and <a href="https://posit-plotomics-live.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Plotomics Live</strong></a> (<a href="https://github.com/samuelbharti/plotomics-live" target="_blank" rel="noopener">source</a>) came out of that bottleneck.</p>
<p>plotomics is a visualization library for computational biology with a shared TypeScript rendering core and wrappers for R and Python. Its 17 components cover embeddings, heatmaps, volcano plots, networks, oncoplots, genomic views, spatial data, survival analysis, and other common biological visualizations. Of those, 15 ship in R, Python, and JavaScript; the two genome browsers are JavaScript and Python only.</p>
<p>For large visualizations, the browser can draw with WebGL or Canvas. Numeric data can also move to the frontend as binary buffers instead of being serialized into huge JSON payloads.</p>
<p>The visualization logic exists once. The R, Python, and JavaScript wrappers all talk to the same rendering engine.</p>
<p>I built <strong>Plotomics Live</strong> to explore how far that model could go inside Shiny.</p>
<p>The app contains 26 biological visualizations, built from those 17 components with several of them used more than once, across single-cell data, spatial transcriptomics, genomics, networks, perturbation data, and other common workflows. Every one of them renders two ways, and an engine toggle puts the GPU-accelerated React component beside the server-rendered ggplot2 image so you can compare them directly.</p>
<p>One page, for example, interactively renders more than half a million real single-cell observations in the browser.</p>
<p>Plotomics Live is where I worked out what Shiny can look like when R remains the analytical engine and the browser does more of the work it is good at.</p>
<div class="not-prose">
<figure>
<a href="https://posit-plotomics-live.share.connect.posit.cloud/" target="_blank" rel="noopener"><img class="h-auto max-w-full rounded-lg" src="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/plotomics-live.gif" alt="An animation of Plotomics Live. On the Visium spatial transcriptomics page, capture spots in eleven color-coded clusters sit over a breast cancer tissue section, above a footer reading 3,798 capture spots, 11 clusters, 72 genes in panel. The spot opacity slider fades the spots to show the H&amp;E-stained tissue underneath, then brings them back. The coloring switches to ERBB2 expression, and the engine toggle swaps the Shiny React component for the ggplot2 (classic) image. The animation then moves to the Protein structure page, where the AlphaFold model of TP53, colored by pLDDT confidence, turns." title="Two of the 26 pages. The engine toggle swaps the React component for the ggplot2 image, over the same server-side computation." loading="lazy"></a>
<figcaption class="text-sm text-center text-gray-500">Two of the 26 pages. The engine toggle swaps the React component for the ggplot2 image, over the same server-side computation.</figcaption>
</figure>
</div>
<h2 id="connecting-biological-information-that-lives-everywhere">Connecting biological information that lives everywhere
</h2>
<p>Scale was only one recurring problem. The other was fragmentation.</p>
<p>A lot of computational biology does not involve one database or one algorithm. It involves assembling an answer from many different resources.</p>
<p>Variant interpretation is a good example. If I am reviewing a variant, I may want information from <a href="https://www.ncbi.nlm.nih.gov/clinvar/" target="_blank" rel="noopener">ClinVar</a>, <a href="https://gnomad.broadinstitute.org/" target="_blank" rel="noopener">gnomAD</a>, <a href="https://www.ensembl.org/" target="_blank" rel="noopener">Ensembl</a>, <a href="https://www.uniprot.org/" target="_blank" rel="noopener">UniProt</a>, <a href="https://alphafold.ebi.ac.uk/" target="_blank" rel="noopener">AlphaFold</a>, <a href="https://platform.opentargets.org/" target="_blank" rel="noopener">Open Targets</a>, <a href="https://www.dbnsfp.org/" target="_blank" rel="noopener">dbNSFP</a>, <a href="https://www.ebi.ac.uk/ProtVar/" target="_blank" rel="noopener">ProtVar</a>, and several other sources.</p>
<p><a href="https://posit-variant-reviewer.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Variant Reviewer</strong></a> (<a href="https://github.com/samuelbharti/variant-reviewer" target="_blank" rel="noopener">source</a>) brings those sources together in one reactive workflow.</p>
<p>A researcher can start from a gene, a variant, or both, and the app combines clinical significance, population frequency, prediction scores, gene constraint, protein domains and 3D protein structure.</p>
<div class="not-prose">
<figure>
<a href="https://posit-variant-reviewer.share.connect.posit.cloud/" target="_blank" rel="noopener"><img class="h-auto max-w-full rounded-lg" src="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/variant-reviewer.gif" alt="An animation of Variant Reviewer. Loading the BRAF V600E example fills the gene and variant boxes, and Review fills the cards: BRAF on the gene card, chr7:g.140753336A&gt;T and p.Val600Glu on the variant card, UniProt P15056 at position 600 on the protein card, and conflicting classifications of pathogenicity on the ClinVar card. The assistant on the right is then asked what ClinVar and gnomAD say about this variant, and answers with the ClinVar classification and its conditions and a gnomAD exome frequency of 2 in 1,460,618 alleles." title="One gene, one variant, one page. Each card is a different public service." loading="lazy"></a>
<figcaption class="text-sm text-center text-gray-500">One gene, one variant, one page. Each card is a different public service.</figcaption>
</figure>
</div>
<p>But building Variant Reviewer surfaced another problem. Every external biological service behaves differently: its own identifiers, its own failure modes, its own rate limits. One might return a clean &ldquo;not found&rdquo; response while another throws an error. And one slow or unavailable service should not break the entire application.</p>
<p>Once I started solving those problems in one app, it became apparent that I should not keep solving them separately.</p>
<h2 id="building-the-infrastructure-once">Building the infrastructure once
</h2>
<p>Five packages grew out of problems that kept appearing across the applications.</p>
<h3 id="biobouncer">biobouncer
</h3>
<p><a href="https://opensource.posit.co/software/biobouncer/"><strong>biobouncer</strong></a> handles biological identifier validation. Gene symbols change. Ontology identifiers have different namespaces. Variants can be syntactically valid but biologically meaningless. Public databases each have their own identifier conventions.</p>
<p>biobouncer provides a common layer for validating these inputs using pattern checks, cached resources, remote validation, and existence checks. It also has implementations across R, Python, and TypeScript backed by the same conformance data.</p>
<p>If the same identifier moves through an R pipeline, a Python analysis, and a web interface, I want &ldquo;valid&rdquo; to mean the same thing everywhere.</p>
<h3 id="biohttp">biohttp
</h3>
<p><a href="https://opensource.posit.co/software/biohttp/"><strong>biohttp</strong></a> handles the repetitive infrastructure around external APIs. Retries, throttling, caching, batching, timeouts, circuit breaking, and structured errors should not need to be rebuilt in every scientific application.</p>
<p>It also makes an important distinction between a service successfully returning no biological result and the service itself failing. That sounds small until an application depends on several external databases at once.</p>
<h3 id="bioclients">bioclients
</h3>
<p><a href="https://opensource.posit.co/software/bioclients/"><strong>bioclients</strong></a> sits on top of that transport layer and provides R clients for 29 biological services. Ensembl, UniProt, gnomAD, Open Targets, ClinVar, AlphaFold, and the rest each get a client that understands the structure and meaning of what they return.</p>
<p>Network requests and response parsing are separated so parsers can be tested against stored responses without requiring a live API.</p>
<p>The separation is intentional:</p>
<ul>
<li><strong>biohttp handles how we talk to a service.</strong></li>
<li><strong>bioclients handles what that biological service returns.</strong></li>
</ul>
<h3 id="plotomics">plotomics
</h3>
<p><strong>plotomics</strong> is the exception in this list. I described it above, because it came out of one specific problem before I was thinking about shared infrastructure at all. It belongs here anyway, for the same reason as the rest: the rendering layer only had to be built once.</p>
<h3 id="biocohort">biocohort
</h3>
<p>Before APIs and visualization even matter, most omics projects have another problem: keeping the study organized. Subjects, samples, assays, species, and the manual corrections made along the way often end up spread across spreadsheets and scripts.</p>
<p><a href="https://opensource.posit.co/software/biocohort/"><strong>biocohort</strong></a> provides a validated study representation for keeping those relationships together. The same manifest can describe multiple assay types and organisms, generate pipeline sample sheets, and preserve corrections that would otherwise disappear inside preprocessing code.</p>
<p>This one is particularly close to my own research because these small bookkeeping problems become very expensive once a project grows.</p>
<p><div class="not-prose"><figure>
    <img class="h-auto max-w-full rounded-lg"
      src="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/package-stack.png"
      alt="A diagram. The ten applications are listed as chips inside a dashed box at the top. Below them are five rows, each showing a package&rsquo;s hex sticker next to its name and its job: biobouncer for whether an identifier means anything, biohttp for how we talk to a service, bioclients for what each biological service returns, plotomics for one rendering core in three languages, and biocohort for how a study stays organized."  title="The five packages, and the one question each of them answers." 
      loading="lazy"
    ><figcaption class="text-sm text-center text-gray-500">The five packages, and the one question each of them answers.</figcaption>
  </figure></div>
</p>
<p>This shift from app-specific code to reusable infrastructure was the biggest change in how I approached the internship. Instead of asking, &ldquo;How do I make this app work?&rdquo;, I started asking, &ldquo;Which part of this problem will the next app also need?&rdquo;</p>
<h2 id="from-retrieving-data-to-synthesizing-evidence">From retrieving data to synthesizing evidence
</h2>
<p>Once those pieces became reusable, I could build higher-level research workflows on top of them.</p>
<p><a href="https://posit-gene-list-builder.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Gene List Builder</strong></a> (<a href="https://github.com/samuelbharti/gene-list-builder" target="_blank" rel="noopener">source</a>) came from another task I have done manually many times: starting with a disease and assembling a defensible list of associated genes.</p>
<p>The application resolves the disease to an ontology term, queries multiple gene-disease resources, normalizes the results, removes duplicates, and produces a ranked list using transparent and adjustable source weights.</p>
<p>The evidence comes from the underlying databases, the scoring is visible, and the provenance remains available. An optional AI layer can then help with curation after that deterministic evidence-gathering step.</p>
<p><a href="https://posit-genescout.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>GeneScout</strong></a> (<a href="https://github.com/samuelbharti/genescout" target="_blank" rel="noopener">source</a>) takes the same idea further.</p>
<p>It acts as an evidence-review workbench for evaluating candidate genes in a disease context. Its deterministic layer resolves genes, retrieves public evidence, keeps citations attached, scores the evidence, and applies caveats. An optional agent can then synthesize what was retrieved and suggest follow-up directions.</p>
<p>Both apps rest on the design principle I came away from the summer caring about most:</p>
<p><strong>AI can help interpret scientific evidence without needing to be the source of the evidence.</strong></p>
<div class="not-prose">
<figure>
<a href="https://posit-genescout.share.connect.posit.cloud/" target="_blank" rel="noopener"><img class="h-auto max-w-full rounded-lg" src="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/genescout.gif" alt="An animation of GeneScout. The setup page holds four example gene lists and the study context NF1-associated cancer (MPNST). After Rank genes, the review shows 32 candidates ranked across 12 sources, with EGFR first. Selecting NF1 switches the panel on the right to its composite score of 0.55 and its breakdown by source, from Open Targets association to STRING connectivity. Opening its grounded evidence lists 38 cited items, starting with an Open Targets association with neurofibromatosis type 1." title="Every number in the breakdown traces back to a public source. Curate with AI and Analyze with specialists are separate, optional steps." loading="lazy"></a>
<figcaption class="text-sm text-center text-gray-500">Every number in the breakdown traces back to a public source. Curate with AI and Analyze with specialists are separate, optional steps.</figcaption>
</figure>
</div>
<h2 id="turning-analyses-into-tools-researchers-can-actually-explore">Turning analyses into tools researchers can actually explore
</h2>
<p>I built several more focused applications around common genomics workflows.</p>
<p><a href="https://posit-recount-explorer.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Recount Explorer</strong></a> (<a href="https://github.com/samuelbharti/recount-explorer" target="_blank" rel="noopener">source</a>) provides an interactive entry point into <a href="https://rna.recount.bio/" target="_blank" rel="noopener">recount3</a>, allowing researchers to browse uniformly processed RNA-seq studies, inspect quality metrics, explore expression and PCA, and export data, without writing any code.</p>
<p><a href="https://posit-de-explorer.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>DE Explorer</strong></a> (<a href="https://github.com/posit-dev/shiny-showcase-bioinformatics/tree/main/apps/de-explorer" target="_blank" rel="noopener">source</a>) makes differential-expression results interactive, moving from a PCA of sample-level structure to a volcano plot, a filterable results table, and a heatmap of the genes you select.</p>
<p><a href="https://posit-signature-scoring.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Signature Scoring</strong></a> (<a href="https://github.com/posit-dev/shiny-showcase-bioinformatics/tree/main/apps/signature-scoring" target="_blank" rel="noopener">source</a>) summarizes expression profiles into pathway-level scores and lets researchers compare those scores across groups before drilling down into the genes driving a pathway.</p>
<p><a href="https://posit-drug-perturbation.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Drug Perturbation</strong></a> (<a href="https://github.com/posit-dev/shiny-showcase-bioinformatics/tree/main/apps/drug-perturbation" target="_blank" rel="noopener">source</a>) explores connectivity between gene-expression signatures and reference perturbations, including potential mimics and reversers across different cellular contexts. Its reference panel is synthetic, built over the TCGA-BRCA gene space.</p>
<p><a href="https://posit-genome-explorer.share.connect.posit.cloud/" target="_blank" rel="noopener"><strong>Genome Explorer</strong></a> (<a href="https://github.com/posit-dev/shiny-showcase-bioinformatics/tree/main/apps/genome-explorer" target="_blank" rel="noopener">source</a>) places recurrent variants into an interactive genomic view and lets users move from cohort-level patterns to individual loci.</p>
<p>These five are deliberately narrower than the applications above. An analysis can end in a tool: a thin Shiny layer turns a computational result into something the researcher who understands the biology can actually explore.</p>
<div class="not-prose">
<figure>
<a href="https://posit-shiny-showcase-bioinformatics.share.connect.posit.cloud/" target="_blank" rel="noopener"><img class="h-auto max-w-full rounded-lg" src="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/focused-apps.png" alt="Five application screenshots in a labelled grid: Recount Explorer, DE Explorer, Signature Scoring, Drug Perturbation, and Genome Explorer. Each shows a populated dashboard, in order a study catalogue, a PCA with threshold controls, a pathway activity contrast, a connectivity leaderboard, and a genome browser above a variant table." title="Five smaller applications, each wrapped around one common genomics workflow." loading="lazy"></a>
<figcaption class="text-sm text-center text-gray-500">Five smaller applications, each wrapped around one common genomics workflow.</figcaption>
</figure>
</div>
<h2 id="working-in-open-source">Working in open source
</h2>
<p>I had worked on open-source software before, but working inside Posit&rsquo;s Open Source group changed how I thought about building research software.</p>
<p>Code review was where a lot of the interesting work happened.</p>
<p>I spent much more time thinking about API design, failure modes, backwards compatibility, and what another developer would experience after I stopped actively working on a project.</p>
<p>That distinction became very clear over the summer:</p>
<p><strong>Making something run once is different from making something other people can depend on.</strong></p>
<p>I got to move well outside the R layer I knew best. Across the summer I worked with R, Python, JavaScript, TypeScript, React, WebGL, Shiny internals, and newer work around <a href="https://github.com/posit-dev/shinyreact" target="_blank" rel="noopener">shinyreact</a>, which the Shiny team introduced in <a href="https://opensource.posit.co/blog/2026-09-30_introducing-shinyreact/">Introducing shinyreact</a> at the end of September.</p>
<p>Starting the internship at Open Source Work Week in Boston made the whole experience even better. Meeting everyone in person at the beginning made the later remote collaboration feel much more natural.</p>
<p>I am very grateful to <a href="https://opensource.posit.co/people/barret-schloerke/"><strong>Barret Schloerke</strong></a>, <a href="https://opensource.posit.co/people/carson-sievert/"><strong>Carson Sievert</strong></a>, <a href="https://opensource.posit.co/people/joe-cheng/"><strong>Joe Cheng</strong></a>, the rest of the Shiny team, and everyone across Posit who provided feedback, answered questions, challenged ideas, or helped me understand another part of the stack.</p>
<p>I learned a lot from being able to build freely while surrounded by people who know these tools from the inside.</p>
<h2 id="next-for-these-projects">Next for these projects
</h2>
<p>The internship ended, but I do not really think of these projects as finished. They are open source, and many of them solve problems I still encounter in my own research. I hope researchers use them, find things I did not anticipate, and help shape where they go next.</p>
<p>The applications and supporting packages are collected in the <a href="https://github.com/posit-dev/shiny-showcase-bioinformatics" target="_blank" rel="noopener"><strong>Shiny Showcase: Bioinformatics</strong></a> repository, with source code, documentation, examples, and citation information for the individual projects. The <a href="https://posit-shiny-showcase-bioinformatics.share.connect.posit.cloud/" target="_blank" rel="noopener">live gallery</a> links every app to a running deployment you can open in a browser.</p>
<p>I presented this as a talk in August 2026. <a href="https://www.samuelbharti.com/genomes-prompts-shiny/" target="_blank" rel="noopener">The deck</a> covers the same projects in slides, and its <a href="https://github.com/samuelbharti/genomes-prompts-shiny" target="_blank" rel="noopener">source</a> is public.</p>
<p>If you work in computational biology, genomics, or research software, I would genuinely love to hear what is useful and what is missing.</p>
<p>Try an app, use one of the packages, or open an issue if something breaks or could work better. Pull requests are welcome. Or tell me about the research-software problem you keep solving manually.</p>
<p>A lot of this work started exactly that way. I noticed recurring problems in my own research that felt harder than they should be, and I tried to build the tools I wished I already had.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-08_genomes-prompts-and-shiny/featured.png" length="413419" type="image/png" />
    </item>
    <item>
      <title>posit::glimpse() Newsletter – October 2026</title>
      <link>https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/</link>
      <pubDate>Wed, 07 Oct 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/</guid>
      <dc:creator>Isabella Velásquez</dc:creator><description><![CDATA[<p>Hello, everyone! We’ve officially wrapped up posit::conf(2026), and to everyone who joined us in Houston or online, thank you for making it incredible 💙🧡 Between the keynote reveals, lightning talks, and workshops, it was a lot to take in! In this edition, we’ve rounded up all the major news and announcements in one place.</p>
<p>Want to catch up on talks? While we prepare the videos for YouTube, all session recordings are available now on the event portal:</p>
<ul>
<li>Register / log in at <a href="https://conf.posit.co" target="_blank" rel="noopener">conf.posit.co</a></li>
<li>Go to &ldquo;Schedule&rdquo;</li>
<li>Select any session and click &ldquo;View recording&rdquo;</li>
</ul>









  





  







<div class="not-prose grid grid-cols-2 md:grid-cols-3 gap-4 mt-2 mb-6">
  
    
    
    
    

    
    
      
      
      
      
      
        
        
        
          
            
            
            
            
            
          
        
          
            
            
            
              
              
            
            
            
          
        
          
            
            
            
              
              
            
            
            
          
        
          
        
      
      <figure class="m-0">
        <img
          src="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/photos/photo1_hu_6fb08991979a00f7.jpeg"
          alt="photos/photo1.jpeg"
          class="w-full aspect-[4/3] object-cover rounded-lg cursor-pointer outline-none"
          style="object-position: center"
          loading="lazy"
          
          data-gallery-group="gallery-0"
          data-gallery-src="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/photos/photo1.jpeg"
          data-gallery-caption=""
          
          data-gallery-webp="/blog/2026-10-07_glimpse-10-2026/photos/photo1_hu_c111386dc651e3ed.webp 640w, /blog/2026-10-07_glimpse-10-2026/photos/photo1_hu_a70580f20689bc35.webp 960w, /blog/2026-10-07_glimpse-10-2026/photos/photo1_hu_5f3f89496c54f45.webp 1280w"
          data-gallery-jpeg="/blog/2026-10-07_glimpse-10-2026/photos/photo1_hu_3733283b694e3e95.jpeg 640w, /blog/2026-10-07_glimpse-10-2026/photos/photo1_hu_e41a7fc1c4c722ad.jpeg 960w, /blog/2026-10-07_glimpse-10-2026/photos/photo1_hu_abfc3a8d2a5de3c.jpeg 1280w"
          role="button"
          tabindex="0"
          
        >
        
      </figure>
    
  
    
    
    
    

    
    
      
      
      
      
      
        
        
        
          
            
            
            
            
            
          
        
          
            
            
            
              
              
            
            
            
          
        
          
            
            
            
              
              
            
            
            
          
        
          
        
      
      <figure class="m-0">
        <img
          src="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/photos/photo2_hu_fd39cc2dae09a981.jpeg"
          alt="photos/photo2.jpeg"
          class="w-full aspect-[4/3] object-cover rounded-lg cursor-pointer outline-none"
          style="object-position: center"
          loading="lazy"
          
          data-gallery-group="gallery-0"
          data-gallery-src="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/photos/photo2.jpeg"
          data-gallery-caption=""
          
          data-gallery-webp="/blog/2026-10-07_glimpse-10-2026/photos/photo2_hu_231fb87d898db1c7.webp 640w, /blog/2026-10-07_glimpse-10-2026/photos/photo2_hu_ca84e3ba03e94d6f.webp 960w, /blog/2026-10-07_glimpse-10-2026/photos/photo2_hu_ae974601d02b8171.webp 1280w"
          data-gallery-jpeg="/blog/2026-10-07_glimpse-10-2026/photos/photo2_hu_2037ed65cf9451e5.jpeg 640w, /blog/2026-10-07_glimpse-10-2026/photos/photo2_hu_d9de34e3c9983c0d.jpeg 960w, /blog/2026-10-07_glimpse-10-2026/photos/photo2_hu_c717be003de21464.jpeg 1280w"
          role="button"
          tabindex="0"
          
        >
        
      </figure>
    
  
    
    
    
    

    
    
      
      
      
      
      
        
        
        
          
            
            
            
            
            
          
        
          
            
            
            
              
              
            
            
            
          
        
          
            
            
            
              
              
            
            
            
          
        
          
        
      
      <figure class="m-0">
        <img
          src="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/photos/photo3_hu_5cd54b096e78ab13.jpeg"
          alt="photos/photo3.jpeg"
          class="w-full aspect-[4/3] object-cover rounded-lg cursor-pointer outline-none"
          style="object-position: center"
          loading="lazy"
          
          data-gallery-group="gallery-0"
          data-gallery-src="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/photos/photo3.jpeg"
          data-gallery-caption=""
          
          data-gallery-webp="/blog/2026-10-07_glimpse-10-2026/photos/photo3_hu_5851fec0224c6f18.webp 640w, /blog/2026-10-07_glimpse-10-2026/photos/photo3_hu_e500064cd3693752.webp 960w, /blog/2026-10-07_glimpse-10-2026/photos/photo3_hu_8d370cb3ea37eb67.webp 1280w"
          data-gallery-jpeg="/blog/2026-10-07_glimpse-10-2026/photos/photo3_hu_27b827b979b5a5fb.jpeg 640w, /blog/2026-10-07_glimpse-10-2026/photos/photo3_hu_40bd6a7f550a9dde.jpeg 960w, /blog/2026-10-07_glimpse-10-2026/photos/photo3_hu_c6555aa88282daa2.jpeg 1280w"
          role="button"
          tabindex="0"
          
        >
        
      </figure>
    
  
</div>

<h2 id="announcing-the-winners-of-the-posit-impact-awards">Announcing the winners of the Posit Impact Awards
</h2>
<p>We were thrilled to launch the inaugural Posit Impact Awards to celebrate stories of measurable, meaningful change across our community. At posit::conf(2026), we were honored to announce our eight winners, each receiving a conference pass to join us in Houston!</p>
<p>A huge congratulations to all our winners, and a heartfelt thank you for the incredible work you do (and for sharing it with us)!</p>
<ul>
<li>Explore their stories in the <a href="https://posit.co/blog/2026-posit-impact-awards" target="_blank" rel="noopener">2026 Posit Impact Awards</a> blog post and join us at the <a href="https://posit.co/data-science-hangout" target="_blank" rel="noopener">Data Science Hangout</a> to hear from other Impact Award winners and nominees featured in the next few weeks.</li>
</ul>
<p><div class="not-prose"><figure>
    <img class="h-auto max-w-full rounded-lg"
      src="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/images/impact-awards.jpeg"
      alt="Graphic presenting the 2026 Posit Impact Awards winners: Paulo Villarroel (Mission-Critical), Chendi Liao (Transformation), Claudio T. Rebelo (Scale &amp; Reach), Skyler Elmstrom (Resilient Impact), Jon Harmon (Community Builder), Christian Martinez (Open Source), and Amanda Perez &amp; Romina Mir (ROI &amp; Efficiency)." 
      loading="lazy"
    >
  </figure></div>
</p>
<h2 id="open-source-updates-from-positconf2026">Open Source updates from posit::conf(2026)
</h2>
<h3 id="introducing-commons">Introducing commons
</h3>
<p><a href="https://posit-dev.github.io/commons/" target="_blank" rel="noopener">commons</a> 0.1.0 introduces a new framework for building trustworthy self-service data analysis agents in R and Python. The package implements a three-tier trust labeling system that transparently indicates whether agents invoke trusted code directly, write new code justified by vetted context, or provide untrusted answers. Built on Posit’s LLM stack (<a href="https://ellmer.tidyverse.org/" target="_blank" rel="noopener">ellmer</a>, <a href="https://posit-dev.github.io/chatlas/" target="_blank" rel="noopener">chatlas</a>, <a href="https://posit-dev.github.io/shinychat/" target="_blank" rel="noopener">shinychat</a>), commons enables teams to convert existing analytical code into AI agent capabilities while maintaining transparency about code sources.</p>
<ul>
<li>Learn more about <a href="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/" target="_blank" rel="noopener">commons 0.1.0</a>.</li>
<li>Join Sara &amp; Simon&rsquo;s virtual webinar on October 28th to learn more about commons. <a href="https://events.zoom.us/ev/Ajss5j9VeRMe0zw-AtFKf7AUAsthzYhaYjYPeEIu1uYAQe1K0ud1~Agb_hSt1UGxd9fUyIDC32e6jAdEtbl7G_AaLZUYhRvyZR5cGpY5Kp_A0-w?mkt_tok=NzA5LU5YTi03MDYAAAGhT3GTQTQ5s7LDxqZGUAE1zALOLmEDysbAsOyvVdJ9P72DB_IRwtWRTED6kyJA-j-YKF7WxCTY_ZlZ4rTkiyY" target="_blank" rel="noopener">Register here</a>.</li>
</ul>
<h3 id="quarto-hub">Quarto Hub
</h3>
<p>Quarto Hub is a new hosted platform from Posit. In Quarto Hub, you can create, edit, comment on, and publish your <a href="https://quarto.org/" target="_blank" rel="noopener">Quarto projects</a> (single documents, presentations, websites) collaboratively and in real time.</p>
<ul>
<li>Watch Carlos Scheidegger&rsquo;s talk, &ldquo;Quarto Hub: Collaboratively edit, create, and share documents&rdquo;, on the event portal.</li>
</ul>
<script src="https://fast.wistia.com/player.js" async></script><script src="https://fast.wistia.com/embed/gd8zwcsex7.js" async type="module"></script><style>wistia-player[media-id='gd8zwcsex7']:not(:defined) { background: center / contain no-repeat url('https://fast.wistia.com/embed/medias/gd8zwcsex7/swatch'); display: block; filter: blur(5px); padding-top:56.25%; }</style> <wistia-player media-id="gd8zwcsex7" aspect="1.7777777777777777"></wistia-player>
<h3 id="skilift-and-skipatrol">skiLift and skiPatrol
</h3>
<p>Posit has taken over maintenance over two R packages that provide comprehensive tools to work and collaborate within Snowflake’s data platform and ML ecosystem:</p>
<ul>
<li><a href="https://github.com/posit-dev/skiLift/" target="_blank" rel="noopener">skiLift</a>: a DBI-compliant Snowflake connector written in R, that authenticates and communicates via the Snowflake SQL API (REST).</li>
<li><a href="https://github.com/posit-dev/skiPatrol/" target="_blank" rel="noopener">skiPatrol</a>: an R interface to Snowflake&rsquo;s ML platform: model registry, feature store, experiments, model monitoring, and container services.</li>
</ul>
<p>Learn more in the <a href="https://posit.co/blog/r-meet-snowflake-introducing-posits-skilift-and-skipatrol-packages" target="_blank" rel="noopener">R, meet Snowflake: Introducing Posit’s skiLift and skiPatrol Packages</a> blog post.</p>
<h2 id="even-more-open-source-updates">Even more open source updates
</h2>
<p>Beyond all the exciting conf news, September was packed with major product updates and community highlights across the board!</p>
<h3 id="at-the-database-layer">At the database layer
</h3>
<h4 id="ggsql-050-readers-writers-and-beta-status">ggsql 0.5.0: Readers, Writers, and Beta status
</h4>
<p><a href="https://ggsql.org/" target="_blank" rel="noopener">ggsql</a> is a tool that implements a grammar of graphics for SQL, enabling ggplot2-style data visualization directly from database queries. ggsql 0.5.0 reaches beta status with major improvements to database connectivity and rendering capabilities. The release introduces hybrid-reader mode for read-only connections with cache support, replaces the Vega-Lite renderer with a custom writer supporting PNG, JPEG, SVG, and PDF output, and adds rich text support through extended markdown. New features include caption support, minor breaks on scales, and true variable line aesthetics with gradients.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-24_ggsql_0_5_0/" target="_blank" rel="noopener">ggsql 0.5.0: Readers, Writers, and Beta status</a> blog post.</li>
</ul>
<h4 id="orbital-070">orbital 0.7.0
</h4>
<p><a href="https://orbital.tidymodels.org/" target="_blank" rel="noopener">orbital</a> enables the running predictions of tidymodels workflows inside databases. orbital 0.7.0 and tidypredict 1.2.0 massively expand in-database prediction capabilities for tidymodels workflows. The release adds 27 new model/engine combinations including discriminant analysis, naive Bayes, neural networks, SVMs, partial least squares, and ensemble methods. tidypredict now functions as a developer toolkit with new generics for programmatic use, and improved error messaging guides users when probability predictions aren’t available.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-09_orbital-0-7-0/" target="_blank" rel="noopener">orbital 0.7.0</a> blog post.</li>
</ul>
<h3 id="ai-powered-r-tools">AI-powered R tools
</h3>
<h4 id="ellmer-050">ellmer 0.5.0
</h4>
<p><a href="https://ellmer.tidyverse.org/" target="_blank" rel="noopener">ellmer</a> makes it easy to use large language models (LLM) from R. ellmer 0.5.0 brings major improvements for working with large language models in R. New file handling functions reduce token costs by efficiently managing documents. The release adds citation tracking from web search tools, token counting for cost prediction, and streaming structured output support. Developer features include <code>tool_context()</code> for accessing request metadata and new lifecycle hooks for building agents.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-14_ellmer-0-5-0/" target="_blank" rel="noopener">ellmer 0.5.0</a> blog post.</li>
</ul>
<h4 id="vitals-040">vitals 0.4.0
</h4>
<p><a href="https://vitals.tidyverse.org/" target="_blank" rel="noopener">vitals</a> is a framework for large language model evaluation in R. vitals 0.4.0 brings significant performance improvements and new agent comparison capabilities for LLM evaluation in R. The release includes claude_code() and codex() helpers for benchmarking custom ellmer-built agents against leading coding agents, plus vitals_log_read() for loading log files back into resumable Chat objects. Log files are now ~4x smaller and the log viewer is substantially faster.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-03_vitals-0-4-0/" target="_blank" rel="noopener">vitals 0.4.0</a> blog post.</li>
</ul>
<h3 id="our-stuff-is-so-shiny">Our stuff is so Shiny
</h3>
<p>Check out all the major work done by the Shiny team in September!</p>
<h4 id="introducing-shinyreact-react-ui-backed-by-a-shiny-server">Introducing shinyreact: React UI backed by a Shiny server
</h4>
<p><a href="https://posit-dev.github.io/shinyreact/" target="_blank" rel="noopener">shinyreact</a> enables developers to build Shiny applications with React-based UIs while keeping Shiny’s reactive computation on the server. The package provides two primary React hooks for client-server communication, gives access to the entire npm ecosystem of React components, and includes AI Agent Skills for building and converting apps.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-30_introducing-shinyreact/" target="_blank" rel="noopener">Introducing shinyreact: React UI backed by a Shiny server </a> blog post.</li>
</ul>
<h4 id="shiny-for-python-18">Shiny for Python 1.8
</h4>
<p><a href="https://shiny.posit.co/py/" target="_blank" rel="noopener">Shiny for Python</a> 1.8 introduces in-memory server testing without browsers, enabling developers to test reactive logic with pytest using a mock connection. The release adds <code>ui.page_html()</code> for using complete HTML documents from bundlers like Vite, and <code>session.allow_reconnect()</code> to maintain live sessions after dropped websocket connections. Additional improvements include deprecation of <code>ui.output_text_verbatim()</code> in favor of clearer naming, reactive value destruction fixes, and multiple bug fixes for downloads, navsets, and data frames.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-22_shiny-python-1-8/" target="_blank" rel="noopener">Shiny for Python 1.8</a> blog post.</li>
</ul>
<h4 id="multiple-tables-saved-conversations-and-take-home-dashboards-querychat-r-040-and-python-090">Multiple tables, saved conversations, and take-home dashboards: querychat R 0.4.0 and Python 0.9.0
</h4>
<p><a href="https://posit-dev.github.io/querychat/" target="_blank" rel="noopener">querychat</a> facilitates safe and reliable natural language exploration of tabular data, powered by SQL and large language models (LLMs). querychat R 0.4.0 and Python 0.9.0 introduce multiple table support with automatic joins, persistent conversation history across sessions, and the <code>/handoff</code> command for exporting chats as downloadable Quarto dashboards, Shiny apps, or marimo notebooks. The release builds on shinychat’s full-page layout with editable messages and file attachments, adds YAML-based data dictionaries for context, and integrates with pins boards for chatting with pinned data.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/" target="_blank" rel="noopener">Multiple tables, saved conversations, and take-home dashboards: querychat R 0.4.0 and Python 0.9.0</a> blog post.</li>
</ul>
<h4 id="complete-chat-applications-in-shinychat-r-050-and-python-071">Complete chat applications in shinychat: R 0.5.0 and Python 0.7.1
</h4>
<p><a href="https://posit-dev.github.io/shinychat/" target="_blank" rel="noopener">shinychat</a> provides a Shiny toolkit for building generative AI applications like chatbots and streaming content. shinychat R 0.5.0 and Python 0.7.1 deliver complete chat application capabilities with conversation history, message editing and branching, greetings, file attachments, and slash commands. The new <code>page_chat()</code> layout provides full-window interfaces with integrated navigation, tool displays, citations, and artifact previews. Features include persistent conversation storage, search and organization tools, streaming responses with thinking panels, and toolbars for contextual actions.</p>
<ul>
<li>Read more in the <a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/" target="_blank" rel="noopener">Complete chat applications in shinychat: R 0.5.0 and Python 0.7.1</a> blog post.</li>
</ul>
<h2 id="positconf2027-will-be-in-seattle-wa-from-sept-13-15">posit::conf(2027) will be in Seattle, WA from Sept 13-15
</h2>
<p>Save the date: We&rsquo;re heading back to the Pacific Northwest for posit::conf(2027)! <a href="https://posit.co/about/subscription-management" target="_blank" rel="noopener">Subscribe to &ldquo;Events&rdquo;</a> to get notified when registration opens.</p>
<p>In the meantime, join us for our ongoing virtual events:</p>
<ul>
<li><a href="https://pos.it/dsh" target="_blank" rel="noopener">Data Science Hangout</a> for casual conversations with leaders in the data space</li>
<li><a href="https://pos.it/dslab" target="_blank" rel="noopener">Data Science Lab</a> for live coding sessions with practitioners building cool things with code</li>
</ul>
<p>Hope to see you there!</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-10-07_glimpse-10-2026/glimpse-conf.jpg" length="90759" type="image/jpeg" />
    </item>
    <item>
      <title>Introducing shinyreact: React UI backed by a Shiny server</title>
      <link>https://opensource.posit.co/blog/2026-09-30_introducing-shinyreact/</link>
      <pubDate>Wed, 30 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-30_introducing-shinyreact/</guid>
      <dc:creator>Barret Schloerke</dc:creator><description><![CDATA[<p>We&rsquo;re excited to introduce <a href="https://posit-dev.github.io/shinyreact/" target="_blank" rel="noopener">shinyreact</a>, a new package for R and Python. It lets you write the UI of a Shiny app in React, with any component library on npm, while reducing your Shiny server code to data-only logic.</p>
<p>shinyreact splits a Shiny app along a clean line. The Shiny server does reactive computation. The UI is a <a href="https://react.dev" target="_blank" rel="noopener">React</a> client that you own. shinyreact is the bridge between them, and it ships zero UI components of its own.</p>
<p>You can install it from CRAN or PyPI:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-1" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-1-1">R</a></li>
<li><a href="#tabset-1-2">Python</a></li>
</ul>
<div id="tabset-1-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">install.packages</span><span class="p">(</span><span class="s">&#34;shinyreact&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-1-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install shinyreact</span></span></code></pre></div></div>
</div>
</div>
<p>shinyreact is new, and so is the way of building Shiny apps it proposes. We intend to keep the API small, but expect it to evolve as we learn from early adopters.</p>
<h2 id="shiny--react">Shiny + React?
</h2>
<p>For most Shiny apps, defining the UI in your app.py or app.R file allows you to construct a complete, production-ready app in just a few lines of code.</p>
<p>The trouble starts when the design asks for something Shiny and <a href="https://rstudio.github.io/bslib/" target="_blank" rel="noopener">bslib</a> don&rsquo;t have: a unique layout, richer interaction, or a component from a non-Bootstrap design system. At that point, Shiny hasn&rsquo;t had the right tool for the job.</p>
<p>React is that tool, for three reasons:</p>
<ul>
<li><strong>Ecosystem.</strong> React is the most widely used UI library on the web. Design systems, charts, tables, and maps are all one <code>npm install</code> away.</li>
<li><strong>The right model.</strong> React components are functions of state, which fits Shiny&rsquo;s reactive model naturally. When the server sends new data, the UI re-renders efficiently.</li>
<li><strong>AI assistance.</strong> LLMs have trained on an enormous amount of React code. Ask a frontier agent for a UI and it will produce better React than it will bespoke Shiny UI. This aligns with Shiny&rsquo;s goal that app developers should never be required to write low-level HTML or JavaScript themselves.</li>
</ul>
<p>Later in the post, we&rsquo;ll discuss a genomics app that renders a 584,000-cell UMAP on the GPU from a plain Shiny server. First, the basics.</p>
<h2 id="old-faithful-with-shinyreact">Old Faithful with shinyreact
</h2>
<p>Here is the classic Old Faithful histogram app as a shinyreact app:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-2" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-2-1">R</a></li>
<li><a href="#tabset-2-2">Python</a></li>
</ul>
<div id="tabset-2-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">shiny</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">shinyreact</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Set up the page UI using shinyreact</span>
</span></span><span class="line"><span class="cl"><span class="n">ui</span> <span class="o">&lt;-</span> <span class="nf">page_react</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">server</span> <span class="o">&lt;-</span> <span class="kr">function</span><span class="p">(</span><span class="n">input</span><span class="p">,</span> <span class="n">output</span><span class="p">,</span> <span class="n">session</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="n">x</span> <span class="o">&lt;-</span> <span class="n">faithful</span><span class="o">$</span><span class="n">waiting</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="n">breaks</span> <span class="o">&lt;-</span> <span class="nf">reactive</span><span class="p">({</span>
</span></span><span class="line"><span class="cl">    <span class="nf">seq</span><span class="p">(</span><span class="nf">min</span><span class="p">(</span><span class="n">x</span><span class="p">),</span> <span class="nf">max</span><span class="p">(</span><span class="n">x</span><span class="p">),</span> <span class="n">length.out</span> <span class="o">=</span> <span class="n">input</span><span class="o">$</span><span class="n">bin_count</span> <span class="o">+</span> <span class="m">1</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">})</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="c1"># Use `reactive_output()` to send data to the client</span>
</span></span><span class="line"><span class="cl">  <span class="n">output</span><span class="o">$</span><span class="n">dist_data</span> <span class="o">&lt;-</span> <span class="nf">reactive_output</span><span class="p">({</span>
</span></span><span class="line"><span class="cl">    <span class="n">bins</span> <span class="o">&lt;-</span> <span class="nf">hist</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">breaks</span> <span class="o">=</span> <span class="nf">breaks</span><span class="p">(),</span> <span class="n">plot</span> <span class="o">=</span> <span class="kc">FALSE</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="nf">list</span><span class="p">(</span><span class="n">breaks</span> <span class="o">=</span> <span class="nf">I</span><span class="p">(</span><span class="n">bins</span><span class="o">$</span><span class="n">breaks</span><span class="p">),</span> <span class="n">counts</span> <span class="o">=</span> <span class="nf">I</span><span class="p">(</span><span class="n">bins</span><span class="o">$</span><span class="n">counts</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">  <span class="p">})</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">shinyApp</span><span class="p">(</span><span class="n">ui</span><span class="p">,</span> <span class="n">server</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-2-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
</span></span><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shiny.express</span> <span class="kn">import</span> <span class="nb">input</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shinyreact</span> <span class="kn">import</span> <span class="n">reactive_output</span><span class="p">,</span> <span class="n">set_react_page</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Set up the page UI using shinyreact</span>
</span></span><span class="line"><span class="cl"><span class="n">set_react_page</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">x</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="s2">&#34;faithful.csv&#34;</span><span class="p">)[</span><span class="s2">&#34;waiting&#34;</span><span class="p">]</span><span class="o">.</span><span class="n">to_numpy</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nd">@reactive_output</span>
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">dist_data</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">    <span class="n">breaks</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">linspace</span><span class="p">(</span><span class="n">x</span><span class="o">.</span><span class="n">min</span><span class="p">(),</span> <span class="n">x</span><span class="o">.</span><span class="n">max</span><span class="p">(),</span> <span class="nb">input</span><span class="o">.</span><span class="n">bin_count</span><span class="p">()</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="n">counts</span><span class="p">,</span> <span class="n">_</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">histogram</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">bins</span><span class="o">=</span><span class="n">breaks</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="k">return</span> <span class="p">{</span><span class="s2">&#34;breaks&#34;</span><span class="p">:</span> <span class="n">breaks</span><span class="o">.</span><span class="n">tolist</span><span class="p">(),</span> <span class="s2">&#34;counts&#34;</span><span class="p">:</span> <span class="n">counts</span><span class="o">.</span><span class="n">tolist</span><span class="p">()}</span></span></span></code></pre></div></div>
</div>
</div>
<p>Two things are different from a traditional Shiny app.</p>
<ol>
<li><strong>The UI is one line.</strong> <code>page_react()</code> (or <code>set_react_page()</code> in Shiny Express) serves the React client that lives in your app&rsquo;s <code>www/</code> directory. There&rsquo;s no <code>sliderInput()</code> or <code>plotOutput()</code>. The <code>www/</code> directory contains the static assets for the React app: <code>ui.js</code> and <code>ui.css</code> (when available).</li>
<li><strong>The output is data.</strong> <code>reactive_output()</code> has no matching UI function. This is a new concept for the Shiny ecosystem! <code>renderPlot()</code> sends an image for <code>plotOutput()</code> to place. <code>reactive_output()</code> sends plain JSON, here the histogram&rsquo;s <code>breaks</code> and <code>counts</code>. Like any render function, <code>reactive_output()</code> re-executes each time its reactive dependencies change. The server sends facts and React decides how to present them.</li>
</ol>
<p>Now the client:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-tsx" data-lang="tsx"><span class="line"><span class="cl"><span class="c1">// src/ui.tsx (which compiles to www/ui.js)
</span></span></span><span class="line"><span class="cl"><span class="kd">function</span> <span class="nx">App() {</span>
</span></span><span class="line"><span class="cl">  <span class="kr">const</span> <span class="p">[</span><span class="nx">binCount</span><span class="p">,</span> <span class="nx">setBinCount</span><span class="p">]</span> <span class="o">=</span> <span class="nx">useShinyInput</span><span class="p">(</span><span class="s2">&#34;bin_count&#34;</span><span class="p">,</span> <span class="mi">30</span><span class="p">);</span>
</span></span><span class="line"><span class="cl">  <span class="kr">const</span> <span class="nx">bins</span> <span class="o">=</span> <span class="nx">useShinyOutputValue</span><span class="p">(</span><span class="s2">&#34;dist_data&#34;</span><span class="p">,</span> <span class="kc">null</span><span class="p">);</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="k">return</span> <span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="p">&lt;</span><span class="nt">main</span> <span class="na">className</span><span class="o">=</span><span class="s">&#34;layout&#34;</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">      <span class="p">&lt;</span><span class="nt">label</span> <span class="na">htmlFor</span><span class="o">=</span><span class="s">&#34;bin_count&#34;</span><span class="p">&gt;</span><span class="nb">Number</span> <span class="k">of</span> <span class="nx">bins</span><span class="o">:</span><span class="p">&lt;/</span><span class="nt">label</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">      <span class="p">&lt;</span><span class="nt">input</span>
</span></span><span class="line"><span class="cl">        <span class="na">id</span><span class="o">=</span><span class="s">&#34;bin_count&#34;</span>
</span></span><span class="line"><span class="cl">        <span class="na">type</span><span class="o">=</span><span class="s">&#34;range&#34;</span>
</span></span><span class="line"><span class="cl">        <span class="na">min</span><span class="o">=</span><span class="p">{</span><span class="mi">1</span><span class="p">}</span>
</span></span><span class="line"><span class="cl">        <span class="na">max</span><span class="o">=</span><span class="p">{</span><span class="mi">50</span><span class="p">}</span>
</span></span><span class="line"><span class="cl">        <span class="na">value</span><span class="o">=</span><span class="p">{</span><span class="nx">binCount</span><span class="p">}</span>
</span></span><span class="line"><span class="cl">        <span class="na">onChange</span><span class="o">=</span><span class="p">{(</span><span class="nx">e</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="nx">setBinCount</span><span class="p">(</span><span class="nb">Number</span><span class="p">(</span><span class="nx">e</span><span class="p">.</span><span class="nx">target</span><span class="p">.</span><span class="nx">value</span><span class="p">))}</span>
</span></span><span class="line"><span class="cl">      <span class="p">/&gt;</span>
</span></span><span class="line"><span class="cl">      <span class="p">&lt;</span><span class="nt">Histogram</span> <span class="na">bins</span><span class="o">=</span><span class="p">{</span><span class="nx">bins</span><span class="p">}</span> <span class="p">/&gt;</span>
</span></span><span class="line"><span class="cl">    <span class="p">&lt;/</span><span class="nt">main</span><span class="p">&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="p">);</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div>
<figure>
<img src="https://opensource.posit.co/blog/2026-09-30_introducing-shinyreact/hello-app.gif" data-fig-alt="A Shiny app with a range slider labeled Number of bins on the left and a histogram of Old Faithful waiting times on the right. As the slider moves from 30 to 8, 45, 20, and back to 30, the histogram redraws with that many bars and the caption updates to match." alt="The Old Faithful app: dragging the bin-count slider re-renders the histogram as the server sends new breaks and counts." />
<figcaption aria-hidden="true">The Old Faithful app: dragging the bin-count slider re-renders the histogram as the server sends new breaks and counts.</figcaption>
</figure>
<p>If you&rsquo;ve written React before, this is an ordinary component. <code>Histogram</code> is whatever you like: a hand-written SVG, a charting library, or a component from your design system. The only shinyreact-specific parts are two hooks:</p>
<ul>
<li><code>useShinyInput()</code> works like React&rsquo;s <code>useState()</code>, except that the value is also sent to the server as <code>input$bin_count</code> (or <code>input.bin_count()</code> in Python). Calling <code>setBinCount()</code> updates the UI and triggers the server&rsquo;s reactive graph.</li>
<li><code>useShinyOutputValue()</code> reads the value of a <code>reactive_output()</code>. When the server recomputes <code>dist_data</code>, the component re-renders with the new data.</li>
</ul>
<p>Those two hooks cover the vast majority of apps.</p>
<h2 id="ids-and-json-are-the-contract">IDs and JSON are the contract
</h2>
<p>The client and server share exactly two things: IDs and JSON values. If you write the client in TypeScript, each hook takes an optional type for its value, such as <code>useShinyInput&lt;number&gt;(&quot;bin_count&quot;, 30)</code>, and your editor will then flag a mismatch that <code>Shiny.setInputValue()</code> never could.</p>
<p>Here is the full round trip for the Old Faithful app:</p>
<ol>
<li>The client calls <code>useShinyInput(&quot;bin_count&quot;, 30)</code>, which sends <code>{&quot;bin_count&quot;: 30}</code> to the server.</li>
<li>The server reads <code>input$bin_count</code>, runs its reactive graph, and computes <code>dist_data</code> using <code>reactive_output()</code>.</li>
<li>The client receives the <code>dist_data</code> result as <code>{&quot;dist_data&quot;: {&quot;breaks&quot;: [...], &quot;counts&quot;: [...]}}</code>, and <code>useShinyOutputValue(&quot;dist_data&quot;)</code> hands it to React.</li>
</ol>
<p>That narrow boundary is what makes a shinyreact app easy to reason about. The server doesn&rsquo;t know or care how the histogram is drawn, and the client doesn&rsquo;t know how the bins are computed. Each side can be reviewed, tested, and rewritten independently, whether a person or an agent wrote it.</p>
<p>When you need more, a few other hooks are available. <code>useShinyOutputStatus()</code> tells you when an output is recalculating so you can show a skeleton, and <code>useShinyMessageHandler()</code> receives one-off messages pushed from the server with <code>send_message()</code>. See the <a href="https://posit-dev.github.io/shinyreact/js/" target="_blank" rel="noopener">JavaScript API reference</a> for the full list.</p>
<h2 id="you-dont-have-to-write-the-react-yourself">You don&rsquo;t have to write the React yourself
</h2>
<p>A fair reaction to all of this is, &ldquo;but I chose Shiny so I wouldn&rsquo;t have to write JavaScript!&rdquo;. That&rsquo;s still the goal. What&rsquo;s changed is that today&rsquo;s AI agents are very good at writing React, far better than they are at writing custom Shiny UI, because there is so much more React in the world for them to learn from.</p>
<p>With shinyreact, your job is to own the server, which is where your data and domain logic live, and to describe and review the UI. To make that concrete, both packages ship <a href="https://posit-dev.github.io/shinyreact/articles/agent-skills.html" target="_blank" rel="noopener">Agent Skills</a>:</p>
<ul>
<li><strong><code>shinyreact-build-app</code></strong> scaffolds a new shinyreact app from a description.</li>
<li><strong><code>shinyreact-convert-app</code></strong> opens an existing Shiny app in a browser, describes what it does in plain English, and then rewrites the UI in React against the same server.</li>
</ul>
<p>The day-to-day loop is familiar. You edit <code>src/ui.tsx</code> (or ask an agent to), the build step writes <code>www/ui.js</code>, and you reload the running Shiny app to see the change. The server side is unchanged: <code>runApp()</code> or <code>shiny run</code>, exactly as before.</p>
<p>Node.js isn&rsquo;t required, since a client can be a single <code>www/ui.js</code> file with no build step. However, we do strongly recommend it as it gives you a proper development environment: a build step gets you TypeScript, linting, and formatting.</p>
<h2 id="keep-what-you-already-have">Keep what you already have
</h2>
<p>shinyreact doesn&rsquo;t ask you to throw away the rest of the Shiny ecosystem.</p>
<ul>
<li><strong>Existing outputs.</strong> <code>renderPlotly()</code>, <code>render.data_frame</code>, and other render functions work as before. Drop a <code>&lt;ShinyOutput id=&quot;...&quot; /&gt;</code> into your React tree, and the output&rsquo;s JavaScript and CSS dependencies are delivered automatically.</li>
<li><strong>Modules.</strong> <code>ShinyModuleProvider</code> namespaces hook IDs to match a server-side module.</li>
<li><strong>Bookmarking.</strong> URL and server bookmarking seed the initial values of <code>useShinyInput()</code>.</li>
</ul>
<h2 id="testing-at-every-layer">Testing at every layer
</h2>
<p>Because the client and server only share IDs and JSON, each layer can be tested on its own. The server is the layer most Shiny developers care about, and it needs no browser at all. Use <code>shiny::testServer()</code> in R, or the new <code>local_server</code> pytest fixture in <a href="https://opensource.posit.co/blog/2026-09-22_shiny-python-1-8">Shiny for Python 1.8</a>: set inputs and assert on the JSON that comes out.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">test_histogram</span><span class="p">(</span><span class="n">local_server</span><span class="p">):</span>
</span></span><span class="line"><span class="cl">    <span class="n">local_server</span><span class="o">.</span><span class="n">set_inputs</span><span class="p">(</span><span class="n">bin_count</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="n">data</span> <span class="o">=</span> <span class="n">local_server</span><span class="o">.</span><span class="n">get_output</span><span class="p">(</span><span class="s2">&#34;dist_data&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="s2">&#34;counts&#34;</span><span class="p">])</span> <span class="o">==</span> <span class="mi">10</span></span></span></code></pre></div></div>
<p>The other layers have their own tools:</p>
<ul>
<li><strong>The client.</strong> Ordinary JavaScript unit tests, with whichever test runner you (or your agent) prefer.</li>
<li><strong>The wire.</strong> <code>wire_tap()</code> for <a href="https://rstudio.github.io/shinytest2/" target="_blank" rel="noopener">shinytest2</a> and <code>WireTap</code> for Playwright record the JSON crossing the websocket during a browser test. That gives you an end-to-end assertion on what the client actually sent and what the server actually returned, without reaching into the rendered DOM.</li>
<li><strong>The behavior.</strong> Each example app ships a <code>FEATURES.md</code>: a nested list where every leaf is one checkable claim about the app, written in plain English. A person can read it as a spec, and an agent with a browser can walk it and turn each claim into a deterministic check against the running app.</li>
</ul>
<p>The <a href="https://posit-dev.github.io/shinyreact/articles/testing.html" target="_blank" rel="noopener">testing article</a> covers all of them.</p>
<h2 id="in-the-wild-plotomics-live">In the wild: Plotomics Live
</h2>
<p>Over the summer, Shiny intern <a href="https://www.samuelbharti.com" target="_blank" rel="noopener">Samuel Bharti</a> built a <a href="https://posit-shiny-showcase-bioinformatics.share.connect.posit.cloud/" target="_blank" rel="noopener">collection of bioinformatics Shiny apps</a>. Most of them are plain Shiny and bslib. The one that reached for shinyreact did so because the visualizations demanded it.</p>
<p><a href="https://posit-plotomics-live.share.connect.posit.cloud/" target="_blank" rel="noopener">Plotomics Live</a> (<a href="https://github.com/samuelbharti/plotomics-live" target="_blank" rel="noopener">source</a>, <a href="https://doi.org/10.5281/zenodo.21936926" target="_blank" rel="noopener">DOI</a>) is a 26-page gallery of GPU-accelerated genomics visualizations, from oncoplots to a one-million-point Xenium spatial view and an interactive 584,000-cell UMAP. Large data skips JSON entirely and moves as compact binary typed arrays straight to the GPU. Because React owns the component, a new selection updates the data in place without re-mounting the visualization or reallocating GPU buffers.</p>
<p><video controls autoplay loop muted playsinline src="https://opensource.posit.co/blog/2026-09-30_introducing-shinyreact/plotomics-live.mp4" class="w-full border rounded" title="Plotomics Live: one million Xenium detections rendered with WebGL, with hover tooltips and a legend of marker classes"></video></p>
<p>In Samuel&rsquo;s words:</p>
<blockquote>
<p>R stays the analysis engine, React becomes the visualization layer, and shinyreact removes the custom JavaScript bindings, manual message passing, and serialization code that used to sit between them.</p>
</blockquote>
<h2 id="whats-next">What&rsquo;s next
</h2>
<p>We&rsquo;re working on two directions next:</p>
<ul>
<li><strong>Embedding React components in existing apps</strong>, so you can adopt shinyreact one piece at a time without porting a whole app.</li>
<li><strong>Wrapping shinyreact in your own package</strong>, so you can build a component once and ship it the way bslib ships its components.</li>
</ul>
<h2 id="learn-more">Learn more
</h2>
<ul>
<li>Documentation: <a href="https://posit-dev.github.io/shinyreact/" target="_blank" rel="noopener">posit-dev.github.io/shinyreact</a></li>
<li>Source and example apps: <a href="https://github.com/posit-dev/shinyreact" target="_blank" rel="noopener">github.com/posit-dev/shinyreact</a></li>
<li>posit::conf(2026) talk slides: <a href="https://schloerke.com/presentation-2026-09-15-posit-conf-shinyreact/" target="_blank" rel="noopener">Beyond Bootstrap: Building Custom Shiny UI with React</a></li>
</ul>
<p>Give shinyreact a try, and please <a href="https://github.com/posit-dev/shinyreact/issues" target="_blank" rel="noopener">let us know</a> what you build and what breaks.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-30_introducing-shinyreact/feature.png" length="310650" type="image/png" />
    </item>
    <item>
      <title>Multiple tables, saved conversations, and take-home dashboards: querychat R 0.4.0 and Python 0.9.0</title>
      <link>https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/</link>
      <pubDate>Tue, 29 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/</guid>
      <dc:creator>Carson Sievert</dc:creator>
      <dc:creator>Garrick Aden-Buie</dc:creator><description><![CDATA[<p>I&rsquo;m thrilled to share the latest <a href="https://posit-dev.github.io/querychat" target="_blank" rel="noopener">querychat</a> release for both R (v0.4.0) and Python (v0.9.0).
Grab the latest from CRAN or PyPI:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-1" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-1-1">R</a></li>
<li><a href="#tabset-1-2">Python</a></li>
</ul>
<div id="tabset-1-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">install.packages</span><span class="p">(</span><span class="s">&#34;querychat&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-1-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install -U querychat</span></span></code></pre></div></div>
</div>
</div>
<p>This release adds several headline features, including support for multiple tables, <code>data-dict.yml</code>, a full-page chat layout, support for pins, and a new <code>/handoff</code> command.
It also builds on <a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1">shinychat&rsquo;s recent momentum</a>.
As a result, querychat gets chat features like history and file attachments basically for free.
<code>querychat_app()</code> provides a quick and useful way to start chatting with data and getting bespoke <a href="https://opensource.posit.co/blog/2026-06-17_querychat-ggsql">ggsql visualizations</a>, and it now uses shinychat&rsquo;s <code>page_chat()</code> for a full chat app experience.</p>
<p>See the <a href="https://github.com/posit-dev/querychat/blob/main/pkg-r/NEWS.md" target="_blank" rel="noopener">R release notes</a> and the <a href="https://github.com/posit-dev/querychat/blob/main/pkg-py/CHANGELOG.md" target="_blank" rel="noopener">Python changelog</a> for the complete list, including <a href="#a-few-changes-for-existing-apps">a few changes for existing apps</a> if you&rsquo;re upgrading.</p>
<h2 id="full-page-chat-layout">Full-page chat layout
</h2>
<p><code>querychat_app()</code> / <code>QueryChat.app()</code> now put the chat front and center (built on shinychat&rsquo;s <code>page_chat()</code>), leaving more breathing room for things you create within the chat.</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-2" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-2-1">R</a></li>
<li><a href="#tabset-2-2">Python</a></li>
</ul>
<div id="tabset-2-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">palmerpenguins</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">querychat_app</span><span class="p">(</span><span class="n">penguins</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-2-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">querychat</span> <span class="kn">import</span> <span class="n">QueryChat</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">palmerpenguins</span> <span class="kn">import</span> <span class="n">load_penguins</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">qc</span> <span class="o">=</span> <span class="n">QueryChat</span><span class="p">(</span><span class="n">load_penguins</span><span class="p">(),</span> <span class="s2">&#34;penguins&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">qc</span><span class="o">.</span><span class="n">app</span><span class="p">()</span></span></span></code></pre></div></div>
</div>
</div>
<script src="https://fast.wistia.com/player.js" async></script>
<script src="https://fast.wistia.com/embed/xe4aalo9yw.js" async type="module"></script>
<style>wistia-player[media-id='xe4aalo9yw']:not(:defined) { background: center / contain no-repeat url('https://fast.wistia.com/embed/medias/xe4aalo9yw/swatch'); display: block; filter: blur(5px); padding-top:75.21%; }</style>
<p><wistia-player media-id="xe4aalo9yw" aspect="1.3296296296296297"></wistia-player></p>
<p>A view of the actual data is always accessible via the data source drawer on the right-hand side.
In the case of <a href="#multiple-tables">multiple tables</a>, you&rsquo;ll see the active table<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>, as well as other available tables below it.</p>
<img src="https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/multi-table.png" alt="A view of QueryChat.app() with the data source drawer opened." class="shadow rounded" />
<p>The new <code>page()</code> method brings this same full-page chat layout to your own apps.
Your users get the chat front and center, and you can still add custom views on other <code>pages</code>, in the <code>drawer</code>, or in the <code>sidebar</code>.</p>
<p>Learn more about <a href="https://posit-dev.github.io/querychat/r/articles/build.html" target="_blank" rel="noopener">building custom apps in R</a> and <a href="https://posit-dev.github.io/querychat/py/build.html" target="_blank" rel="noopener">Python</a>.</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-3" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-3-1">R</a></li>
<li><a href="#tabset-3-2">Python</a></li>
</ul>
<div id="tabset-3-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">qc</span> <span class="o">&lt;-</span> <span class="n">QueryChat</span><span class="o">$</span><span class="nf">new</span><span class="p">(</span><span class="n">penguins</span><span class="p">,</span> <span class="s">&#34;penguins&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">ui</span> <span class="o">&lt;-</span> <span class="n">qc</span><span class="o">$</span><span class="nf">page</span><span class="p">(</span><span class="s">&#34;Penguins Explorer&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-3-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">querychat.express</span> <span class="kn">import</span> <span class="n">QueryChat</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">palmerpenguins</span> <span class="kn">import</span> <span class="n">load_penguins</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">qc</span> <span class="o">=</span> <span class="n">QueryChat</span><span class="p">(</span><span class="n">load_penguins</span><span class="p">(),</span> <span class="s2">&#34;penguins&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">qc</span><span class="o">.</span><span class="n">page</span><span class="p">(</span><span class="s2">&#34;Penguins Explorer&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
</div>
<h2 id="conversation-history">Conversation history
</h2>
<p>Another major improvement is persistent conversation history (<a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1#return-to-earlier-conversations">mostly thanks to shinychat</a>).
In addition to starting new chats and returning to previous ones, conversations now persist across page reloads and timeouts.
As a result, it is now much more difficult to lose your progress.</p>
<img src="https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/history.png" alt="A view of QueryChat.app() with the history sidebar opened." class="shadow rounded" />
<p>Also, now that shinychat supports <a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1#edit-a-message-and-compare-answers">editable messages</a>, <a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1#stream-responses-and-show-thinking">canceling responses</a>, <a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1#attach-files">file attachments</a>, and more, querychat does too.</p>
<h2 id="multiple-tables">Multiple tables
</h2>
<p>querychat now supports multiple tables in a single chat instance.
If those tables reside in a singular source, like a database, you can add them all in one fell swoop with the <code>add_tables()</code> method.</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-4" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-4-1">R</a></li>
<li><a href="#tabset-4-2">Python</a></li>
</ul>
<div id="tabset-4-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">querychat</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">qc</span> <span class="o">&lt;-</span> <span class="n">QueryChat</span><span class="o">$</span><span class="nf">new</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"><span class="n">qc</span><span class="o">$</span><span class="nf">add_tables</span><span class="p">(</span><span class="n">db</span><span class="p">,</span> <span class="nf">c</span><span class="p">(</span><span class="s">&#34;customers&#34;</span><span class="p">,</span> <span class="s">&#34;orders&#34;</span><span class="p">,</span> <span class="s">&#34;order_items&#34;</span><span class="p">))</span></span></span></code></pre></div></div>
</div>
<div id="tabset-4-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">querychat</span> <span class="kn">import</span> <span class="n">QueryChat</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">qc</span> <span class="o">=</span> <span class="n">QueryChat</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"><span class="n">qc</span><span class="o">.</span><span class="n">add_tables</span><span class="p">(</span><span class="n">db</span><span class="p">,</span> <span class="p">[</span><span class="s2">&#34;customers&#34;</span><span class="p">,</span> <span class="s2">&#34;orders&#34;</span><span class="p">,</span> <span class="s2">&#34;order_items&#34;</span><span class="p">])</span></span></span></code></pre></div></div>
</div>
</div>
<p>querychat&rsquo;s query and visualization tools handle joins across these tables, so a single question can span all of them.
To write a query like the one below, the LLM first needs to know what&rsquo;s in each table: column names, types, and value ranges.
So it starts by fetching the schema of each table it needs (&ldquo;Fetch schemas&rdquo;), then generates the query with that metadata in mind.</p>
<img src="https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/cross-join.png" alt="A chat asking for average order value by acquisition channel. The LLM fetches schemas for the customers, orders, and order_items tables, then runs a SQL query that joins all three." class="shadow rounded" />
<p>In a custom app, the new <code>table()</code> method gives your server code reactive access to any table, including whatever filters the LLM has applied to it.
That means you can keep building your own plots and views in Shiny, and your users can drive them just by chatting.</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-5" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-5-1">R</a></li>
<li><a href="#tabset-5-2">Python</a></li>
</ul>
<div id="tabset-5-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">output</span><span class="o">$</span><span class="n">order_price</span> <span class="o">&lt;-</span> <span class="nf">renderPlot</span><span class="p">({</span>
</span></span><span class="line"><span class="cl">  <span class="n">orders_tbl</span> <span class="o">&lt;-</span> <span class="n">qc</span><span class="o">$</span><span class="nf">table</span><span class="p">(</span><span class="s">&#34;orders&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="c1"># LLM can perform filter queries on $df()</span>
</span></span><span class="line"><span class="cl">  <span class="n">orders_df</span> <span class="o">&lt;-</span> <span class="n">orders_tbl</span><span class="o">$</span><span class="nf">df</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">  <span class="nf">hist</span><span class="p">(</span><span class="n">orders_df</span><span class="o">$</span><span class="n">price</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">})</span></span></span></code></pre></div></div>
</div>
<div id="tabset-5-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="nd">@render.plot</span>
</span></span><span class="line"><span class="cl"><span class="k">def</span> <span class="nf">_</span><span class="p">():</span>
</span></span><span class="line"><span class="cl">  <span class="n">orders_tbl</span> <span class="o">=</span> <span class="n">qc</span><span class="o">.</span><span class="n">table</span><span class="p">(</span><span class="s2">&#34;orders&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="c1"># LLM can perform filter queries on .df()</span>
</span></span><span class="line"><span class="cl">  <span class="n">orders_df</span> <span class="o">=</span> <span class="n">orders_tbl</span><span class="o">.</span><span class="n">df</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">  <span class="n">plt</span><span class="o">.</span><span class="n">hist</span><span class="p">(</span><span class="n">orders_df</span><span class="p">[</span><span class="s2">&#34;price&#34;</span><span class="p">])</span></span></span></code></pre></div></div>
</div>
</div>
<h2 id="provide-context-data-dict">Provide context: <code>data-dict</code>
</h2>
<p>querychat does its best to gather context from the data itself.
When the LLM fetches a table&rsquo;s schema, it gets whatever metadata querychat can compute from the data.
That&rsquo;s a good start, but in practice it often isn&rsquo;t enough.
Column names can be cryptic, coded values need decoding, and nothing in the data says what &ldquo;active customer&rdquo; means to your business or how tables relate.
In the <a href="#multiple-tables">example above</a>, the LLM had to infer from column names alone that <code>orders.customer_id</code> points to <code>customers.id</code>.</p>
<p>A <strong>data dictionary</strong> is how you fill in what the data can&rsquo;t say about itself.
It&rsquo;s a YAML file that follows the <a href="https://data-dict.tidyverse.org/" target="_blank" rel="noopener">data-dict</a> spec.
Alongside plain-English descriptions, it has its own fields for column types, allowed values, keys, and the relationships between tables.
This is now the preferred way to describe your data:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">tables</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">customers</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">One row per customer.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">columns</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">acquisition_channel</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">enum</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">values</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">organic, paid_search, social, referral]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">How the customer first found us.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">orders</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">One row per order.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">columns</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">customer_id</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">number(id)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">constraints</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">foreign_key]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">order_items</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">One row per item in an order.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">columns</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">price</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">number(quantity)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">Item price in USD.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">relationships</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">Each order belongs to one customer.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">cardinality</span><span class="p">:</span><span class="w"> </span><span class="l">many-to-one</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">join</span><span class="p">:</span><span class="w"> </span><span class="l">orders.customer_id = customers.id</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="l">Each order has one or more items.</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">cardinality</span><span class="p">:</span><span class="w"> </span><span class="l">many-to-one</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">join</span><span class="p">:</span><span class="w"> </span><span class="l">order_items.order_id = orders.id</span></span></span></code></pre></div></div>
<p>Pass it in as <code>data_dict = &quot;dictionary.yml&quot;</code> (R) / <code>data_dict=&quot;dictionary.yml&quot;</code> (Python).
When the LLM fetches a table&rsquo;s schema, any column you&rsquo;ve documented comes straight from your dictionary, with nothing left to infer.
querychat only computes metadata from the data for the columns your dictionary doesn&rsquo;t cover.</p>
<h2 id="extract-insights-handoff">Extract insights: <code>/handoff</code>
</h2>
<p>Over the course of a conversation, querychat tends to produce a pile of results, some more useful than others.
The useful ones deserve to live on in a reproducible artifact that doesn&rsquo;t depend on the chat app.</p>
<p>That&rsquo;s the idea behind the new <strong><code>/handoff</code></strong> slash command.
It&rsquo;s available in every querychat app, with no setup required.
When a user types <code>/handoff</code> into the chat input, a wizard opens where they select the results that matter, choose an output format (e.g., Quarto, marimo, Shiny, Jupyter), and add any presentation instructions for the LLM to follow when it generates the handoff document.</p>
<img src="https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/handoff-wizard.png" alt="The handoff wizard" class="shadow rounded" />
<p>When the user finishes the wizard, the handoff document&rsquo;s source code streams into a code editor, where they can revise it by hand or with AI assistance.
A download button then gives them a zip bundle with the handoff document, a README file, and the data sources (if they&rsquo;re small enough).</p>
<img src="https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/handoff-download.png" alt="The handoff editor" class="shadow rounded" />
<h2 id="chat-with-pinned-data">Chat with pinned data
</h2>
<p>querychat can now chat with data pinned to a <a href="https://pins.rstudio.com/" target="_blank" rel="noopener">pins</a> board.
Pass the board and the pin name, and querychat reads the pin (parquet, CSV, JSON, RDS, and more) and uses its title, description, and tags as the starting data description:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-6" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-6-1">R</a></li>
<li><a href="#tabset-6-2">Python</a></li>
</ul>
<div id="tabset-6-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">pins</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">querychat</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">board</span> <span class="o">&lt;-</span> <span class="nf">board_connect</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">querychat_app</span><span class="p">(</span><span class="n">board</span><span class="p">,</span> <span class="s">&#34;my_pin&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-6-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install <span class="s2">&#34;querychat[pins]&#34;</span></span></span></code></pre></div></div>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">import</span> <span class="nn">pins</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">querychat</span> <span class="kn">import</span> <span class="n">QueryChat</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">board</span> <span class="o">=</span> <span class="n">pins</span><span class="o">.</span><span class="n">board_connect</span><span class="p">()</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">qc</span> <span class="o">=</span> <span class="n">QueryChat</span><span class="p">(</span><span class="n">board</span><span class="p">,</span> <span class="s2">&#34;my_pin&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">qc</span><span class="o">.</span><span class="n">app</span><span class="p">()</span></span></span></code></pre></div></div>
</div>
</div>
<p>For more control, such as setting the table name used in SQL, use the new <code>PinSource</code> class directly.
Multiple pins, or pins mixed with ordinary data frames, also work together in one chat.
Everything is materialized into a shared DuckDB connection behind the scenes, so the LLM can join and filter across all of it.
See the <a href="https://posit-dev.github.io/querychat/r/articles/data-sources.html" target="_blank" rel="noopener">data sources guide for R</a> and <a href="https://posit-dev.github.io/querychat/py/data-sources.html" target="_blank" rel="noopener">Python</a> for details.</p>
<h2 id="a-few-changes-for-existing-apps">A few changes for existing apps
</h2>
<p>This release also includes a handful of breaking changes, mostly around how querychat manages connections and bookmarking now that history is built in.
If you&rsquo;re upgrading, skim the <a href="https://github.com/posit-dev/querychat/blob/main/pkg-r/NEWS.md" target="_blank" rel="noopener">R NEWS</a> or <a href="https://github.com/posit-dev/querychat/blob/main/pkg-py/CHANGELOG.md" target="_blank" rel="noopener">Python CHANGELOG</a> breaking-changes sections before you do.</p>
<h2 id="learn-more">Learn more
</h2>
<ul>
<li><a href="https://posit-dev.github.io/querychat/py/" target="_blank" rel="noopener">querychat documentation</a> (<a href="https://posit-dev.github.io/querychat/r/" target="_blank" rel="noopener">R</a>) &mdash; full guides on data sources, context, tools, and deployment</li>
<li><a href="https://data-dict.tidyverse.org/" target="_blank" rel="noopener">data-dict</a> &mdash; the data dictionary spec querychat now reads</li>
<li><a href="https://ggsql.org" target="_blank" rel="noopener">ggsql</a> &mdash; the grammar of graphics for SQL that powers querychat&rsquo;s visualizations</li>
<li><a href="https://posit-dev.github.io/shinychat/py/" target="_blank" rel="noopener">shinychat</a> (<a href="https://posit-dev.github.io/shinychat/r/" target="_blank" rel="noopener">R</a>) &mdash; the chat UI toolkit querychat builds on</li>
<li><a href="https://posit-dev.github.io/chatlas/" target="_blank" rel="noopener">chatlas</a> (<a href="https://ellmer.tidyverse.org" target="_blank" rel="noopener">ellmer</a>) &mdash; the underlying LLM tool-calling libraries</li>
<li><a href="https://github.com/posit-dev/querychat" target="_blank" rel="noopener">Source on GitHub</a> &mdash; issues, discussions, and contributions welcome</li>
</ul>
<h2 id="acknowledgements">Acknowledgements
</h2>
<p>We thank everyone who contributed to these releases, for opening issues, submitting pull requests, and providing feedback:
<a href="https://github.com/gadenbuie" target="_blank" rel="noopener">@gadenbuie</a>,
<a href="https://github.com/hadley" target="_blank" rel="noopener">@hadley</a>,
<a href="https://github.com/iainwallacebms" target="_blank" rel="noopener">@iainwallacebms</a>,
<a href="https://github.com/iamYannC" target="_blank" rel="noopener">@iamYannC</a>,
<a href="https://github.com/jnhyeon" target="_blank" rel="noopener">@jnhyeon</a>,
<a href="https://github.com/kolabearafk" target="_blank" rel="noopener">@kolabearafk</a>, and
<a href="https://github.com/thisisnic" target="_blank" rel="noopener">@thisisnic</a>.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>By default, the active table is the first one supplied.
However, if the LLM is prompted to show a filtered/sorted view of a table, then that table becomes active (and the drawer will automatically open).&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-29_querychat-tables-handoff/featured.png" length="227292" type="image/png" />
    </item>
    <item>
      <title>AI Newsletter: New releases from ellmer, shinychat, and commons</title>
      <link>https://opensource.posit.co/blog/2026-09-18_ai-newsletter/</link>
      <pubDate>Fri, 18 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-18_ai-newsletter/</guid>
      <dc:creator>Sara Altman</dc:creator>
      <dc:creator>Simon Couch</dc:creator><description><![CDATA[<div class="callout callout-tip" role="note" aria-label="Tip">
<div class="callout-header">
<span class="callout-title"><strong>Subscribe to the AI Newsletter!</strong></span>
</div>
<div class="callout-body">
<p>The AI newsletter is published as an RSS feed. Follow it in your favorite reader:</p>
<p><a href="https://opensource.posit.co/tags/ai-newsletter/index.xml" target="_blank" rel="noopener noreferrer" class="btn-shortcode inline-flex mb-5 mr-5 items-center px-4 py-3 text-sm leading-5 gap-2 rounded-lg bg-blue-400 !text-white font-semibold align-middle hover:bg-blue-500 transition no-underline">Subscribe via RSS</a></p>
<p><strong>Want the newsletter as an email?</strong> Paste the feed URL, <a href="https://opensource.posit.co/tags/ai-newsletter/index.xml" target="_blank" rel="noopener">https://opensource.posit.co/tags/ai-newsletter/index.xml</a>, into a free RSS-to-email service such as <a href="https://blogtrottr.com/" target="_blank" rel="noopener">Blogtrottr</a>, <a href="https://feedrabbit.com/" target="_blank" rel="noopener">Feedrabbit</a>, or <a href="https://follow.it/" target="_blank" rel="noopener">Follow.it</a>, and each new issue will arrive in your inbox.</p>
</div>
</div>
<p>Last week, three packages in Posit&rsquo;s open-source AI stack shipped significant releases. We introduced commons 0.1.0, and ellmer and shinychat both received substantial updates. These releases are part of a broader effort to make it as easy as possible to build modern chat applications in R and Python.</p>
<p>In this newsletter, we&rsquo;ll take a quick tour of what&rsquo;s new.</p>
<h2 id="introducing-commons">Introducing commons
</h2>
<p><strong>commons, a new framework for building trustworthy self-service data analysis agents in R and Python, is now on CRAN.</strong> Read the full announcement <a href="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0">here</a>.</p>
<p>The Python package is currently in a pre-release beta stage, with more features arriving over the next few weeks.</p>
<p>If you&rsquo;re a data analyst, data scientist, statistical programmer, or other data practitioner, you likely have extensive domain knowledge and a collection of <em>trusted code</em> that you already use in analyses, apps, reports, and packages. The core idea behind commons is that we can leverage this trusted code to improve an agent&rsquo;s correctness.</p>
<p>A commons agent first searches for a trusted calculation. If it finds one that can answer the user&rsquo;s question, it can run that vetted code and the answer is deterministically marked as verified.</p>
<img src="https://opensource.posit.co/blog/2026-09-18_ai-newsletter/images/commons-01-traffic-trend.gif" title="A commons agent answering a question with a trusted calculation." data-fig-alt="A commons agent answers how site traffic is trending by finding and running a trusted calculation. The resulting chart and answer are marked as verified." />
<p>If it doesn&rsquo;t find a trusted calculation, the agent searches trusted context before writing custom R, Python, or SQL. The answer is either given a citation or marked as &ldquo;untrusted,&rdquo; depending on whether the agent provides a verified citation that supports its approach.</p>
<p>The model doesn&rsquo;t decide how trustworthy its answer is. commons assigns each label deterministically based on the analysis path taken by the agent.</p>
<img src="https://opensource.posit.co/blog/2026-09-18_ai-newsletter/images/trust-flow.svg" class="column-page" data-fig-alt="Flow diagram showing how commons routes questions. It first searches trusted calculations. If it finds one, it runs the calculation and returns a verified answer. Otherwise, it searches trusted context, writes custom code, and returns either a cited or lower-trust answer." />
<p>commons also ships with an agent skill to help you create a commons agent and functions for analyzing your users&rsquo; conversations.</p>
<h2 id="shinychat-v050-r-and-v071-python">shinychat v0.5.0 (R) and v0.7.1 (Python)
</h2>
<p><strong>shinychat v0.5.0 for R and v0.7.1 for Python bring together more of what you need to build a complete chat application.</strong> Several of these shinychat updates also made commons possible!</p>
<p>Read the full blog post <a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1">here</a>. There are many more updates worth checking out.</p>
<h3 id="page_chat"><code>page_chat()</code>
</h3>
<p>Use <code>page_chat()</code> instead of the bslib <code>page_*()</code> functions when you want the chat to be the center of your application. <code>page_chat()</code> creates a full-window, chatbot-oriented layout with support for navigation pages, conversation history, an <a href="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1#artifact-drawer">artifact drawer</a>, and more.</p>
<img src="https://opensource.posit.co/blog/2026-09-18_ai-newsletter/images/shinychat-page-chat.png" title="A shinychat app built `page_chat()`." class="column-page" data-fig-alt="A full-window Site traffic assistant built with page_chat, showing a traffic-trend question, a compact calculation activity row, the assistant&#39;s answer, and the chat input." />
<h3 id="conversation-history">Conversation history
</h3>
<p>Conversation history is enabled by default when you use <code>chat_server()</code> in R or <code>Chat(client=...)</code> in Python, allowing users to start a new conversation, switch between saved conversations, search them, rename them, and delete them.</p>
<img src="https://opensource.posit.co/blog/2026-09-18_ai-newsletter/images/shinychat-history.png" title="Previous conversations shown in the chat history sidebar." class="column-page" data-fig-alt="The Site traffic assistant with its history sidebar open, showing controls to search or start a conversation and three saved traffic-analysis conversations beside the active chat." />
<h3 id="readable-tool-calls-and-citations">Readable tool calls and citations
</h3>
<p>This shinychat release also includes several improvements for understanding how a model arrived at its response.</p>
<p>One such improvement is readable tool calls. By default, related tool calls are grouped into compact, single-line &ldquo;activity rows&rdquo;, keeping them from overwhelming the conversation. You can still inspect the individual tool calls by expanding a row.</p>
<p>shinychat also displays citations returned by providers&rsquo; built-in web-search and web-fetch tools.</p>
<img src="https://opensource.posit.co/blog/2026-09-18_ai-newsletter/images/shinychat-tools-citations.png" title="A grouped activity row and an open citation." data-fig-alt="A Shinychat answer with a compact grouped activity row for searching documentation and querying the warehouse, plus an open citation identifying sessions_daily as the canonical site-traffic source." />
<h2 id="ellmer-050">ellmer 0.5.0
</h2>
<p><strong><a href="https://opensource.posit.co/blog/2026-09-14_ellmer-0-5-0">ellmer 0.5.0</a> is now on CRAN.</strong> ellmer makes it easy to work with LLMs from R.</p>
<p>Read the full announcement <a href="https://opensource.posit.co/blog/2026-09-14_ellmer-0-5-0">here</a>. Many of the features made available in this release are also available in recent releases of <a href="https://github.com/posit-dev/chatlas/releases" target="_blank" rel="noopener">chatlas</a>, ellmer&rsquo;s sibling package in Python.</p>
<h3 id="citations">Citations
</h3>
<p>When a model uses a supported built-in web tool, ellmer now returns and displays the provider-supplied citations. This works with <code>claude_tool_web_search()</code>, <code>claude_tool_web_fetch()</code>, <code>google_tool_web_search()</code>, and <code>openai_tool_web_search()</code>, helping you identify the sources behind the model&rsquo;s answer.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">chat</span> <span class="o">&lt;-</span> <span class="nf">chat_openai</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">register_tool</span><span class="p">(</span><span class="nf">openai_tool_web_search</span><span class="p">())</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">chat</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">  <span class="s">&#34;What is the most recent version of ellmer on CRAN? Look it up.&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; The most recent CRAN release of **ellmer** is **version 0.5.0**, published</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; **September 4, 2026**.</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; ([cran.r-project.org](https://cran.r-project.org/package%3Dellmer))[1]</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt;</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; Sources</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; [1] CRAN: Package ellmer: https://cran.r-project.org/package%3Dellmer</span></span></span></code></pre></div></div>
<h3 id="tokens-and-costs">Tokens and costs
</h3>
<p>Managing tokens and costs is an important part of working with LLMs.</p>
<p>Ever want to know how many tokens an input will take before sending it? For supported providers, you can now use <code>chat$token_count()</code> to estimate input token use. Instead of actually sending the request to the model, it sends the request to the provider&rsquo;s token-counting API.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">chat</span> <span class="o">&lt;-</span> <span class="nf">chat_openai</span><span class="p">(</span><span class="n">model</span> <span class="o">=</span> <span class="s">&#34;gpt-5.6-luna&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">prompt</span> <span class="o">&lt;-</span> <span class="nf">content_pdf_file</span><span class="p">(</span><span class="s">&#34;example-document.pdf&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">token_count</span><span class="p">(</span><span class="n">prompt</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; [1] 252</span></span></span></code></pre></div></div>
<p>This estimates only the tokens used by the input and does not predict the number of output tokens, so it won&rsquo;t represent the total round-trip count.</p>
<p>Companies frequently release new models and change their prices. Use the new function <code>models_update_prices()</code> to download and cache the latest pricing data from the ellmer GitHub repo. Cost estimates reported by <code>token_usage()</code>, <code>Chat$get_cost()</code>, <code>Chat$get_tokens()</code>, and printed <code>Chat</code> objects use this data.</p>
<h3 id="send-files-to-the-model">Send files to the model
</h3>
<p>It&rsquo;s often useful to send files as part of a chat. You can now send CSV, Markdown, code, and other text-based files to a model with <code>content_document_file()</code> and <code>content_document_url()</code>. For large files or files reused across multiple turns, if you&rsquo;re using <code>chat_openai()</code>, <code>chat_anthropic()</code>, or <code>chat_google_gemini()</code>, use <code>chat$file_upload()</code> instead. It uploads the file once and returns a reference for <code>$chat()</code>. This avoids repeatedly sending the file and reduces token usage and cost.</p>
<h2 id="solid-improvements-for-custom-agents">Solid improvements for custom agents
</h2>
<p>Taken together, these releases make it easier to build more complete custom agents. ellmer manages model interactions in R, shinychat provides the user-facing chat interface, and commons adds a framework for data analysis agents that builds upon these two.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-18_ai-newsletter/images/hero.png" length="543199" type="image/png" />
    </item>
    <item>
      <title>Introducing commons</title>
      <link>https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/</link>
      <pubDate>Tue, 15 Sep 2026 13:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/</guid>
      <dc:creator>Simon Couch</dc:creator>
      <dc:creator>Sara Altman</dc:creator>
      <dc:creator>Josh Taillon</dc:creator><description><![CDATA[<div class="callout callout-tip" role="note" aria-label="Tip">
<div class="callout-header">
<span class="callout-title"><strong>Learn more about commons at our Posit Monthly Workflow Demo</strong></span>
</div>
<div class="callout-body">
<p>Join Sara and Simon on October 28th at 11:00 AM CT to explore Posit Commons!</p>
<p><a href="https://events.zoom.us/ev/Ajss5j9VeRMe0zw-AtFKf7AUAsthzYhaYjYPeEIu1uYAQe1K0ud1~Agb_hSt1UGxd9fUyIDC32e6jAdEtbl7G_AaLZUYhRvyZR5cGpY5Kp_A0-w" target="_blank" rel="noopener">Register here</a>.</p>
</div>
</div>
<p>We&rsquo;re hootin&rsquo; and hollerin&rsquo; to share <a href="https://posit-dev.github.io/commons/" target="_blank" rel="noopener">commons</a>, an R and Python package that helps data scientists build trustworthy data analysis agents.</p>
<video class="column-page" autoplay loop muted playsinline controls preload="metadata" aria-label="Screen recording of a commons agent answering 'How is traffic trending for our site?' by running a trusted calculation and displaying a chart showing daily site visits increased 22%.">
  <source src="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/commons-01-traffic-trend.mp4" type="video/mp4">
  Your browser does not support embedded videos.
</video>
<p>The package is built on <a href="https://ellmer.tidyverse.org/" target="_blank" rel="noopener">ellmer</a>, <a href="https://posit-dev.github.io/chatlas/" target="_blank" rel="noopener">chatlas</a>, and <a href="https://github.com/posit-dev/shinychat/" target="_blank" rel="noopener">shinychat</a>, Posit&rsquo;s open source LLM stack. You can use whatever model you want from any of the providers supported by those packages with it.</p>
<p>To install the R package, run:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">install.packages</span><span class="p">(</span><span class="s">&#34;commons&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
<p>To install the Python package from PyPI, run:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-py" data-lang="py"><span class="line"><span class="cl"><span class="n">pip</span> <span class="n">install</span> <span class="n">commons</span></span></span></code></pre></div></div>
<p>The Python package is currently in a pre-release beta stage, but you can install and play around with it today, with more features arriving over the next few weeks.</p>
<h2 id="design-philosophy">Design philosophy
</h2>
<p>AI agents for data analysis can range from overly cautious and narrowly correct to wildly and confidently incorrect. commons provides a framework for you to design more trustworthy analysis agents by providing them with access to existing <strong>trusted code</strong>, while still allowing them enough flexibility to answer novel, realistic questions.</p>
<p>If you are a data analyst, data scientist, statistical programmer, or other data practitioner, you likely have a deep understanding of your problem domain and a collection of trusted code you depend on for your analyses and use to create apps, reports, and packages. The core idea behind commons is that we can improve an agent&rsquo;s correctness by giving it the right access and documentation to run this code that you have already vetted.</p>
<style>
.commons-inline-icon {
  display: inline-block;
  height: 1.25em;
  margin: 0 0.08em;
  vertical-align: -0.25em;
  width: 1.25em;
}
</style>
<p>When answering questions, commons agents first search through a pool of trusted code. If the agent finds an appropriate piece of trusted code, it can invoke it directly, and its response will be tagged with a green shield icon <img src="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/trusted-icon.svg" class="commons-inline-icon" alt="">. If it doesn&rsquo;t, it will search through relevant context before writing its own SQL, R, or Python. If the agent can find trusted context that justifies its approach, it can provide a citation <img src="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/citation-mark.svg" class="commons-inline-icon" alt=""> to it at the end of its answer, which will be deterministically checked by commons. Otherwise, the answer is marked with a small warning label <img src="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/warning-icon.svg" class="commons-inline-icon" alt="">.</p>
<img src="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/trust-flow.svg" class="column-page" alt="Flow diagram. A commons agent searches trusted calculations. If it finds a relevant calculation, it runs the trusted calculation and returns a verified answer. Otherwise, it searches context, writes SQL or R, and returns either a cited or untrusted answer.">
<p>Notably, the agent itself does not decide how to label a response. commons instead labels answers deterministically, based on the path the agent takes to get it to its answer.</p>
<h2 id="get-started">Get started
</h2>
<p>To get started with the R package, check out the <a href="https://posit-dev.github.io/commons/r/articles/commons.html" target="_blank" rel="noopener">introductory vignette</a>. The package ships with an <a href="https://posit-dev.github.io/commons/r/articles/commons.html#working-with-the-agent-skill" target="_blank" rel="noopener">agent skill</a> to help you hook your trusted code and context up to the agent.</p>
<p>The Python package (although still in beta) is based on the same ideas, and the resulting apps will look <em>very</em> similar regardless of whether you use R or Python—they literally share the same CSS! Check out the <a href="https://posit-dev.github.io/commons/py/" target="_blank" rel="noopener">Python package site</a> to learn more.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-15_commons-0-1-0/commons.png" length="1439234" type="image/png" />
    </item>
    <item>
      <title>Complete chat applications in shinychat: R 0.5.0 and Python 0.7.1</title>
      <link>https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/</link>
      <pubDate>Tue, 15 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/</guid>
      <dc:creator>Garrick Aden-Buie</dc:creator>
      <dc:creator>Carson Sievert</dc:creator><description><![CDATA[<p>We&rsquo;re excited to announce <a href="https://posit-dev.github.io/shinychat/r/" target="_blank" rel="noopener">shinychat v0.5.0 for R</a> and <a href="https://posit-dev.github.io/shinychat/py/" target="_blank" rel="noopener">shinychat v0.7.1 for Python</a>.
This release brings the pieces of a complete chat application together around the conversation itself.</p>
<p>shinychat is a toolkit for building complete, conversation-centered chat applications with Shiny.
The R package pairs with <a href="https://ellmer.tidyverse.org/" target="_blank" rel="noopener">ellmer</a>, and the Python package pairs with <a href="https://posit-dev.github.io/chatlas/" target="_blank" rel="noopener">chatlas</a>.
Install the latest releases from CRAN or PyPI:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-1" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-1-1">R</a></li>
<li><a href="#tabset-1-2">Python</a></li>
</ul>
<div id="tabset-1-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">install.packages</span><span class="p">(</span><span class="s">&#34;shinychat&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-1-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">pip install -U shinychat</span></span></code></pre></div></div>
</div>
</div>
<p>We cover a lot in this post, and there&rsquo;s even more in the releases.
See the <a href="https://github.com/posit-dev/shinychat/blob/main/pkg-r/NEWS.md" target="_blank" rel="noopener">R release notes</a> and the <a href="https://github.com/posit-dev/shinychat/blob/main/pkg-py/CHANGELOG.md" target="_blank" rel="noopener">Python changelog</a> for the complete list of changes, including <a href="#a-few-changes-for-existing-apps">a few changes for existing apps</a> if you&rsquo;re upgrading.</p>
<h2 id="build-a-chat-application">Build a chat application
</h2>
<div class="w-full aspect-4/3">
      <video
        src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/complete-app.mp4"
        class="w-full h-full object-contain"
        title="A complete chat application: the history sidebar lists saved conversations, the assistant answers with a tool activity row and citations, and the artifact drawer opens beside the chat with a plot"
        controls></video>
    </div>
<p>A useful chat application needs more than a text box and a streaming response.
Your users need a way to return to an earlier conversation, start a new one, correct a question, compare answers, inspect sources, and see what the model is doing when it calls a tool.
They may also need to upload a file, open a preview, or move between the chat and the rest of the application.</p>
<p>shinychat gives you sensible starting points for building that experience.
Pair it with <a href="https://ellmer.tidyverse.org/" target="_blank" rel="noopener">ellmer</a> in R or <a href="https://posit-dev.github.io/chatlas/" target="_blank" rel="noopener">chatlas</a> in Python, and you can get a working chat app running with little setup.
The chat application model has three layers:</p>
<ol>
<li><code>page_chat()</code> gives you a full-window chat app with space for navigation, history, tools, and supporting content.</li>
<li><code>chat_ui()</code> lets you place chat wherever it fits best in your application.</li>
<li><code>chat_server()</code> for R or <code>Chat(client=...)</code> for Python connects your app to an <code>ellmer</code> or <code>chatlas</code> client and enables the integrated chat features.</li>
</ol>
<p>When you want a fully custom experience or need a model client other than ellmer or chatlas, the lower-level pieces are still available for you to assemble yourself.</p>
<h2 id="start-with-page_chat">Start with <code>page_chat()</code>
</h2>
<p>When chat is the center of your application, use <code>page_chat()</code>.
It gives your users a full-window experience with a <a href="#create-a-chat-app">chat home</a>, <a href="#complete-application">navigation pages</a>, <a href="#complete-application">sidebars</a>, <a href="#toolbars">toolbars</a>, <a href="#return-to-earlier-conversations">conversation history</a>, and an <a href="#artifact-drawer">artifact drawer</a>.
Users can move to a settings or sources page while their conversation keeps working and streaming.
The <a href="https://posit-dev.github.io/shinychat/r/articles/get-started.html" target="_blank" rel="noopener">Get started</a> guide for R and the <a href="https://posit-dev.github.io/shinychat/py/page-chat.html" target="_blank" rel="noopener">Page chat</a> guide for Python walk through the full layout.</p>
<h3 id="create-a-chat-app">Create a chat app
</h3>
<p>Build a shinychat application starts similarly in both languages:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-2" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-2-1">R</a></li>
<li><a href="#tabset-2-2">Python</a></li>
</ul>
<div id="tabset-2-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">shiny</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">shinychat</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">ui</span> <span class="o">&lt;-</span> <span class="nf">page_chat</span><span class="p">(</span><span class="n">title</span> <span class="o">=</span> <span class="s">&#34;Assistant&#34;</span><span class="p">,</span> <span class="n">id</span> <span class="o">=</span> <span class="s">&#34;chat&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">server</span> <span class="o">&lt;-</span> <span class="kr">function</span><span class="p">(</span><span class="n">input</span><span class="p">,</span> <span class="n">output</span><span class="p">,</span> <span class="n">session</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="n">client</span> <span class="o">&lt;-</span> <span class="n">ellmer</span><span class="o">::</span><span class="nf">chat_openai</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">system_prompt</span> <span class="o">=</span> <span class="s">&#34;You are a helpful assistant.&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">  <span class="nf">chat_server</span><span class="p">(</span><span class="s">&#34;chat&#34;</span><span class="p">,</span> <span class="n">client</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">shinyApp</span><span class="p">(</span><span class="n">ui</span><span class="p">,</span> <span class="n">server</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-2-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">chatlas</span> <span class="kn">import</span> <span class="n">ChatAnthropic</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shinychat.express</span> <span class="kn">import</span> <span class="n">Chat</span><span class="p">,</span> <span class="n">page_chat</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">client</span> <span class="o">=</span> <span class="n">ChatAnthropic</span><span class="p">(</span><span class="n">system_prompt</span><span class="o">=</span><span class="s2">&#34;You are a helpful assistant.&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span> <span class="o">=</span> <span class="n">Chat</span><span class="p">(</span><span class="nb">id</span><span class="o">=</span><span class="s2">&#34;chat&#34;</span><span class="p">,</span> <span class="n">client</span><span class="o">=</span><span class="n">client</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">page_chat</span><span class="p">(</span><span class="n">title</span><span class="o">=</span><span class="s2">&#34;Assistant&#34;</span><span class="p">,</span> <span class="nb">id</span><span class="o">=</span><span class="s2">&#34;chat&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
</div>
<p>With just a few lines of code, you&rsquo;ll have a working chat app backed by a live LLM.
Passing a client to <code>chat_server()</code> in R, or to <code>Chat()</code> in Python, does all the hard work for you, fulling connecting your app to the model client and giving you a complete multi-user chat application<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>.</p>
<p>For a personal chat UI you can use while you develop locally, pass an ellmer client to <a href="https://posit-dev.github.io/shinychat/r/reference/chat_app.html" target="_blank" rel="noopener"><code>chat_app()</code></a> in R, or a chatlas client to <a href="https://posit-dev.github.io/shinychat/py/api/Chat.html" target="_blank" rel="noopener"><code>Chat(client=...)</code></a>, and then call <code>.app()</code> in Python.</p>
<h3 id="welcome-users">Welcome users
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/greeting-suggestions-greeting.png" data-fig-alt="A new chat with a short welcome message and a grid of three suggestion cards beneath it." />
<p>When you&rsquo;re app opens, don&rsquo;t leave your users hanging with an empty chat canvas, gree them with <code>chat_greeting()</code> (<a href="https://posit-dev.github.io/shinychat/r/reference/chat_greeting.html" target="_blank" rel="noopener">R</a>, <a href="https://posit-dev.github.io/shinychat/py/api/chat_greeting.html" target="_blank" rel="noopener">Python</a>)!</p>
<p>Greetings can be used to explain the application, set expectations, and give users a useful first step before they write their first message.
By default, they disappear when the user starts chatting, but you can set <code>persistent = TRUE</code> in R or <code>persistent=True</code> in Python to keep one at the top of the conversation history.</p>
<p>Greetings are written in markdown and can even provide actionable suggestions.
Users can click a suggestion to fill the input, ready to edit before sending, or send it immediately.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-markdown" data-lang="markdown"><span class="line"><span class="cl"><span class="gu">## Welcome!
</span></span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">What would you like to do?
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="k">*</span> &lt;span class=&#34;suggestion submit&#34;&gt;Summarize my data&lt;/span&gt;
</span></span><span class="line"><span class="cl"><span class="k">*</span> &lt;span class=&#34;suggestion&#34;&gt;Create a plot&lt;/span&gt;
</span></span><span class="line"><span class="cl">* &lt;span class=&#34;suggestion&#34;&gt;Explain this code&lt;/span&gt;</span></span></code></pre></div></div>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/greeting-suggestions-fill-input.png" data-fig-alt="Clicking a suggestion card fills the chat input with the suggested prompt, ready to edit before sending." />
<p>You don&rsquo;t have to greet your users with the same message every time, you can use LLMs to generate fresh custom greetings.
To learn more, we&rsquo;ll point you to the <code>chat_greeting()</code> documentation pages (<a href="https://posit-dev.github.io/shinychat/r/reference/chat_greeting.html" target="_blank" rel="noopener">R</a>, <a href="https://posit-dev.github.io/shinychat/py/api/chat_greeting.html" target="_blank" rel="noopener">Python</a>), but it&rsquo;s worth noting that dynamic greetings can stream into the chat like any other response.</p>
<div class="w-full aspect-4/3">
      <video
        src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/greeting-stream.mp4"
        class="w-full h-full object-contain"
        title="A generated greeting streams into the empty chat: the welcome message arrives word by word, then two suggestion cards appear"
        controls></video>
    </div>
<h2 id="return-to-earlier-conversations">Return to earlier conversations
</h2>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/history-list.png" data-fig-alt="The conversation history drawer open beside the chat, listing several named conversations under Today with a search field and a New conversation button." />
<p>One of the biggest features to arrive in this release is conversation history, giving your chat app the ability to save and return to previous conversations.
It will also persist the current conversation across page reloads and other disconnects, virtually eliminating the possibility of losing your progress.
As usual, when you connect shinychat with an ellmer or chatlas client, conversation history is wired up and enabled for you!</p>
<h3 id="save-conversations">Save conversations
</h3>
<p>The history drawer lets users:</p>
<ul>
<li>Start a new conversation.</li>
<li>Switch between saved conversations.</li>
<li>Search conversations.</li>
<li>Rename a conversation.</li>
<li>Delete a conversation.</li>
<li>Return to the conversation that was active when they last opened the app.</li>
</ul>
<p>shinychat generates a short title once the conversation has enough content.
Users can replace that title, and title generation never overwrites a manual rename.</p>
<div class="panel-tabset">
<ul id="tabset-3" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-3-1">Rename</a></li>
<li><a href="#tabset-3-2">Search</a></li>
</ul>
<div id="tabset-3-1">
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/history-actions-menu.png" data-fig-alt="The menu on a saved conversation with options to rename and delete it." />
</div>
<div id="tabset-3-2">
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/history-search.png" data-fig-alt="Typing in the history drawer search field narrows the conversation list to matching titles." />
</div>
</div>
<p>You can <code>history_options()</code> in R or <code>HistoryOptions</code> in Python to configure the conversations that shinychat saves.
The main options are:</p>
<ul>
<li><code>restore_mode</code>, which controls which conversation opens when a user returns to the app:
<ul>
<li><code>&quot;browser&quot;</code> is the default. It returns that browser to its most recent conversation without changing the URL.</li>
<li><code>&quot;url&quot;</code> puts the active conversation ID in the address bar, so users can bookmark or share a specific conversation.</li>
<li><code>&quot;bookmark&quot;</code> restores the conversation with the rest of the app state when your app uses Shiny server bookmarking.</li>
</ul>
</li>
<li><code>store</code> controls where shinychat saves conversations. Use <code>&quot;memory&quot;</code> for local development or tests, or <code>&quot;file&quot;</code> to save them on disk.</li>
<li><code>title</code> controls how the automated conversation titles are generated.</li>
</ul>
<p>For example, this configuration stores conversations on disk and puts the active conversation ID in the URL:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-4" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-4-1">R</a></li>
<li><a href="#tabset-4-2">Python</a></li>
</ul>
<div id="tabset-4-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">history</span> <span class="o">&lt;-</span> <span class="nf">history_options</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">  <span class="n">restore_mode</span> <span class="o">=</span> <span class="s">&#34;url&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="n">store</span> <span class="o">=</span> <span class="s">&#34;file&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">chat_server</span><span class="p">(</span><span class="s">&#34;chat&#34;</span><span class="p">,</span> <span class="n">client</span><span class="p">,</span> <span class="n">history</span> <span class="o">=</span> <span class="n">history</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-4-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shinychat</span> <span class="kn">import</span> <span class="n">Chat</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shinychat.types</span> <span class="kn">import</span> <span class="n">HistoryOptions</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">history</span> <span class="o">=</span> <span class="n">HistoryOptions</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">restore_mode</span><span class="o">=</span><span class="s2">&#34;url&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="n">store</span><span class="o">=</span><span class="s2">&#34;file&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">chat</span> <span class="o">=</span> <span class="n">Chat</span><span class="p">(</span><span class="s2">&#34;chat&#34;</span><span class="p">,</span> <span class="n">client</span><span class="o">=</span><span class="n">client</span><span class="p">,</span> <span class="n">history</span><span class="o">=</span><span class="n">history</span><span class="p">)</span></span></span></code></pre></div></div>
</div>
</div>
<p>On Posit Connect, conversation history is included with the platform and is enabled automatically when you provide a model client.
The default configuration uses Connect&rsquo;s <a href="https://docs.posit.co/connect/user/structuring-content/#persistent-storage-on-posit-connect" target="_blank" rel="noopener">persistent storage</a> and scopes conversations to the authenticated user.
That gives every user a private conversation history without an additional history service or per-user setup.</p>
<p>In every restore mode, shinychat keeps the transcript in its configured store instead of putting the full conversation in the URL.</p>
<h3 id="edit-a-message-and-compare-answers">Edit a message and compare answers
</h3>
<div class="w-full aspect-4/3">
      <video
        src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/edit-branches-edit.mp4"
        class="w-full h-full object-contain"
        title="Editing an earlier message and resending it starts a new branch, and the sibling navigation control appears on the response"
        controls></video>
    </div>
<p>Editing a message now creates a new conversation <strong>branch</strong>.
When a user edits and resends an earlier message, shinychat forks the conversation at that point: the original question and its later messages remain on one branch, while the edited question begins another. Users can move between the answers with the branch controls in the message.</p>
<div class="panel-tabset">
<ul id="tabset-5" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-5-1">Branch 1</a></li>
<li><a href="#tabset-5-2">Branch 2</a></li>
</ul>
<div id="tabset-5-1">
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/edit-branches-original.png" data-fig-alt="The original conversation with an assistant response showing a 1 / 2 sibling navigation control." />
</div>
<div id="tabset-5-2">
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/edit-branches-new.png" data-fig-alt="The same conversation after editing a message, with the new branch&#39;s response selected and the sibling navigation control showing 2 / 2." />
</div>
</div>
<p>Branches help when a prompt is almost right or when a model takes an unhelpful direction, and they make comparing answers easy without starting over.
And they are part of the saved conversation, so users return to their place in the conversation after a reload.</p>
<h2 id="add-content-and-controls">Add content and controls
</h2>
<p>When chat is part of a larger application, your users still need access to filters, settings, sources, and results.
<code>page_chat()</code> gives you a place to put those alongside the conversation: a drawer for results, toolbars for controls, and offcanvas panels for settings you would rather keep off screen.</p>
<h3 id="artifact-drawer">Artifact drawer
</h3>
<p><code>chat_drawer()</code> gives you a place to show previews, rendered reports, tables, plots, or other bits of Shiny UI next to your chat.
Your users can keep the conversation visible while they inspect a result.</p>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/complete-app-nav-drawer.png" data-fig-alt="The research assistant app with the Research assistant and Sources navigation pages in the header, the conversation in the main region, and the artifact drawer open beside the chat showing a bar chart of penguin counts." />
<p>See the <a href="https://posit-dev.github.io/shinychat/r/reference/chat_drawer.html" target="_blank" rel="noopener">drawer documentation for R</a> or <a href="https://posit-dev.github.io/shinychat/py/api/chat_drawer.html" target="_blank" rel="noopener">Python</a> for the full API.
The <a href="#complete-application">complete application example</a> combines a drawer with the rest of the application layout.</p>
<h3 id="toolbars">Toolbars
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/toolbars-home.png" data-fig-alt="A close-up of a research assistant chat. Part of the conversation is visible beside the global toolbar&#39;s Refresh, Help, and Answer settings buttons, with a response style selector below the chat input." />
<p>Your app may need a Help button that works on every page, while the chat home needs an action that&rsquo;s only relevant when you&rsquo;re looking at the conversation. <code>page_chat()</code> gives each action a home through scoped <a href="https://opensource.posit.co/blog/2026-05-26_introducing-toolbars">toolbars</a>, built on the toolbar components that bslib and Shiny shipped earlier this year.</p>
<p>If you want an action to follow users through the whole app &mdash; pass it to <code>toolbar_global</code>. Put chat-home actions in <code>toolbar</code> in <code>page_chat()</code>, and give a <a href="#complete-application">secondary page</a> its own <code>toolbar</code> through <code>chat_nav_panel()</code>. <code>toolbar_input</code> puts related actions below the message box.</p>
<p>See the <a href="https://posit-dev.github.io/shinychat/r/articles/get-started.html" target="_blank" rel="noopener">R get started guide</a> or the <a href="https://posit-dev.github.io/shinychat/py/page-chat.html" target="_blank" rel="noopener">Python Page chat guide</a> for the full toolbar API.</p>
<h3 id="offcanvas-panels">Offcanvas panels
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/toolbars-offcanvas.png" data-fig-alt="The research assistant app with the Answer settings offcanvas open along the right edge, showing a target length slider and a citations checkbox beside the conversation." />
<p><code>page_chat()</code> pairs <a href="https://opensource.posit.co/blog/2026-08-04_shiny-r-1-14-python-1-7">offcanvas panels</a> with secondary content, such as an answer-length slider or citation setting, and a toolbar button can open an <strong>Answer settings</strong> panel from any page:</p>
<h3 id="complete-application">Complete application
</h3>
<p>As your app grows, <code>page_chat()</code> can grow around the conversation. You can add secondary pages and a sidebar for filters or other app UI and the application menu keeps those options available on narrow screens.</p>
<p>The following example brings the toolbars, sidebar, navigation, and drawer together.</p>
<details class="callout callout-tip" role="note" aria-label="Tip">
<summary class="callout-header">
<span class="callout-title">A complete <code>page_chat()</code> example</span>
</summary>
<div class="callout-body">
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-6" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-6-1">R</a></li>
<li><a href="#tabset-6-2">Python</a></li>
</ul>
<div id="tabset-6-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">ui</span> <span class="o">&lt;-</span> <span class="nf">page_chat</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">  <span class="s">&#34;Research assistant&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="n">id</span> <span class="o">=</span> <span class="s">&#34;chat&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="n">toolbar</span> <span class="o">=</span> <span class="n">bslib</span><span class="o">::</span><span class="nf">toolbar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">bslib</span><span class="o">::</span><span class="nf">toolbar_input_button</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">      <span class="s">&#34;clear_chat&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="s">&#34;Clear conversation&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="n">icon</span> <span class="o">=</span> <span class="n">bsicons</span><span class="o">::</span><span class="nf">bs_icon</span><span class="p">(</span><span class="s">&#34;arrow-counterclockwise&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">),</span>
</span></span><span class="line"><span class="cl">  <span class="n">toolbar_global</span> <span class="o">=</span> <span class="n">bslib</span><span class="o">::</span><span class="nf">toolbar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">bslib</span><span class="o">::</span><span class="nf">toolbar_input_button</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">      <span class="s">&#34;help&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="s">&#34;Help&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="n">icon</span> <span class="o">=</span> <span class="n">bsicons</span><span class="o">::</span><span class="nf">bs_icon</span><span class="p">(</span><span class="s">&#34;question-circle&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">),</span>
</span></span><span class="line"><span class="cl">  <span class="n">sidebar</span> <span class="o">=</span> <span class="nf">chat_sidebar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">tags</span><span class="o">$</span><span class="nf">p</span><span class="p">(</span><span class="s">&#34;Use filters to focus the results.&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">    <span class="n">history</span> <span class="o">=</span> <span class="kc">FALSE</span>
</span></span><span class="line"><span class="cl">  <span class="p">),</span>
</span></span><span class="line"><span class="cl">  <span class="n">pages_navbar</span> <span class="o">=</span> <span class="nf">list</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="nf">chat_nav_panel</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">      <span class="s">&#34;Sources&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="n">tags</span><span class="o">$</span><span class="nf">p</span><span class="p">(</span><span class="s">&#34;Sources selected during this session appear here.&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">      <span class="n">toolbar</span> <span class="o">=</span> <span class="n">bslib</span><span class="o">::</span><span class="nf">toolbar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">bslib</span><span class="o">::</span><span class="nf">toolbar_input_button</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">          <span class="s">&#34;refresh_sources&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">          <span class="s">&#34;Refresh&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">          <span class="n">icon</span> <span class="o">=</span> <span class="n">bsicons</span><span class="o">::</span><span class="nf">bs_icon</span><span class="p">(</span><span class="s">&#34;arrow-repeat&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">        <span class="p">)</span>
</span></span><span class="line"><span class="cl">      <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">),</span>
</span></span><span class="line"><span class="cl">  <span class="n">drawer</span> <span class="o">=</span> <span class="nf">chat_drawer</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">tags</span><span class="o">$</span><span class="nf">p</span><span class="p">(</span><span class="s">&#34;Select a result to inspect it here.&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">    <span class="n">title</span> <span class="o">=</span> <span class="s">&#34;Latest result&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="n">open</span> <span class="o">=</span> <span class="kc">FALSE</span>
</span></span><span class="line"><span class="cl">  <span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
</div>
<div id="tabset-6-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">faicons</span> <span class="kn">import</span> <span class="n">icon_svg</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shiny</span> <span class="kn">import</span> <span class="n">ui</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shinychat</span> <span class="kn">import</span> <span class="n">chat_drawer</span><span class="p">,</span> <span class="n">chat_nav_panel</span><span class="p">,</span> <span class="n">chat_sidebar</span>
</span></span><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">shinychat.express</span> <span class="kn">import</span> <span class="n">page_chat</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">page_chat</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="s2">&#34;Research assistant&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="nb">id</span><span class="o">=</span><span class="s2">&#34;chat&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="n">toolbar</span><span class="o">=</span><span class="n">ui</span><span class="o">.</span><span class="n">toolbar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">ui</span><span class="o">.</span><span class="n">toolbar_input_button</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">            <span class="nb">id</span><span class="o">=</span><span class="s2">&#34;clear_chat&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="n">label</span><span class="o">=</span><span class="s2">&#34;Clear conversation&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="n">icon</span><span class="o">=</span><span class="n">icon_svg</span><span class="p">(</span><span class="s2">&#34;arrow-counterclockwise&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">        <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">),</span>
</span></span><span class="line"><span class="cl">    <span class="n">toolbar_global</span><span class="o">=</span><span class="n">ui</span><span class="o">.</span><span class="n">toolbar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">ui</span><span class="o">.</span><span class="n">toolbar_input_button</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">            <span class="nb">id</span><span class="o">=</span><span class="s2">&#34;help&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="n">label</span><span class="o">=</span><span class="s2">&#34;Help&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="n">icon</span><span class="o">=</span><span class="n">icon_svg</span><span class="p">(</span><span class="s2">&#34;question-circle&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">        <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">),</span>
</span></span><span class="line"><span class="cl">    <span class="n">sidebar</span><span class="o">=</span><span class="n">chat_sidebar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">ui</span><span class="o">.</span><span class="n">p</span><span class="p">(</span><span class="s2">&#34;Use filters to focus the results.&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">        <span class="n">history</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="p">),</span>
</span></span><span class="line"><span class="cl">    <span class="n">pages_navbar</span><span class="o">=</span><span class="p">[</span>
</span></span><span class="line"><span class="cl">        <span class="n">chat_nav_panel</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;Sources&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">            <span class="n">ui</span><span class="o">.</span><span class="n">p</span><span class="p">(</span><span class="s2">&#34;Sources selected during this session appear here.&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">            <span class="n">toolbar</span><span class="o">=</span><span class="n">ui</span><span class="o">.</span><span class="n">toolbar</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">                <span class="n">ui</span><span class="o">.</span><span class="n">toolbar_input_button</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">                    <span class="nb">id</span><span class="o">=</span><span class="s2">&#34;refresh_sources&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">                    <span class="n">label</span><span class="o">=</span><span class="s2">&#34;Refresh&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">                    <span class="n">icon</span><span class="o">=</span><span class="n">icon_svg</span><span class="p">(</span><span class="s2">&#34;arrow-repeat&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">                <span class="p">)</span>
</span></span><span class="line"><span class="cl">            <span class="p">),</span>
</span></span><span class="line"><span class="cl">        <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">],</span>
</span></span><span class="line"><span class="cl">    <span class="n">drawer</span><span class="o">=</span><span class="n">chat_drawer</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">        <span class="n">ui</span><span class="o">.</span><span class="n">p</span><span class="p">(</span><span class="s2">&#34;Select a result to inspect it here.&#34;</span><span class="p">),</span>
</span></span><span class="line"><span class="cl">        <span class="n">title</span><span class="o">=</span><span class="s2">&#34;Latest result&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">        <span class="nb">open</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">    <span class="p">),</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
</div>
</div>
<p>Users see the <strong>Clear conversation</strong> button while they chat, the <strong>Help</strong> button on every page, a <strong>Sources</strong> page with its own <strong>Refresh</strong> toolbar, and a <strong>Latest result</strong> drawer beside the conversation.</p>
</div>
</details>
<h2 id="show-how-the-model-reached-an-answer">Show how the model reached an answer
</h2>
<p>Understanding how an LLM arrived at an answer is just as &mdash; if not more &mdash; important than getting the answer from the model.
A response can include ordinary text, thinking content, web activity, citations, tool calls, tool results, and custom UI.
shinychat works hard to make the model&rsquo;s work visible and presents each part in a way that helps users understand the answer and what produced it.</p>
<h3 id="keep-tool-calls-readable">Keep tool calls readable
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/tool-calls-collapsed.png" data-fig-alt="A sales assistant conversation where two SQL queries and a schema read appear as compact activity rows above the answer." />
<p>Tool calls are now shown as compact activity rows instead of letting them take over the conversation, refining the <a href="https://opensource.posit.co/blog/2025-11-20_shinychat-tool-ui">tool-call cards shinychat introduced last year</a>.
By default, related calls are grouped together into a single row, and users can still expand a group, open an individual call, and inspect the request and result when they need more detail.</p>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/tool-calls-expanded.png" data-fig-alt="The grouped tool-call row expanded to show the two SQL queries with row count and result previews." />
<p>Opening an individual call shows the request and the result in a card:</p>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/tool-calls-result.png" data-fig-alt="The SQL query expanded to a card showing the full tool call arguments and the query result as a small table." />
<p>Grouping keeps the answer readable, and the request and result stay one click away.
To customize grouping or register tools, see <a href="https://posit-dev.github.io/shinychat/r/articles/tool-ui.html" target="_blank" rel="noopener">Tool UI in shinychat for R</a>, <a href="https://shiny.posit.co/py/docs/genai-tools.html" target="_blank" rel="noopener">Tools in Shiny for Python</a>, <a href="https://ellmer.tidyverse.org/articles/tool-calling.html" target="_blank" rel="noopener">tool/function calling in ellmer</a>, or <a href="https://posit-dev.github.io/chatlas/get-started/tools.html" target="_blank" rel="noopener">tool calling in chatlas</a>.</p>
<h3 id="show-citations-for-web-search-and-fetch">Show citations for web search and fetch
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/citations-popover.png" data-fig-alt="An assistant response where each cited claim is underlined and a pill reading Internal report +1 marks the message&#39;s sources, with the citation popover open just below the pill showing the source name, a link, the supporting passage, and controls to move between the message&#39;s two citations." />
<p>Many LLM providers offer built-in web search and web fetch tools that let your agent search the web, and their APIs return citations when the model uses that content in a reply. shinychat now displays those citations automatically.</p>
<p>For example, here&rsquo;s how to register Claude&rsquo;s tools with an ellmer or chatlas client:</p>
<div class="panel-tabset" data-tabset-group="language">
<ul id="tabset-7" class="panel-tabset-tabby">
<li><a data-tabby-default href="#tabset-7-1">R</a></li>
<li><a href="#tabset-7-2">Python</a></li>
</ul>
<div id="tabset-7-1">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">ellmer</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">client</span> <span class="o">&lt;-</span> <span class="nf">chat_anthropic</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"><span class="n">client</span><span class="o">$</span><span class="nf">register_tool</span><span class="p">(</span><span class="nf">claude_tool_web_search</span><span class="p">())</span>
</span></span><span class="line"><span class="cl"><span class="n">client</span><span class="o">$</span><span class="nf">register_tool</span><span class="p">(</span><span class="nf">claude_tool_web_fetch</span><span class="p">())</span></span></span></code></pre></div></div>
</div>
<div id="tabset-7-2">
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="kn">from</span> <span class="nn">chatlas</span> <span class="kn">import</span> <span class="n">ChatAnthropic</span><span class="p">,</span> <span class="n">tool_web_fetch</span><span class="p">,</span> <span class="n">tool_web_search</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">client</span> <span class="o">=</span> <span class="n">ChatAnthropic</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">kwargs</span><span class="o">=</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">        <span class="s2">&#34;default_headers&#34;</span><span class="p">:</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;anthropic-beta&#34;</span><span class="p">:</span> <span class="s2">&#34;web-fetch-2025-09-10&#34;</span>
</span></span><span class="line"><span class="cl">        <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">client</span><span class="o">.</span><span class="n">register_tool</span><span class="p">(</span><span class="n">tool_web_search</span><span class="p">())</span>
</span></span><span class="line"><span class="cl"><span class="n">client</span><span class="o">.</span><span class="n">register_tool</span><span class="p">(</span><span class="n">tool_web_fetch</span><span class="p">())</span></span></span></code></pre></div></div>
</div>
</div>
<p>When this client is used with <code>chat_server()</code>, citations are connected directly to the portions of the assistant&rsquo;s response that they support.</p>
<p>Custom retrieval applications, like the RAG systems you can build with <a href="https://ragnar.tidyverse.org/" target="_blank" rel="noopener">ragnar</a> or <a href="https://opensource.posit.co/blog/2026-04-14_rag-with-raghilda">raghilda</a>, can use the same citation UI by prompting the assistant to use a <code>&lt;shiny-aside&gt;</code> tag to attach a source to a claim.</p>
<h3 id="stream-responses-and-show-thinking">Stream responses and show thinking
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/thinking-collapsed.png" data-fig-alt="An assistant response with a collapsed panel reading Thought for 4s between the user&#39;s question and the answer." />
<p>With <code>chat_server()</code> in R or <code>Chat(client=...)</code> in Python, shinychat streams responses and shows supported thinking content in a collapsible panel.
Users can cancel a slow response with the stop button or the Escape key, and the partial response stays in the conversation.</p>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/streaming-stop.png" data-fig-alt="While a response streams in, the send button at the right of the chat input becomes a red stop button." />
<h2 id="add-files-and-shortcuts">Add files and shortcuts
</h2>
<h3 id="attach-files">Attach files
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/attachments-plot.png" data-fig-alt="A plot attached to the chat input as a thumbnail chip above the prompt Explain this plot, with the attach button at the left of the input." />
<p>File attachments are now supported in shinychat! Your users can send images, PDFs, and text files through a file picker, drag and drop, or paste, and shinychat sends each file to the model alongside the user&rsquo;s message. When you use <code>chat_server()</code> in R or <code>Chat(client=...)</code> in Python, your app gets that support for free.</p>
<h3 id="add-slash-commands">Add slash commands
</h3>
<img src="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/slash-commands-palette.png" data-fig-alt="The slash command palette open above the chat input, listing /help, /search, and /clear with short descriptions." />
<p>You can now register chat shortcuts, or <em>slash commands</em>, with <a href="https://posit-dev.github.io/shinychat/r/reference/chat_server.html" target="_blank" rel="noopener"><code>chat$slash_command()</code></a> in R or <a href="https://posit-dev.github.io/shinychat/py/api/Chat.html" target="_blank" rel="noopener"><code>@chat.slash_command()</code></a> in Python. The command palette appears when users type <code>/</code>, and they serve as a way to trigger server-side code, inject context or additional prompting, or even just take an action in your app, all from the chat input.</p>
<p>Check out the <a href="https://posit-dev.github.io/shinychat/r/" target="_blank" rel="noopener">shinychat for R</a> or <a href="https://posit-dev.github.io/shinychat/py/" target="_blank" rel="noopener">shinychat for Python</a> documentation for details.</p>
<h2 id="more-shinychat-powered-apps">More shinychat-powered apps
</h2>
<p>The next release of <a href="https://posit-dev.github.io/querychat/" target="_blank" rel="noopener">querychat</a> will bring these chat features to data applications, including conversation history, attachments, tool displays, and citations.
It will introduce a page-first <code>querychat_app()</code> workflow and a new <code>page()</code> API for adding querychat to an existing Shiny page.</p>
<p><a href="https://posit-dev.github.io/btw/news/index.html#btw-150" target="_blank" rel="noopener">btw 1.5.0</a> already uses shinychat 0.5.0 to give <code>btw_app()</code> a complete coding assistant for your R projects.
It adds conversation history, a <code>page_chat()</code> layout, and slash commands to an assistant that can use your R session, project files, and package documentation.</p>
<h2 id="a-few-changes-for-existing-apps">A few changes for existing apps
</h2>
<p>Existing <code>chat_ui()</code> applications remain supported when chat shares a page with other top-level content. When the conversation should fill the application instead, choose <code>page_chat()</code> and use it as the outermost page container; nesting it inside another page layout breaks the full-window layout and history experience.</p>
<p>In R, <code>chat_mod_ui()</code> and <code>chat_mod_server()</code> are soft-deprecated in favor of pairing <code>chat_ui()</code> and <code>chat_server()</code> by ID. In both languages, a startup message no longer seeds a conversation when history is enabled; use a greeting or append messages through the chat object instead.</p>
<p>The release also protects users from unsafe model-authored Markdown, shows an error when a response fails before streaming starts, and preserves tool results, citations, attachments, and other rich content when users return to a conversation.</p>
<p>With <code>page_chat()</code>, <code>chat_server()</code> or <code>Chat(client=...)</code>, and the history options, you can now give your users a complete chat application: saved conversations they can return to, messages they can edit into new branches, greetings and suggestions to start from, and responses with visible tool calls, citations, and thinking.</p>
<p>Read the <a href="https://posit-dev.github.io/shinychat/r/" target="_blank" rel="noopener">shinychat for R documentation</a> or the <a href="https://posit-dev.github.io/shinychat/py/" target="_blank" rel="noopener">shinychat for Python documentation</a> to explore the examples.
For the complete list of changes, see the <a href="https://github.com/posit-dev/shinychat/blob/main/pkg-r/NEWS.md" target="_blank" rel="noopener">R release notes</a> and the <a href="https://github.com/posit-dev/shinychat/blob/main/pkg-py/CHANGELOG.md" target="_blank" rel="noopener">Python changelog</a>.</p>
<h2 id="acknowledgements">Acknowledgements
</h2>
<p>We thank everyone who contributed to these releases, for opening issues,
submitting pull requests, and providing feedback:
<a href="https://github.com/bastianolea" target="_blank" rel="noopener">@bastianolea</a>,
<a href="https://github.com/bianchenhao" target="_blank" rel="noopener">@bianchenhao</a>,
<a href="https://github.com/christophsax" target="_blank" rel="noopener">@christophsax</a>,
<a href="https://github.com/cpsievert" target="_blank" rel="noopener">@cpsievert</a>,
<a href="https://github.com/crissthiandi" target="_blank" rel="noopener">@crissthiandi</a>,
<a href="https://github.com/elnelson575" target="_blank" rel="noopener">@elnelson575</a>,
<a href="https://github.com/gadenbuie" target="_blank" rel="noopener">@gadenbuie</a>,
<a href="https://github.com/Harshit28j" target="_blank" rel="noopener">@Harshit28j</a>,
<a href="https://github.com/JamesHWade" target="_blank" rel="noopener">@JamesHWade</a>,
<a href="https://github.com/jcheng5" target="_blank" rel="noopener">@jcheng5</a>,
<a href="https://github.com/jlxAtNovozymes" target="_blank" rel="noopener">@jlxAtNovozymes</a>,
<a href="https://github.com/jnhyeon" target="_blank" rel="noopener">@jnhyeon</a>,
<a href="https://github.com/jose-c-milliman" target="_blank" rel="noopener">@jose-c-milliman</a>,
<a href="https://github.com/kaipingyang" target="_blank" rel="noopener">@kaipingyang</a>,
<a href="https://github.com/lucasrod16" target="_blank" rel="noopener">@lucasrod16</a>,
<a href="https://github.com/markmcd" target="_blank" rel="noopener">@markmcd</a>,
<a href="https://github.com/nbenn" target="_blank" rel="noopener">@nbenn</a>,
<a href="https://github.com/parmsam" target="_blank" rel="noopener">@parmsam</a>,
<a href="https://github.com/schloerke" target="_blank" rel="noopener">@schloerke</a>,
<a href="https://github.com/shea-parkes" target="_blank" rel="noopener">@shea-parkes</a>,
<a href="https://github.com/simonpcouch" target="_blank" rel="noopener">@simonpcouch</a>,
<a href="https://github.com/slupczynskim" target="_blank" rel="noopener">@slupczynskim</a>,
<a href="https://github.com/thisisnic" target="_blank" rel="noopener">@thisisnic</a>,
<a href="https://github.com/wlandau" target="_blank" rel="noopener">@wlandau</a>, and
<a href="https://github.com/xx02al" target="_blank" rel="noopener">@xx02al</a>.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>If you&rsquo;re new to LLM apps with Shiny, <a href="https://opensource.posit.co/blog/2025-09-15_shiny-side-of-llms-part-3">Build Your First LLM App with Shiny</a> walks through the process from the beginning in detail.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-15_shinychat-r-0.5.0-python-0.7.1/images/og-header.png" length="78200" type="image/png" />
    </item>
    <item>
      <title>ellmer 0.5.0</title>
      <link>https://opensource.posit.co/blog/2026-09-14_ellmer-0-5-0/</link>
      <pubDate>Mon, 14 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-14_ellmer-0-5-0/</guid>
      <dc:creator>Nic Crane</dc:creator><description><![CDATA[<p>We are happy to announce that <a href="https://ellmer.tidyverse.org" target="_blank" rel="noopener">ellmer</a> 0.5.0 is now available on CRAN! ellmer is an R package that makes it easy to work with large language models directly from R. It supports a wide variety of providers (including OpenAI, Anthropic, Google, AWS Bedrock, Azure, Snowflake, Databricks, Posit, and many more), makes it easy to extract structured data, and lets the model call R functions via tool calling.</p>
<p>You can install the latest version from CRAN with</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">install.packages</span><span class="p">(</span><span class="s">&#34;ellmer&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
<p>This blog post covers the major changes in this release: a lifecycle update, updates to how you can work with files with ellmer, new ways to update model price data, returning citations when using web search tools, and new hooks for developers building on ellmer&rsquo;s tool loop.</p>
<p>The full list of changes can be found in the <a href="https://github.com/tidyverse/ellmer/releases/tag/v0.5.0" target="_blank" rel="noopener">release notes</a>.</p>
<h2 id="lifecycle">Lifecycle
</h2>
<p><code>chat_github()</code> and <code>models_github()</code> are now defunct, since GitHub Models has been retired.</p>
<p>We&rsquo;ve tightened up what a tool can return: a string, an atomic vector, a JSON string, or a <code>Content</code> object. Returning anything else, like a data frame or a list, now gives a deprecation warning. Previously ellmer converted these to JSON for you, but any problem with the conversion surfaced long after your function had finished, and it was easy to forget that the model can only read the result, not compute with it. For a data frame, convert it yourself:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">get_weather</span> <span class="o">&lt;-</span> <span class="nf">tool</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">  <span class="kr">function</span><span class="p">(</span><span class="n">cities</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="n">df</span> <span class="o">&lt;-</span> <span class="nf">weather_api</span><span class="p">(</span><span class="n">cities</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="n">jsonlite</span><span class="o">::</span><span class="nf">toJSON</span><span class="p">(</span><span class="n">df</span><span class="p">,</span> <span class="n">dataframe</span> <span class="o">=</span> <span class="s">&#34;columns&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">},</span>
</span></span><span class="line"><span class="cl">  <span class="kc">...</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
<h2 id="new-features">New features
</h2>
<h3 id="sending-files-to-the-model">Sending files to the model
</h3>
<p>There are now two ways to give the model a file. New <code>content_document_file()</code> and <code>content_document_url()</code> send text-based documents like CSV, Markdown, and code files, just as <code>content_pdf_file()</code> and <code>content_image_file()</code> already do for PDFs and images. The contents go inline with your message, so this works with every provider:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">penguins</span> <span class="o">&lt;-</span> <span class="nf">tempfile</span><span class="p">(</span><span class="n">fileext</span> <span class="o">=</span> <span class="s">&#34;.csv&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">readr</span><span class="o">::</span><span class="nf">write_csv</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">  <span class="nf">data.frame</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">    <span class="n">penguin</span> <span class="o">=</span> <span class="nf">c</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">      <span class="s">&#34;Waddlesworth&#34;</span><span class="p">,</span> <span class="s">&#34;Flipper McGee&#34;</span><span class="p">,</span> <span class="s">&#34;Turbo Tuxedo&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="s">&#34;Captain Blubber&#34;</span><span class="p">,</span> <span class="s">&#34;Sir Slidesalot&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="p">),</span>
</span></span><span class="line"><span class="cl">    <span class="n">race_time_seconds</span> <span class="o">=</span> <span class="nf">c</span><span class="p">(</span><span class="m">43.2</span><span class="p">,</span> <span class="m">38.7</span><span class="p">,</span> <span class="m">31.9</span><span class="p">,</span> <span class="m">45.1</span><span class="p">,</span> <span class="m">36.4</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">),</span>
</span></span><span class="line"><span class="cl">  <span class="n">penguins</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">chat</span> <span class="o">&lt;-</span> <span class="nf">chat_anthropic</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">chat</span><span class="p">(</span><span class="s">&#34;Who won the race?&#34;</span><span class="p">,</span> <span class="nf">content_document_file</span><span class="p">(</span><span class="n">penguins</span><span class="p">))</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; Based on the race times, **Turbo Tuxedo** won the race with the fastest time of</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; **31.9 seconds**.</span></span></span></code></pre></div></div>
<p>Inline contents are re-sent with every turn, which adds up over a long conversation, especially with a large file. For those cases, <code>chat$file_upload()</code> sends the file to the provider once and returns a reference you pass to <code>$chat()</code> instead. Because the file isn&rsquo;t re-sent with every message, this also reduces your token usage and costs:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">chat</span> <span class="o">&lt;-</span> <span class="nf">chat_google_gemini</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"><span class="n">race</span> <span class="o">&lt;-</span> <span class="n">chat</span><span class="o">$</span><span class="nf">file_upload</span><span class="p">(</span><span class="n">penguins</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">chat</span><span class="p">(</span><span class="s">&#34;Who won the race?&#34;</span><span class="p">,</span> <span class="n">race</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; **Turbo Tuxedo** won the race with the fastest time of **31.9 seconds**.</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">chat</span><span class="p">(</span><span class="s">&#34;And who came last?&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; **Captain Blubber** came in last with the slowest time of **45.1 seconds**.</span></span></span></code></pre></div></div>
<p>You can manage your uploads with <code>chat$file_list()</code>, <code>$file_get()</code>, <code>$file_download()</code>, and <code>$file_delete()</code>. File management works with <code>chat_openai()</code>, <code>chat_anthropic()</code>, and <code>chat_google_gemini()</code>, and replaces the now-deprecated <code>claude_file_upload()</code> and <code>google_upload()</code>.</p>
<h3 id="citations">Citations
</h3>
<p>When a model answers using a built-in web search or fetch tool, the provider usually reports which sources back the answer. ellmer 0.5.0 captures citations from Claude, Google, and OpenAI.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">chat</span> <span class="o">&lt;-</span> <span class="nf">chat_anthropic</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">register_tool</span><span class="p">(</span><span class="nf">claude_tool_web_search</span><span class="p">())</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">chat</span><span class="p">(</span><span class="s">&#34;What are the current stable versions of R and Python? Look them up, one line each, no commentary.&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; R: R version 4.6.1 (Happy Hop) has been released on 2026-06-24[1]</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt;</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; Python: Python 3.14.7 / 5 August 2026[2]</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt;</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; Sources</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; [1] R: The R Project for Statistical Computing: https://www.r-project.org/</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; [2] Python (programming language):</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; https://en.wikipedia.org/wiki/Python_(programming_language)</span></span></span></code></pre></div></div>
<p>Citations are also kept in the chat history and included in streamed output, so apps built on ellmer can display them as well.</p>
<h3 id="counting-tokens-and-keeping-prices-current">Counting tokens and keeping prices current
</h3>
<p>Two additions make it easier to know what a conversation will cost before you commit to it. <code>Chat$token_count()</code> asks the provider how many tokens some input would use, without actually sending it to the model.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">chat</span> <span class="o">&lt;-</span> <span class="nf">chat_anthropic</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"><span class="n">prompt</span> <span class="o">&lt;-</span> <span class="s">&#34;Tell me a joke about an R programmer&#34;</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">token_count</span><span class="p">(</span><span class="n">prompt</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; [1] 19</span></span></span></code></pre></div></div>
<p>Token counting is currently supported by <code>chat_anthropic()</code>, <code>chat_openai()</code>, <code>chat_google_gemini()</code>, <code>chat_google_vertex()</code>, and <code>chat_posit()</code>.</p>
<p>Providers change their prices more often than we release ellmer. You can now update in between releases with <code>models_update_prices()</code>, which downloads the latest pricing data from GitHub and caches it locally.</p>
<h2 id="other-improvements">Other improvements
</h2>
<ul>
<li>Default models have been updated across providers: <code>chat_anthropic()</code>, <code>chat_aws_bedrock()</code>, <code>chat_databricks()</code>, <code>chat_posit()</code>, and <code>chat_snowflake()</code> now use Claude Sonnet 5; <code>chat_openai()</code> and <code>chat_openrouter()</code> use GPT 5.6 Terra; and <code>chat_google_gemini()</code> and <code>chat_google_vertex()</code> use Gemini 3.7 Flash. We update the default models regularly, so if you&rsquo;d prefer to pin your code to a specific model, you should specify it using the <code>model</code> parameter.</li>
<li><code>chat_aws_bedrock()</code> now supports Bedrock Mantle, the newer endpoint that serves models like Claude Mythos and the GPT-5 family through the Anthropic Messages and OpenAI Responses APIs, rather than only the Converse API. ellmer picks the right API from the model name, so this should just work. If you&rsquo;re using a model it doesn&rsquo;t recognize, you can set the new <code>api</code> argument yourself.</li>
<li>You can now stream structured output. <code>Chat$stream()</code> and <code>$stream_async()</code> gain a <code>type</code> argument, which works the same way as in <code>$chat_structured()</code>, for providers that support it.</li>
</ul>
<h3 id="developer-updates">Developer updates
</h3>
<p>Two new features help developers building on ellmer&rsquo;s tool loop.</p>
<p>Inside a tool, <code>tool_context()</code> returns the request that triggered it and the conversation so far, so a tool can make decisions, not just the model. Here, a query tool stops after three calls:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">run_query</span> <span class="o">&lt;-</span> <span class="nf">tool</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">  <span class="kr">function</span><span class="p">(</span><span class="n">sql</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="c1"># count_tool_results() is a stand-in for your own helper</span>
</span></span><span class="line"><span class="cl">    <span class="kr">if</span> <span class="p">(</span><span class="nf">count_tool_results</span><span class="p">(</span><span class="nf">tool_context</span><span class="p">()</span><span class="o">$</span><span class="n">turns</span><span class="p">)</span> <span class="o">&gt;=</span> <span class="m">3</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">      <span class="nf">tool_reject</span><span class="p">(</span><span class="s">&#34;Query budget used up. Answer with what you have.&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">}</span>
</span></span><span class="line"><span class="cl">    <span class="n">jsonlite</span><span class="o">::</span><span class="nf">toJSON</span><span class="p">(</span><span class="n">DBI</span><span class="o">::</span><span class="nf">dbGetQuery</span><span class="p">(</span><span class="n">con</span><span class="p">,</span> <span class="n">sql</span><span class="p">),</span> <span class="n">dataframe</span> <span class="o">=</span> <span class="s">&#34;columns&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">  <span class="p">},</span>
</span></span><span class="line"><span class="cl">  <span class="n">name</span> <span class="o">=</span> <span class="s">&#34;run_query&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="n">description</span> <span class="o">=</span> <span class="s">&#34;Run a SQL query&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="n">arguments</span> <span class="o">=</span> <span class="nf">list</span><span class="p">(</span><span class="n">sql</span> <span class="o">=</span> <span class="nf">type_string</span><span class="p">())</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span></span></span></code></pre></div></div>
<p><code>Chat</code> also gains <code>$on_request_start()</code> and <code>$on_request_end()</code>, which fire before and after every request to the model, including each round of the tool loop. For example, to time each request:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">chat</span> <span class="o">&lt;-</span> <span class="nf">chat_anthropic</span><span class="p">()</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">register_tool</span><span class="p">(</span><span class="n">run_query</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">started</span> <span class="o">&lt;-</span> <span class="kc">NULL</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">on_request_start</span><span class="p">(</span><span class="nf">\</span><span class="p">(</span><span class="n">turns</span><span class="p">)</span> <span class="n">started</span> <span class="o">&lt;&lt;-</span> <span class="nf">Sys.time</span><span class="p">())</span>
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">on_request_end</span><span class="p">(</span><span class="nf">\</span><span class="p">(</span><span class="n">turn</span><span class="p">)</span> <span class="nf">message</span><span class="p">(</span><span class="s">&#34;Request took &#34;</span><span class="p">,</span> <span class="nf">round</span><span class="p">(</span><span class="nf">Sys.time</span><span class="p">()</span> <span class="o">-</span> <span class="n">started</span><span class="p">,</span> <span class="m">1</span><span class="p">),</span> <span class="s">&#34;s&#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">chat</span><span class="o">$</span><span class="nf">chat</span><span class="p">(</span><span class="s">&#34;Find the mean of every column in mtcars, one query at a time.&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; Request took 3.6s</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; ◯ [tool call] run_query(sql = &#34;SELECT * FROM mtcars LIMIT 5&#34;)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; ● #&gt; [{&#34;mpg&#34;:21,&#34;cyl&#34;:6,&#34;disp&#34;:160,&#34;hp&#34;:110,&#34;drat&#34;:3.9,&#34;wt&#34;:2.62,&#34;qsec&#34;:16.46,…</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; Now I&#39;ll compute the mean of each column one query at a time, as requested.</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; Request took 2.7s</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; ◯ [tool call] run_query(sql = &#34;SELECT AVG(mpg) AS mean_mpg FROM mtcars&#34;)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; ● #&gt; [{&#34;mean_mpg&#34;:20.0906}]</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; Request took 1.9s</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; ◯ [tool call] run_query(sql = &#34;SELECT AVG(cyl) AS mean_cyl FROM mtcars&#34;)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; ● #&gt; [{&#34;mean_cyl&#34;:6.1875}]</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; Request took 2s</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; ◯ [tool call] run_query(sql = &#34;SELECT AVG(disp) AS mean_disp FROM mtcars&#34;)</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; ■ #&gt; Error: Tool call rejected. Query budget used up. Answer with what you</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; have.</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; It looks like the query budget has been used up, so I can only report the means</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; I was able to compute before being cut off:</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt;</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; | Column | Mean |</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; |--------|------|</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; | mpg | 20.0906 |</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; | cyl | 6.1875 |</span>
</span></span><span class="line"><span class="cl"><span class="c1">#&gt; Request took 3.4s</span></span></span></code></pre></div></div>
<p><code>$on_request_start()</code> also receives the turns about to be sent, so an agent can compact its history with <code>chat$set_turns()</code> before the context window fills up.</p>
<h2 id="acknowledgements">Acknowledgements
</h2>
<p>A big thanks to the 73 people who helped make this release possible by filing issues, contributing code, and asking questions: <a href="https://github.com/1beb" target="_blank" rel="noopener">@1beb</a>, <a href="https://github.com/abiyug" target="_blank" rel="noopener">@abiyug</a>, <a href="https://github.com/aclink88" target="_blank" rel="noopener">@aclink88</a>, <a href="https://github.com/AdaemmerP" target="_blank" rel="noopener">@AdaemmerP</a>, <a href="https://github.com/alesanGreat" target="_blank" rel="noopener">@alesanGreat</a>, <a href="https://github.com/Apollo7777777" target="_blank" rel="noopener">@Apollo7777777</a>, <a href="https://github.com/arnavchauhan7" target="_blank" rel="noopener">@arnavchauhan7</a>, <a href="https://github.com/arunrajes" target="_blank" rel="noopener">@arunrajes</a>, <a href="https://github.com/atheriel" target="_blank" rel="noopener">@atheriel</a>, <a href="https://github.com/awunderground" target="_blank" rel="noopener">@awunderground</a>, <a href="https://github.com/bakaburg1" target="_blank" rel="noopener">@bakaburg1</a>, <a href="https://github.com/bastianolea" target="_blank" rel="noopener">@bastianolea</a>, <a href="https://github.com/bshor" target="_blank" rel="noopener">@bshor</a>, <a href="https://github.com/cerebrixos" target="_blank" rel="noopener">@cerebrixos</a>, <a href="https://github.com/CoryMcCartan" target="_blank" rel="noopener">@CoryMcCartan</a>, <a href="https://github.com/cpsievert" target="_blank" rel="noopener">@cpsievert</a>, <a href="https://github.com/D-M4rk" target="_blank" rel="noopener">@D-M4rk</a>, <a href="https://github.com/dareneiri" target="_blank" rel="noopener">@dareneiri</a>, <a href="https://github.com/debruine" target="_blank" rel="noopener">@debruine</a>, <a href="https://github.com/diegomsg" target="_blank" rel="noopener">@diegomsg</a>, <a href="https://github.com/diegoperoni" target="_blank" rel="noopener">@diegoperoni</a>, <a href="https://github.com/dipterix" target="_blank" rel="noopener">@dipterix</a>, <a href="https://github.com/earthcli" target="_blank" rel="noopener">@earthcli</a>, <a href="https://github.com/etiennebacher" target="_blank" rel="noopener">@etiennebacher</a>, <a href="https://github.com/feddelegrand7" target="_blank" rel="noopener">@feddelegrand7</a>, <a href="https://github.com/FrancescoMonti-source" target="_blank" rel="noopener">@FrancescoMonti-source</a>, <a href="https://github.com/frankiethull" target="_blank" rel="noopener">@frankiethull</a>, <a href="https://github.com/gadenbuie" target="_blank" rel="noopener">@gadenbuie</a>, <a href="https://github.com/hadley" target="_blank" rel="noopener">@hadley</a>, <a href="https://github.com/hectorgray" target="_blank" rel="noopener">@hectorgray</a>, <a href="https://github.com/hopessugar" target="_blank" rel="noopener">@hopessugar</a>, <a href="https://github.com/hswerdfe" target="_blank" rel="noopener">@hswerdfe</a>, <a href="https://github.com/JamesHWade" target="_blank" rel="noopener">@JamesHWade</a>, <a href="https://github.com/jamesinottawa" target="_blank" rel="noopener">@jamesinottawa</a>, <a href="https://github.com/jcheng5" target="_blank" rel="noopener">@jcheng5</a>, <a href="https://github.com/jcrodriguez1989" target="_blank" rel="noopener">@jcrodriguez1989</a>, <a href="https://github.com/jeroenjanssens" target="_blank" rel="noopener">@jeroenjanssens</a>, <a href="https://github.com/JosiahParry" target="_blank" rel="noopener">@JosiahParry</a>, <a href="https://github.com/jrosell" target="_blank" rel="noopener">@jrosell</a>, <a href="https://github.com/kaipingyang" target="_blank" rel="noopener">@kaipingyang</a>, <a href="https://github.com/karawoo" target="_blank" rel="noopener">@karawoo</a>, <a href="https://github.com/kbenoit" target="_blank" rel="noopener">@kbenoit</a>, <a href="https://github.com/kchou496" target="_blank" rel="noopener">@kchou496</a>, <a href="https://github.com/klin333" target="_blank" rel="noopener">@klin333</a>, <a href="https://github.com/kolabearafk" target="_blank" rel="noopener">@kolabearafk</a>, <a href="https://github.com/ksr-zguo" target="_blank" rel="noopener">@ksr-zguo</a>, <a href="https://github.com/lazasaurus-ai" target="_blank" rel="noopener">@lazasaurus-ai</a>, <a href="https://github.com/lionel-" target="_blank" rel="noopener">@lionel-</a>, <a href="https://github.com/MLiedgens" target="_blank" rel="noopener">@MLiedgens</a>, <a href="https://github.com/n8layman" target="_blank" rel="noopener">@n8layman</a>, <a href="https://github.com/nbenn" target="_blank" rel="noopener">@nbenn</a>, <a href="https://github.com/neil-bray" target="_blank" rel="noopener">@neil-bray</a>, <a href="https://github.com/nrineausanofi" target="_blank" rel="noopener">@nrineausanofi</a>, <a href="https://github.com/ntentes" target="_blank" rel="noopener">@ntentes</a>, <a href="https://github.com/omorante" target="_blank" rel="noopener">@omorante</a>, <a href="https://github.com/petzi53" target="_blank" rel="noopener">@petzi53</a>, <a href="https://github.com/rajabzadehalidip" target="_blank" rel="noopener">@rajabzadehalidip</a>, <a href="https://github.com/rempsyc" target="_blank" rel="noopener">@rempsyc</a>, <a href="https://github.com/Sade154" target="_blank" rel="noopener">@Sade154</a>, <a href="https://github.com/sarahsdao" target="_blank" rel="noopener">@sarahsdao</a>, <a href="https://github.com/scjohannes" target="_blank" rel="noopener">@scjohannes</a>, <a href="https://github.com/simonpcouch" target="_blank" rel="noopener">@simonpcouch</a>, <a href="https://github.com/Sirhubi007" target="_blank" rel="noopener">@Sirhubi007</a>, <a href="https://github.com/SokolovAnatoliy" target="_blank" rel="noopener">@SokolovAnatoliy</a>, <a href="https://github.com/sounkou-bioinfo" target="_blank" rel="noopener">@sounkou-bioinfo</a>, <a href="https://github.com/stefanlinner" target="_blank" rel="noopener">@stefanlinner</a>, <a href="https://github.com/t-kalinowski" target="_blank" rel="noopener">@t-kalinowski</a>, <a href="https://github.com/Tazinho" target="_blank" rel="noopener">@Tazinho</a>, <a href="https://github.com/thisisnic" target="_blank" rel="noopener">@thisisnic</a>, <a href="https://github.com/thoov08" target="_blank" rel="noopener">@thoov08</a>, <a href="https://github.com/trangdata" target="_blank" rel="noopener">@trangdata</a>, <a href="https://github.com/WvdH-Novus3" target="_blank" rel="noopener">@WvdH-Novus3</a>, and <a href="https://github.com/xmarquez" target="_blank" rel="noopener">@xmarquez</a>.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-14_ellmer-0-5-0/featured.jpg" length="385161" type="image/jpeg" />
    </item>
    <item>
      <title>orbital 0.7.0</title>
      <link>https://opensource.posit.co/blog/2026-09-09_orbital-0-7-0/</link>
      <pubDate>Wed, 09 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-09_orbital-0-7-0/</guid>
      <dc:creator>Emil Hvitfeldt</dc:creator><description><![CDATA[<p>We&rsquo;re happy to announce the release of <a href="https://orbital.tidymodels.org/" target="_blank" rel="noopener">R-orbital</a> 0.7.0.
orbital turns a fitted tidymodels workflow into the set of equations that produce its predictions,
so you can run those predictions in a database instead of moving the data to R.
It uses <a href="https://tidypredict.tidymodels.org/" target="_blank" rel="noopener">tidypredict</a> under the hood to translate fitted models.
This post also covers the release of tidypredict 1.2.0.</p>
<p>This post is about the R package.
There is also a <a href="https://posit-dev.github.io/orbital/" target="_blank" rel="noopener">Python version of orbital</a> that works on scikit-learn pipelines.</p>
<p>You can install both from CRAN with:</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">install.packages</span><span class="p">(</span><span class="nf">c</span><span class="p">(</span><span class="s">&#34;orbital&#34;</span><span class="p">,</span> <span class="s">&#34;tidypredict&#34;</span><span class="p">))</span></span></span></code></pre></div></div>
<p>This post covers the highlights of these releases.
You can see the full list of changes in the <a href="https://orbital.tidymodels.org/news/index.html" target="_blank" rel="noopener">orbital release notes</a> and the <a href="https://tidypredict.tidymodels.org/news/index.html" target="_blank" rel="noopener">tidypredict release notes</a>.</p>
<h2 id="a-lot-more-models">A lot more models
</h2>
<p>Previously orbital and tidypredict supported a handful of useful models.
This included linear models, decision trees, random forests, and boosted trees models.
This release adds discriminant analysis, naive Bayes, neural networks, support vector machines, partial least squares,
and several more rule and ensemble methods.
This fills in the gaps of most of the known models that can be made to work with orbital.</p>
<p>Newly supported for regression:</p>
<ul>
<li><code>bart(engine = &quot;dbarts&quot;)</code></li>
<li><code>boost_tree(engine = &quot;h2o_gbm&quot;)</code></li>
<li><code>linear_reg(engine = &quot;glm&quot;)</code></li>
<li><code>mlp(engine = &quot;nnet&quot;)</code></li>
<li><code>null_model()</code></li>
<li><code>pls(engine = &quot;mixOmics&quot;)</code></li>
<li><code>rand_forest(engine = &quot;aorsf&quot;)</code></li>
<li><code>rand_forest(engine = &quot;partykit&quot;)</code></li>
<li><code>rule_fit(engine = &quot;h2o&quot;)</code></li>
<li><code>svm_linear(engine = &quot;kernlab&quot;)</code></li>
<li><code>svm_linear(engine = &quot;LiblineaR&quot;)</code></li>
</ul>
<p>Newly supported for classification:</p>
<ul>
<li><code>bag_tree(engine = &quot;rpart&quot;)</code> and <code>bag_tree(engine = &quot;C5.0&quot;)</code></li>
<li><code>boost_tree(engine = &quot;C5.0&quot;)</code></li>
<li><code>boost_tree(engine = &quot;h2o_gbm&quot;)</code></li>
<li><code>C5_rules(engine = &quot;C5.0&quot;)</code></li>
<li><code>decision_tree(engine = &quot;C5.0&quot;)</code></li>
<li><code>discrim_linear(engine = &quot;MASS&quot;)</code>, <code>discrim_quad(engine = &quot;MASS&quot;)</code></li>
<li><code>discrim_linear()</code> with the <code>&quot;mda&quot;</code>, <code>&quot;sda&quot;</code>, and <code>&quot;sparsediscrim&quot;</code> engines</li>
<li><code>logistic_reg(engine = &quot;LiblineaR&quot;)</code></li>
<li><code>mlp(engine = &quot;nnet&quot;)</code></li>
<li><code>multinom_reg(engine = &quot;nnet&quot;)</code></li>
<li><code>naive_Bayes(engine = &quot;klaR&quot;)</code> and <code>naive_Bayes(engine = &quot;naivebayes&quot;)</code></li>
<li><code>null_model()</code></li>
<li><code>pls(engine = &quot;mixOmics&quot;)</code></li>
<li><code>rule_fit(engine = &quot;h2o&quot;)</code></li>
<li><code>rule_fit(engine = &quot;xrf&quot;)</code></li>
<li><code>svm_linear(engine = &quot;kernlab&quot;)</code></li>
<li><code>svm_linear(engine = &quot;LiblineaR&quot;)</code></li>
</ul>
<p>One thing worth noting for models with &ldquo;h2o&rdquo; in their engine value, is that you need a running H2O cluster to build the orbital object.
Prediction and SQL generation from the orbital object stays dependency free.</p>
<p>Here is an example of linear discriminant analysis model,
which was not supported before this release,
fit on the penguins data and then run in DuckDB.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">tidymodels</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">discrim</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">orbital</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">duckdb</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">data</span><span class="p">(</span><span class="n">penguins</span><span class="p">,</span> <span class="n">package</span> <span class="o">=</span> <span class="s">&#34;modeldata&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="n">penguins</span> <span class="o">&lt;-</span> <span class="n">tidyr</span><span class="o">::</span><span class="nf">drop_na</span><span class="p">(</span><span class="n">penguins</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">rec_spec</span> <span class="o">&lt;-</span> <span class="nf">recipe</span><span class="p">(</span><span class="n">species</span> <span class="o">~</span> <span class="n">.,</span> <span class="n">data</span> <span class="o">=</span> <span class="n">penguins</span><span class="p">)</span> <span class="o">|&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="nf">step_dummy</span><span class="p">(</span><span class="nf">all_nominal_predictors</span><span class="p">())</span> <span class="o">|&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="nf">step_normalize</span><span class="p">(</span><span class="nf">all_numeric_predictors</span><span class="p">())</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">mod_spec</span> <span class="o">&lt;-</span> <span class="nf">discrim_linear</span><span class="p">(</span><span class="n">engine</span> <span class="o">=</span> <span class="s">&#34;MASS&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">wf_spec</span> <span class="o">&lt;-</span> <span class="nf">workflow</span><span class="p">(</span><span class="n">rec_spec</span><span class="p">,</span> <span class="n">mod_spec</span><span class="p">)</span> <span class="o">|&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="nf">fit</span><span class="p">(</span><span class="n">penguins</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">orb</span> <span class="o">&lt;-</span> <span class="nf">orbital</span><span class="p">(</span><span class="n">wf_spec</span><span class="p">,</span> <span class="n">type</span> <span class="o">=</span> <span class="nf">c</span><span class="p">(</span><span class="s">&#34;class&#34;</span><span class="p">,</span> <span class="s">&#34;prob&#34;</span><span class="p">))</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">con</span> <span class="o">&lt;-</span> <span class="n">DBI</span><span class="o">::</span><span class="nf">dbConnect</span><span class="p">(</span><span class="n">duckdb</span><span class="o">::</span><span class="nf">duckdb</span><span class="p">())</span>
</span></span><span class="line"><span class="cl"><span class="n">penguins_db</span> <span class="o">&lt;-</span> <span class="n">dplyr</span><span class="o">::</span><span class="nf">copy_to</span><span class="p">(</span><span class="n">con</span><span class="p">,</span> <span class="n">penguins</span><span class="p">,</span> <span class="s">&#34;penguins&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">predict</span><span class="p">(</span><span class="n">orb</span><span class="p">,</span> <span class="n">penguins_db</span><span class="p">)</span></span></span></code></pre></div></div>
<pre><code># A query:  ?? x 4
# Database: DuckDB 1.5.5 [root@Darwin 25.6.0:R 4.6.1/:memory:]
   .pred_class .pred_Adelie .pred_Chinstrap .pred_Gentoo
   &lt;chr&gt;              &lt;dbl&gt;           &lt;dbl&gt;        &lt;dbl&gt;
 1 Adelie             1.000        6.43e- 9     4.64e-25
 2 Adelie             1.000        5.25e- 6     8.81e-16
 3 Adelie             1.000        1.97e- 4     2.61e-17
 4 Adelie             1.000        2.99e- 8     1.93e-23
 5 Adelie             1.000        8.34e- 9     4.42e-29
 6 Adelie             1.000        1.60e- 6     4.14e-20
 7 Adelie             1.000        6.03e-10     1.45e-18
 8 Adelie             0.999        6.47e- 4     4.16e-20
 9 Adelie             1.000        9.56e-10     1.97e-30
10 Adelie             1.000        6.73e-14     9.13e-27
# ℹ more rows
</code></pre>
<p>We have documented the <a href="https://orbital.tidymodels.org/articles/supported-models.html" target="_blank" rel="noopener">list of supported models</a>.
If there is a model you need that is still missing,
<a href="https://github.com/tidymodels/tidypredict/issues" target="_blank" rel="noopener">let us know</a> so we can prioritize it.</p>
<h2 id="when-a-model-has-no-probability">When a model has no probability
</h2>
<p>While we added these new methods we ran into a problem we didn&rsquo;t have before.
For many classification models you get both predicted probabilities and hard class predictions.
This release has added models where that is not the case.
A number of newly added models only produce hard class predictions.</p>
<p>Instead of trying to invent class probabilities,
we produce an informative error for the affected models.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">c5_wf</span> <span class="o">&lt;-</span> <span class="nf">workflow</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">  <span class="n">species</span> <span class="o">~</span> <span class="n">.,</span>
</span></span><span class="line"><span class="cl">  <span class="nf">decision_tree</span><span class="p">(</span><span class="n">mode</span> <span class="o">=</span> <span class="s">&#34;classification&#34;</span><span class="p">,</span> <span class="n">engine</span> <span class="o">=</span> <span class="s">&#34;C5.0&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="p">)</span> <span class="o">|&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="nf">fit</span><span class="p">(</span><span class="n">penguins</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">orbital</span><span class="p">(</span><span class="n">c5_wf</span><span class="p">,</span> <span class="n">type</span> <span class="o">=</span> <span class="s">&#34;prob&#34;</span><span class="p">)</span></span></span></code></pre></div></div>
<pre><code>Error in `orbital()`:
! &quot;prob&quot; predictions are not available for this model.
ℹ It predicts a class directly, with no probability behind it.
ℹ Use `type = &quot;class&quot;` instead.
</code></pre>
<h2 id="tidypredict-is-now-a-toolkit-not-just-a-function">tidypredict is now a toolkit, not just a function
</h2>
<p>We have talked a lot about orbital so far.
This is because we think that it is the ideal interface compared to tidypredict,
if your goal is to generate SQL expressions for a fitted model or workflow.</p>
<p>orbital and tidypredict work together to generate the expression that you need.
We have expanded tidypredict with a number of generics,
which are all developer focused.
With the goal that packages other than orbital can benefit from the work we have done.
Three of them describe what a model&rsquo;s fitted expressions compute:</p>
<ul>
<li><code>tidypredict_output_type()</code> returns <code>&quot;numeric&quot;</code>, <code>&quot;prob&quot;</code>, <code>&quot;decision&quot;</code>, or <code>&quot;class&quot;</code></li>
<li><code>tidypredict_outcome_levels()</code> returns the outcome levels in model order</li>
<li><code>tidypredict_normalized()</code> reports whether per-level probabilities already sum to one</li>
</ul>
<p>Below we see two of the generics in action.</p>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">library</span><span class="p">(</span><span class="n">tidypredict</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="n">svm_fit</span> <span class="o">&lt;-</span> <span class="nf">svm_linear</span><span class="p">(</span><span class="n">mode</span> <span class="o">=</span> <span class="s">&#34;classification&#34;</span><span class="p">,</span> <span class="n">engine</span> <span class="o">=</span> <span class="s">&#34;LiblineaR&#34;</span><span class="p">)</span> <span class="o">|&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="nf">fit</span><span class="p">(</span><span class="n">sex</span> <span class="o">~</span> <span class="n">bill_length_mm</span> <span class="o">+</span> <span class="n">body_mass_g</span><span class="p">,</span> <span class="n">data</span> <span class="o">=</span> <span class="n">penguins</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">tidypredict_output_type</span><span class="p">(</span><span class="n">svm_fit</span><span class="o">$</span><span class="n">fit</span><span class="p">)</span></span></span></code></pre></div></div>
<pre><code>[1] &quot;decision&quot;
</code></pre>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">tidypredict_outcome_levels</span><span class="p">(</span><span class="n">svm_fit</span><span class="o">$</span><span class="n">fit</span><span class="p">)</span></span></span></code></pre></div></div>
<pre><code>[1] &quot;female&quot; &quot;male&quot;  
</code></pre>
<p>The other five expose the per-tree pieces that <code>tidypredict_fit()</code> assembles,
so a package generating its own code can split an ensemble apart and put it back together:</p>
<ul>
<li><code>tidypredict_trees()</code> returns per-tree expressions</li>
<li><code>tidypredict_n_trees()</code> returns the number of trees</li>
<li><code>tidypredict_combine_trees()</code> turns per-tree expressions back into a prediction</li>
<li><code>tidypredict_class_trees()</code> returns per-tree expressions for each outcome level</li>
<li><code>tidypredict_class_exprs()</code> returns one finished expression per outcome level</li>
</ul>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="n">rf</span> <span class="o">&lt;-</span> <span class="nf">rand_forest</span><span class="p">(</span><span class="n">mode</span> <span class="o">=</span> <span class="s">&#34;regression&#34;</span><span class="p">,</span> <span class="n">trees</span> <span class="o">=</span> <span class="m">5</span><span class="p">,</span> <span class="n">engine</span> <span class="o">=</span> <span class="s">&#34;ranger&#34;</span><span class="p">)</span> <span class="o">|&gt;</span>
</span></span><span class="line"><span class="cl">  <span class="nf">fit</span><span class="p">(</span><span class="n">body_mass_g</span> <span class="o">~</span> <span class="n">bill_length_mm</span> <span class="o">+</span> <span class="n">flipper_length_mm</span><span class="p">,</span> <span class="n">data</span> <span class="o">=</span> <span class="n">penguins</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nf">tidypredict_n_trees</span><span class="p">(</span><span class="n">rf</span><span class="o">$</span><span class="n">fit</span><span class="p">)</span></span></span></code></pre></div></div>
<pre><code>[1] 5
</code></pre>
<div class="code-block"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-r" data-lang="r"><span class="line"><span class="cl"><span class="nf">tidypredict_combine_trees</span><span class="p">(</span><span class="n">rf</span><span class="o">$</span><span class="n">fit</span><span class="p">,</span> <span class="n">rlang</span><span class="o">::</span><span class="nf">syms</span><span class="p">(</span><span class="nf">paste0</span><span class="p">(</span><span class="s">&#34;tree_&#34;</span><span class="p">,</span> <span class="m">1</span><span class="o">:</span><span class="m">5</span><span class="p">)))</span></span></span></code></pre></div></div>
<pre><code>(tree_1 + tree_2 + tree_3 + tree_4 + tree_5)/5
</code></pre>
<p>A lot of this logic was hardcoded inside orbital on a model by model basis,
it is now formalized in such a way that you can easily use just the bits you need.</p>
<h2 id="acknowledgements">Acknowledgements
</h2>
<p>Many thanks to all the people who contributed to orbital and tidypredict since the last release!</p>
<p><a href="https://github.com/EmilHvitfeldt" target="_blank" rel="noopener">@EmilHvitfeldt</a>, <a href="https://github.com/jannikbx" target="_blank" rel="noopener">@jannikbx</a>, and <a href="https://github.com/RAMitchell" target="_blank" rel="noopener">@RAMitchell</a>.</p>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-09_orbital-0-7-0/featured.jpg" length="402596" type="image/jpeg" />
    </item>
    <item>
      <title>Positron September Release Highlights</title>
      <link>https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release/</link>
      <pubDate>Wed, 09 Sep 2026 00:00:00 +0000</pubDate>
      <guid>https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release/</guid>
      <dc:creator>Julia Silge</dc:creator><description><![CDATA[<div class="callout callout-note" role="note" aria-label="Note">
<div class="callout-header">
<span class="callout-title">Note</span>
</div>
<div class="callout-body">
<p><a href="https://positron.posit.co" target="_blank" rel="noopener">Positron</a> is Posit&rsquo;s new, next-generation IDE for data science. Positron is designed to be an extensible, polyglot tool for exploring data and reproducible authoring in Python, R, and more.</p>
</div>
</div>
<p>Welcome back to another edition of our monthly Positron updates! Each month we share highlights from our <a href="https://positron.posit.co/release-notes" target="_blank" rel="noopener">latest release</a> and useful resources. <a href="https://opensource.posit.co/blog/2026-08-13_positron-2026-08-release">Last release</a> we told you about new Data Connections sources, a round of polish for inline output in Quarto documents, and help installing missing packages. This milestone brings a redesigned welcome page, a first version of Import Data, new Posit Assistant features, expanded Data Connections, package vulnerability scanning, and a more responsive Console.</p>
<h2 id="welcome-page-refresh-and-interpreter-setup">Welcome page refresh and interpreter setup
</h2>
<p>We redesigned the Positron welcome page. It now leads with an environment setup card that checks whether Python and R are ready to use, with actions to help resolve any problem it finds. The Positron badge and name now come with a <strong>Help</strong> button that opens the Help pane, and a banner links to the walkthroughs, including a new &ldquo;Get Started with Positron&rdquo; walkthrough that covers the Positron panes, keyboard shortcuts, built-in extensions, and Git.</p>
<img src="https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release/welcome-page.gif" data-fig-align="center" data-fig-alt="The redesigned Positron Welcome page, showing an Environment setup card with Python checks (3 of 4 passed) including a Create Python Environment button, and R already set up successfully." />
<p>The environment setup theme continues into interpreter selection itself. When you select a Python managed by your operating system or a package manager, Positron now offers to create a virtual environment for your workspace instead of installing packages into that shared interpreter. With no folder open, the environment Positron creates now lives at <code>~/.virtualenvs/positron</code> rather than <code>~/.venv</code>, so it stays in the interpreter picker after a restart, and Positron asks before creating an environment in your home directory. We also removed the confusing startup notification that reported no interpreters were found while linking to documentation saying no setup was needed, and interpreters installed under <code>/opt/python</code> are now labeled <code>Global</code> instead of <code>Unknown</code> in the interpreter picker.</p>
<h2 id="import-data">Import Data
</h2>
<p>Before we started work this month, importing data via the Positron UI was our most upvoted feature request and this release now delivers a first version. When you view a CSV or TSV file in the Data Explorer, a new <strong>Import Data</strong> button in the action bar opens a dialog. The dialog shows the code to load that file into a data frame. You can copy the code, or click <strong>Import</strong> to run it in the console, starting a session if one is not already running.</p>
<img src="https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release/import-data-excel.gif" data-fig-align="center" data-fig-alt="An Excel spreadsheet open in the Data Explorer with an Import Data button in the action bar, next to a Python console session ready to run the generated import code." />
<p>Import Data supports CSV and TSV files in Python with pandas and in R with the readr package, as well as Excel workbooks and Parquet files (with readxl and nanoparquet in R). The generated code can reproduce the filters and sorts you have applied in the Data Explorer, and it names the file by a workspace-relative path when the file is inside your workspace, so the code is easier to share and rerun. You can open the dialog from the Data Explorer, the File menu, the Variables pane, or the File Explorer context menu.</p>
<h2 id="posit-assistant">Posit Assistant
</h2>
<p>This release brings a new <strong>Agent Layout</strong> that opens <a href="https://pos.it/assistant" target="_blank" rel="noopener">Posit Assistant</a> in the editor area with a compact Session pane, giving you more visibility into the agent&rsquo;s actions as it works alongside your code. Configuring language model providers also gets a redesign. Our new Configure LLM Providers modal groups providers by connection state, so you can see at a glance which providers are ready to use. If you have trouble with the new dialog and need to switch back, set <a href="positron://settings/assistant.newProviderModal"><code>assistant.newProviderModal</code></a> to <code>false</code>.</p>
<img src="https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release/provider-modal-dialog.png" data-fig-align="center" data-fig-alt="The Configure LLM Providers modal in Positron, listing connected providers (Posit AI Pass, Anthropic, GitHub Copilot) and additional model providers available to connect (Amazon Bedrock, Microsoft Foundry, OpenAI)." />
<p>You can now configure multiple custom providers, each with its own name, type, endpoint, credential, and model list; the previous single &ldquo;Custom Provider&rdquo; option is now called &ldquo;OpenAI Compatible&rdquo; to better match what it actually does. Amazon Bedrock users get a smoother experience as well. An expired AWS SSO session can be renewed right from the provider modal instead of requiring <code>aws sso login</code> in a terminal, and the AWS profile and region can now be set in the configuration dialog rather than only through environment variables or a hand-edited <code>providers.json</code>. Speaking of which, <code>providers.json</code> now accepts comments, and your comments survive edits that Positron makes to the file.</p>
<h2 id="data-connections">Data Connections
</h2>
<p>The Data Connections preview keeps growing. A new ODBC data connection driver lets you browse any database with an installed ODBC driver in the Connections pane and open it in the Data Explorer. Data sources already configured on your machine appear automatically. Databricks gains OAuth sign-in on desktop and reads <code>DATABRICKS_TOKEN</code>, <code>DATABRICKS_HOST</code>, and <code>DATABRICKS_CONFIG_FILE</code> credentials managed by Posit Workbench automatically. A <strong>Disconnect</strong> option in the context menu closes a connection and any Data Explorers opened from it, and each data connection driver now gets its own log output channel.</p>
<p>Smaller improvements round out the preview. You can now set <a href="positron://settings/dataConnections.enabled"><code>dataConnections.enabled</code></a> per workspace, so a repository can turn on the Connections pane for anyone who opens it. The tree is shallower so table and column names get more of the panel&rsquo;s width, and a new <a href="positron://settings/dataConnections.tree.indent"><code>dataConnections.tree.indent</code></a> setting controls the indentation. DuckDB connections now default to read-only, so the Connections pane and a Python or R session can have the same database open at once; when a lock conflict does happen, the error now explains that another session has locked the database.</p>
<h2 id="package-security-vulnerabilities">Package security vulnerabilities
</h2>
<p>The Packages pane now shows known security vulnerabilities (Common Vulnerabilities and Exposures scoring) for installed Python and R packages, so you can see at a glance whether something in your environment has a known CVE. The data comes from your environment&rsquo;s own Posit Package Manager repository when it has one, and from the public Posit instance otherwise, so what you see reflects the same package source your organization already governs.</p>
<img src="https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release/packages-pane-cve.png" data-fig-align="center" data-fig-alt="The Packages pane showing the tornado package&#39;s Security tab with three known vulnerabilities listed by severity, each with a CVSS score, description, and the version where it was fixed." />
<h2 id="a-more-responsive-console">A more responsive Console
</h2>
<p>Console code submission is now faster, always shows visual feedback, and can be canceled while a completeness check is in flight; the Console no longer waits indefinitely with no feedback when a kernel is slow or unreachable. The Console breaks multi-statement input into complete expressions and executes them statement by statement for languages that support it. A new <a href="positron://settings/console.promptWhenIncomplete"><code>console.promptWhenIncomplete</code></a> setting runs submitted code immediately without a completeness check.</p>
<p>A few more Console fixes are worth knowing about. The Console no longer takes focus at runtime startup when you are working in another view or editor, <strong>Interrupt</strong> stays visible after switching between busy consoles, and session names now ellipsize to fit as the console tab list narrows.</p>
<h2 id="whats-coming-next">What&rsquo;s coming next
</h2>
<ul>
<li>posit::conf(2026) is next week! Our team will have several sessions on Positron, and there is still time to <a href="https://conf.posit.co/2026/" target="_blank" rel="noopener">register</a> to join us virtually from anywhere in the world.</li>
<li>Meet Posit at <a href="https://posit.co/events/cdao-government-2026" target="_blank" rel="noopener">CDAO Government</a> on September 22-23 in Washington, D.C. Stop by our booth to talk data modernization and where agentic AI fits in government.</li>
</ul>
<div class="callout callout-tip" role="note" aria-label="Tip">
<div class="callout-header">
<span class="callout-title">Tip</span>
</div>
<div class="callout-body">
<p><a href="https://positron.posit.co/download" target="_blank" rel="noopener">Download Positron</a> to try out the new features and improvements in this release!</p>
</div>
</div>
]]></description>
      <enclosure url="https://opensource.posit.co/blog/2026-09-09_positron-2026-09-release/featured.svg" length="93678" type="image/svg&#43;xml" />
    </item>
  </channel>
</rss>
