We’re excited to announce the release of commons 0.2.0. commons is an R and Python package that helps data scientists build trustworthy data analysis agents. Among other things, this release makes commons interoperable with other coding agents and adds two new features to commons apps: Share (to Connect) and Quarto artifacts.
To install the R package from CRAN, run:
install.packages("commons")It will be a few weeks before the 0.2.0 release of commons is out on PyPI. To install the current version of the Python package, run:
pip install commonsIf you’re new to commons, the introductory post covers the package’s design philosophy. This post highlights the biggest changes in 0.2.0; for a full list of changes, see the NEWS.
Interoperability#
For commons 0.2.0, we wanted to make trusted code and context available independent of agent harness, including to coding agents like Posit Assistant, Claude Code, and Codex.
In service of this, we split the commons() function into two, decoupling the structure that holds the commons information layers from the agent harness. Calls to commons() previously looked like this:
commons <- commons(
client,
data_sources,
semantic_layer,
context_layer
)This interface coupled two things that should have been independent: assembling the data structure that holds trusted calculations and context, and creating an agent to use them.
commons() now only creates the data structure, while a new function, agent(), creates the agent harness:
commons <- commons(
data_sources = data_sources,
semantic_layer = semantic_layer,
context_layer = context_layer
)
agent <- agent(client, commons = commons)We call that first data structure “the commons.” Because the commons is now separated from the agent harness, you can use it to access trusted code and context directly from R, enabling the use of commons with other coding agents. For example, here’s Posit Assistant using the commons behind the DevRel Agent, an agent we use at Posit for answering questions about our open source projects.
In the above example, devrel is the commons. The agent runs “normal R code” to interface with it. For coding agents that don’t already have a persistent R session, like Claude Code and Codex, we recommend mcp-console.
This split also means that commons users can use one commons across multiple projects. For example, a commons could be defined in an R package, and then used both in a Shiny app (by invoking the trusted code directly) and in an agent (by calling agent() on the commons).
This transition maintains backward compatibility. Calls using the old commons() interface will continue to work, but raise a deprecation warning with migration instructions. See ?commons() and the new “Sharing a commons across projects” vignette to learn more.
Sharing#
On Posit Connect, users can now share conversations, documents, plots, or tables as static content they own. For example, we can click the “Share” button beside plots created with the deployed DevRel Agent and then share a link with collaborators:
For plots and tables, the deployed page will include the source code, creation date, and a link back to the original agent.
(Since the public-facing deployment of DevRel Agent is publicly available on Posit Connect Cloud rather than internally deployed, that deployment of the agent will not have sharing enabled.)
To enable this feature in existing commons apps, redeploy them with the new commons version. No other changes are needed.
Artifacts#
commons agents can now also write self-contained, sharable reports as Quarto documents.
When users mention writing reports or creating something sharable, the agent can load an agent skill and then stream document code directly into a chat drawer. Documents get their data by calling commons() methods in their code, and they can be shared in the same way plots and tables can be.
What’s next#
We’re super grateful for all of the feedback since the initial release of commons, and we’re excited to have this release out! Only the R side of commons 0.2.0 has been released; keep an eye out in the coming weeks for a release on the Python side with analogous features.
In the coming months, we’ll be focused on another substantial commons release. Our main focus is continuing to make commons apps feel like modern, powerful chat apps, including letting agents create interactive applications as artifacts. We’re also interested in “loops,” where a user could, for example, request that a report be regenerated and sent to them weekly. If you have thoughts on where you’d like to see commons go, feel free to reach out on our issue tracker.



