marimo pair. The shared canvas for agent-developer collaboration. On a dark grid, a terminal window holds a folder labeled data.csv; a red line runs from it across the page into a bright, layered swirl of data visualizations. Moving AI from the file system into the live Python kernel.

Putting a Coding Agent Inside a Live marimo Notebook, a Visual Guide

TL;DR: Coding agents are great when the files on disk are the whole story. Data work isn't like that: what matters is the data frame sitting in memory and the plot you just made. marimo pair is an agent skill that puts Claude Code, Codex or any other agent inside a running marimo notebook, with one tool, run Python in the kernel, so it can see the same live state you do and build the notebook cell by cell.

Coding agents have gotten really good at one kind of work. You scope a feature, edit some files, run the tests and ship it, and all of it happens on disk. Data work feels different. You load something, look at it, run a cell, watch how it responds, and pick your next move from whatever is sitting in memory. Until recently, an agent couldn't see any of that. It saw the files and never the live state.

marimo pair is built to close that gap. marimo is a reactive Python notebook, and marimo pair is a skill that drops your agent of choice into an active marimo kernel, the running Python process behind the notebook. Once it's in there, the agent can list variables, look at a data frame's real columns, create and run cells, and find out right away whether any of it worked. The notebook becomes a shared canvas: you point, and the agent runs the code.

This guide starts with why notebooks have been awkward for agents, from the workflow mismatch to the trouble with .ipynb files. Then it covers what marimo pair is, why marimo's reactive model matters, the single "run Python" tool behind it, and what live inspection does for tokens and results. After that: the decision to work with the agents people already use, how the skill dodges version drift, installation (with a short detour into how deno ended up on PyPI), pairing on real data, remote kernels on molab, the roadmap, and why you always end up with a reproducible notebook.

Listen to the full episode

Why AI coding agents struggle with data science work

Coding agents mastered the file system. But data work doesn't live on disk. Software engineering: a loop of scope feature, edit files, run tests, ship. Data science: load data, inspect memory, run cell, decide next move, with the agent cut off by a red X. Agents only see the files. They never see the live state.

Agents are at their best when the file system is the source of truth. They edit files, then run stateless commands like the test suite to see what those edits did. If something breaks, they read the error and try again. That tight loop is why you can hand an agent a long-lived task and come back later: it corrects itself without you.

Data work doesn't fit that loop. It runs through memory: load the data, look at it, run a cell, decide what to do next. Pointed at a notebook out of the box, whether that's marimo, Jupyter, JupyterLab or Google Colab, a coding agent tends to feel awkward and unsatisfying compared with ordinary software work. It can edit the notebook file, but nothing in that file is the live session. So the notebook can end up in an inconsistent state, and the agent often can't see the output of the cell it just changed. Without that output it never gets into the self-correcting loop that makes it useful for code.

The image above shows the split. On one side there's a loop around files. On the other, the loop passes through memory, which is exactly the part the agent couldn't reach.

The marimo team's reaction was to start from the bottom up. They stopped asking how to let an agent read a notebook, and asked how to open marimo up so it's useful to an agent, rather than a data source the agent can query. The goal became extending the agent's working environment with a notebook, the same way people have used notebooks for data tasks all along.

That reframing sets up the rest of this guide. The next two sections look at why the notebook file is a poor thing to hand an agent, and at what a stateful environment gives an agent that the file system can't.

“But when you tried to apply it to a data problem, things would happen where you edit the file and then you could get to some inconsistent state inside the notebook, or the agent couldn't actually see the actions that it performed inside that notebook.”

Trevor Manz

Why Jupyter .ipynb files are hard for AI agents to read

Agents today must guess the state of your data. A beam labeled grep search hits a wall of notebook JSON marked The .ipynb Problem. Raw code grepping: the agent reads pd.read_csv(...) but cannot see the data. Stale output: thousands of lines of JSON, with no guarantee it reflects the current execution order.

An .ipynb file is the JSON that defines a Jupyter notebook. It holds each cell's definition, the code or Markdown, and also all of the cell's output. If a cell printed a thousand rows, those thousand rows are embedded in the JSON.

An agent trying to make sense of that file has to skim through all of the output and decide what matters. Most of it doesn't. Some of it does. Then there's the nastier problem: nothing enforces the order the cells ran in. If they ran out of order, the output saved in the file can be stale compared with the code next to it, and an agent that trusts it would be wrong. In effect the agent is told to work on the notebook and handed 10,000 lines of extra material that may help or hurt, with no way to tell which.

That points to a different way of seeing the file. For notebooks, the file is what the work leaves behind, more than where the code comes from. The real authoring happens in the editor together with the live state, in an interactive environment. An agent that edits the file on disk with its usual tools misses the context the file was written in, and it gets flooded with context that does nothing for the task. Both problems point the same way: an agent that works only on the file misses the live context and gets a lot of noise.

A marimo notebook is stored differently. The marimo docs describe every notebook as pure Python, which makes it git-friendly and runnable as a script. Here is a small one, checked with marimo 0.25.2:

import marimo

__generated_with = "0.25.2"
app = marimo.App()

@app.cell
def _():
    x = 21
    return (x,)

@app.cell
def _(x):
    y = x * 2
    y
    return

if __name__ == "__main__":
    app.run()

Each @app.cell function is one cell. Its parameters are the variables it reads from other cells and its return lists what it defines, so the file itself records how the cells depend on each other. Running python notebook.py executes it like any script. Even so, the file is a record of the work, and the live values still sit in memory, which is the subject of the next section.

“For notebooks, these file formats are more the artifact of the work rather than the source necessarily of the code.”

Trevor Manz

Files on disk vs. values in memory: giving agents a REPL

The paradigm shift: disk vs. memory. File-based agents vs. kernel-based agents. Source of truth: static files on disk, or live in-memory variables. Context: grepping 100k lines, or live schema inspection, df.schema(). Action: edit, save, run tests, or iterative cell execution. Blind generation, or interactive, shared exploration.

Out of the box, a coding agent can read files, write files and run bash scripts. That toolkit fits traditional software development well, because command line tools work the same way.

People who work with data moved past that model long ago. For data they reach for interactive REPLs and live programming environments, because those let you iterate on intermediate results. With a script, an error means running the whole thing again from scratch. In a REPL, you load a data set into memory once, then inspect the values and keep working on them right there. That's the appeal of Excel, Jupyter, marimo and even RStudio: they're stateful.

People adopt these tools for the values more than for the code. Knowing there's a data frame on disk isn't enough. You want to look at the table and see what's in it, because that decides what you do next, like which plot to make or which validation to run.

The catch is that agents weren't good at reaching into stateful environments, which is what made opening them up hard. Several approaches were tried before one had ergonomics that work for an agent. The conclusion is a change of workplace. Instead of working on the file system the way coding agents do for regular code, the agent works in the kernel and looks at the state of things as it goes.

“So it's not just that I have this data frame on disk or this file on disk that has my data, it's that I want to look at the table and I want to see what those values are.”

Trevor Manz

What is marimo pair?

Dropping the agent directly into the live state. A robot on a crane arm is lowered into a translucent box labeled Active marimo Kernel, full of code, tables and charts, while cursors point at a chart. The notebook becomes a shared canvas. You point, the agent runs the code, the chart updates instantly.

marimo pair is an agent skill. It puts a coding agent inside an active marimo kernel, the running Python process behind a notebook, and gives it exactly one tool: run Python in that kernel. The marimo docs describe it as a way to connect agents like Claude Code, Codex and OpenCode to running notebooks.

That one tool covers a lot of ground. Inside the kernel, the agent can list the notebook's variables, inspect the cells and look at their outputs. It can also do what you'd do as the user: install packages, create cells, edit them, run them. In short, the agent can do anything you could do in a marimo notebook, and it can drive the exploration while you watch.

Do you have to change your code or import something? The setup described is the skill itself, installed into your agent from a marketplace in Claude Code or Codex, or with an npx command that pulls it from GitHub. (The installation section has the commands.) The skill teaches the agent how to use that single tool, and the tool talks to a running marimo notebook.

The big difference from an agent editing files is feedback. Every time the agent runs something through the tool, the kernel tells it right away what went right or wrong. That puts it back in the loop it's good at, try something, look at the result, correct it, except now marimo is the workspace for the data task instead of the file system.

For you, the notebook becomes a shared canvas where you point and the agent runs the code. Ask it to zoom in on a chart and the chart just updates. There are no MCP tools to wire up and no schema to describe. It's Python, and an agent that can finally see what you see.

The rest of the design follows from choosing a single Python tool, starting with the semi-private API the agent drives once it's inside. That's covered in code mode.

“Marimo pair is an agent skill that drops an agent inside of an active Marimo kernel.”

Trevor Manz

How marimo's reactive notebooks prevent hidden state

Agents require guaranteed execution order. Traditional notebooks: cells tangled around Hidden State and User Bookkeeping. marimo: a straight chain from input to output. Reactive execution by data flow, not cell order. Dependency tracking reruns descendant cells and flags redeclared variables. Notebooks stored as pure .py files, not JSON.

Spiritually, marimo is a computational notebook like Jupyter or Google Colab, with two differences. It's built around the Python ecosystem, from its file format down to how it understands the relationships between cells, so a marimo notebook is a plain Python file rather than an .ipynb. And it's reactive.

What does reactive mean? marimo doesn't read a notebook in the order the cells were written. It reads it by data flow. It analyzes each cell without running it, notes which global variables the cell defines and which it only references, and builds a dependency graph from that. Run a cell and marimo marks every downstream cell that depends on it to run too, so they all see the latest values. Define a variable that another cell already defines and marimo refuses, because every global variable can be defined by only one cell.

Here's what that looks like on disk. This is a two-cell notebook, checked against marimo 0.25.2:

import marimo

app = marimo.App()

@app.cell
def _():
    prices = [10, 20, 30]
    return (prices,)

@app.cell
def _(prices):
    total = sum(prices)
    total
    return (total,)

if __name__ == "__main__":
    app.run()

The second cell takes prices as an argument. That's the dependency edge. Edit the first cell and the second reruns on its own. Paste a second prices = ... into a third cell and the app can't run, failing with a MultipleDefinitionError that names the variable. One caveat from the docs: marimo doesn't track mutation, so appending to a list in place won't trigger a rerun. Build a new value instead.

Is this a big deal? Anyone who has edited three cells back, scrolled down, and found that nothing makes sense knows the failure: the cell in the middle never reran. Jupyter's execution counts (27, 34, 57, 58, then 90) let you spot that by eye, so plenty of people just keep track. But once a notebook gets complex, that bookkeeping becomes a lot of cognitive overhead, and discipline doesn't scale. It matters most at hand-off. With the dependency tracking in the system, a teammate can run the notebook and confidently reproduce the results the author saw.

Being Python-first pays off in the UI as well. Load a Polars or pandas data frame, an Ibis table, or anything that implements the standard data frame protocol, and marimo renders it as an interactive table.

The same rules matter when an agent builds the notebook. More on that in the last section.

“You, the user, have to do a form of bookkeeping to make sure that whatever state exists in the kernel is representative of whatever cells you have on the screen.”

Trevor Manz

Code mode: one run-Python tool instead of many MCP tools

One composable tool beats a pile of rigid JSON endpoints. A hub labeled code mode links to toast notifications, list variables, inspect cells, create cell, edit cell and run cell. A single tool: run arbitrary Python in the live kernel. Trevor Manz: each invocation is essentially running Python -c, picking up where you left off.

An agent with one tool, "run Python," still has to reach marimo somehow. The route is an API tucked inside marimo called code mode. It's semi-private, meant only for agents running Python inside the kernel, and it lets the agent grab the current notebook state and talk to marimo directly.

What can an agent do with it?

  • Announce itself. Pop a toast notification in the marimo UI saying it's connected to your notebook session.
  • Reach the notebook. The same listing, inspecting and cell-editing abilities from the overview are exposed as Python calls.

The design choice is Python instead of a menu of separate MCP-style tools or a JSON API. Python composes. Need five new cells? Call create cell five times in a loop, inside one tool call. Handing the model a programming language, not a rigid schema, is what makes that possible.

The second payoff shows up in how agents already work. Left alone, a coding agent that wants to understand something often writes a little Python script and runs it with python -c, rebuilding all the setup each time. For a data frame, that looks like this:

python -c "import polars as pl; print(pl.read_csv('data.csv').schema)"

That runs fine, and prints the column names and types for a small CSV. But it starts from nothing every time: a fresh process, a reload of the file, and any transformations replayed before it can print one value. Each call to the marimo pair tool works like python -c, "except picking up wherever you left off inside of your notebook." The code the agent sends can reference variables already in memory, so it doesn't reload an expensive data set or mangle it into some later state just to look at it. It runs its queries against the data frame you already have loaded.

The catch is that the API is semi-private, so it can change underneath the agent. The skill's design in the version drift section is built around exactly that.

“And because it's all Python and not individual something like MCP tools, the agent has the ability to write Python code that really does complex composition of those primitives as well.”

Trevor Manz

How live runtime inspection changes what an agent can do (and what it costs in tokens)

Offload context to Python, not the context window. A seesaw: the grep method, a heavy block of the entire notebook plus raw CSV in the prompt, against the kernel method, a light capsule reading df.schema(). The agent holds the actual dataframe and queries types, columns and row counts. Tighter loops, fewer tokens.

A coding agent that only has a notebook file sees source, and source is a thin description of the data. In a file, loading a data frame is one line, a Polars or pandas read_csv call. To learn what's in that data, the agent has to open the CSV and put the two together. In a live marimo session, the agent has the data frame itself, a much richer thing than a static file on disk. It can ask for the schema, the columns, each column's data type and the number of rows.

Runtime inspection like this changes how the model behaves. Prompts get simpler. Ask for the quantitative axes of a data set in a pair plot and the agent can look up the schema and work out which columns those are, so you can be more declarative about what you want to see, without first digging up the plotting API. And because it can check against real values, it course corrects and settles into the tight loops that get to a working result.

Coding agents often lean on grep to learn where a symbol is used or what a variable holds. Asking the running process is a different kind of question.

What about tokens? The skill is a slim Markdown file that only teaches the agent what the tool is and how to use it. Before, an agent might read the entire notebook file just to get its bearings. Now, if you're working on one cell, it can focus on that cell or that one variable without printing every other cell into its context.

Is it measurably cheaper? Not formally. The marimo team hasn't done anything formal to compare the two approaches, and the expectation that it's a lot more efficient is a first estimate, not a measurement. The framing is that when the environment holds the variables and values, the agent can offload context into Python instead of carrying it around in its context buffer.

“You give the agent the ability to offload context into Python rather than bringing that as extra context that fills up your context buffer.”

Trevor Manz

Why marimo works with Claude Code, Codex and OpenCode instead of competing

Meet the agents where they already are. The marimo logo sits in the center, linked by glowing lines to Claude Code, Cursor, GitHub Copilot and OpenCode. We aren't building a rival chatbot to fight for your terminal. Marimo is designed to be the ultimate, stateful tool for whichever agent you already love.

Some notebook tools answer the AI question with a chat panel built into the notebook. marimo has one too, and still does: bring your own LLM, drive an agent from the panel and even use the marimo pair tools from inside it. So why make a skill for outside agents the main experience?

Two reasons. Users kept asking how to use Claude Code or Codex with marimo, and those agents have access to things that will never live inside the marimo UI: the skills, MCP servers and everything else a developer has set up for their main driver. The team felt it themselves. Many of them use Claude Code to develop marimo, and working on a notebook meant jumping between tools.

The second reason is churn. Who owns the box you type into keeps shifting. At the time of recording, as Michael understood it, billing was a patchwork: with the official Claude Code extension your Claude subscription applies, while a built-in panel in an editor such as Cursor can use that editor's own credits, and PyCharm splits between JetBrains AI credits and the terminal. He called it kind of a mess, and the expectation is more drift between tools. Building around Claude Max a year ago would have been a lot of wasted effort.

As Michael read it on air, with a caveat that he could be wrong, a chart in The Pragmatic Engineer's AI tooling for software engineers in 2026 showed Claude Code in first place, with Copilot, Cursor and Codex further back. Asking developers to put away the agent that works for them and use a rival one instead is a hard sell.

OpenCode is part of the same story. It feels a lot like Claude Code in the terminal, but lets you configure many models and API endpoints, so some marimo users pick it for open models. Skills install for it the same way as for the others.

So the bet is to expose marimo's environment rather than own the interface. The reasoning starts with what an agent is (see the quote). Without marimo as a tool, a data question goes to what the agent already has, reading and writing files and running bash, and you might end up with a folder full of scripts and maybe a result. With marimo, you get a reproducible notebook, whichever agent drove it. It also keeps the team out of the chase after every new model: the work that's left is making the skill and the control interface good from any agent.

“An agent is by definition is like a model, the tools that you equip that model with and then its environment or the loop that it runs in to perform that task. And so its effectiveness is going to be limited by whatever tools you give that agent.”

Trevor Manz

How the marimo pair skill avoids version drift

Decoupled by design to eliminate version drift. A skill.md file sits above an arrow labeled help() pointing down into the marimo kernel. The static skill file teaches the mental model. The agent learns the actual API capabilities live at runtime. If marimo updates, the agent knows without updating the skill.md.

An agent skill is a folder with a SKILL.md file in it: a name, a description and instructions. Agents read only the name and description at startup and load the full instructions when a task matches. That's all a skill is, and it can sound underwhelming for a feature. There's a reason not to write Markdown off, though. The so-called "SaaSpocalypse" story goes that Claude shipped 13 Markdown files and $285 billion came off the stock market.

What's in the marimo pair skill? Less than you'd expect. It teaches the agent where its tool lives and the mental model for driving marimo. It doesn't describe marimo's internals or document the API the agent will use. When the agent wants to know what it can do in the active kernel, the skill tells it to run a help command that prints the tool's own docstrings. The agent learns the real API from the running marimo, in that session.

Why bother? Version drift. If the skill spelled out the API, someone who upgraded marimo but not the skill would get a poor experience, and skills are tricky to keep updated. This way there's less in the skill to go stale. The goal is a baseline: whatever versions you have, the agent can still drive marimo, and upgrading either one should, hopefully, improve things. Without the decoupling, it would be hard to even figure out which version a user has, short of some runtime inspection.

Updating is getting easier anyway. In Claude Code and Codex, a marketplace.json file lets you subscribe to auto-updates of a skill, and command line installers that pull from GitHub fetch the latest. Skills have also changed shape over time: they used to be commands, and the layout is still a little funky.

How did the team land on a skill at all? A bare-bones MCP server was one option. Around fall and December of last year, as the models got quite good, skills became a very useful way to package reusable instructions for a command line tool, and that's when marimo started looking at them.

“We just wanted to make sure that our users didn't get into the state where they're having a really poor experience using their agents because they upgraded Marimo and they hadn't upgraded their skill.”

Trevor Manz

How to install marimo pair: npx, uvx and the Claude Code plugin

Cross-ecosystem installation without the friction. Three paths lead into a box labeled marimo pair capability. The npm path: npx skills add marimo-team/marimo-pair. The Python/uv path: uvx deno. The Claude path: Claude Marketplace.

An agent skill is a folder of files with a skill.md in it, and installing one means putting that folder where your agent will look. The marimo team publishes the marimo pair skill in the marimo-team/marimo-pair repository on GitHub and versions it over time. There are three routes.

The first is the skills command line tool, published on the npm registry. It walks you through picking agents (Claude Code, Codex and OpenCode are among them), installs into the directories those agents read, and can install locally in a folder or globally on your system. The second route is for people with uv but no npm: uvx runs the same tool through Deno. The two are semantically equivalent, since both end up running the same CLI and only the package manager doing the launching differs.

The third route is a plugin marketplace. You register the marimo team's marketplace once, and when a new version ships, Claude Code may offer to upgrade the plugin the next time it starts. Codex has a similar plugin flow. Here are the commands as the marimo docs list them:

# any agent that supports Agent Skills, with npm
npx skills add marimo-team/marimo-pair
npx skills upgrade marimo-team/marimo-pair

# the same tool through uv, no npm needed
uvx deno -A npm:skills add marimo-team/marimo-pair

# Claude Code plugin
claude plugin marketplace add marimo-team/marimo-pair
claude plugin install marimo-pair@marimo-pair

# Codex plugin
codex plugin marketplace add marimo-team/marimo-pair
codex plugin add marimo-pair@marimo-pair

The -A flag in the uvx form gives that CLI all of Deno's permissions, so use it only for a package you trust.

Which one? If you mostly use Claude Code, the marketplace keeps the skill in sync for you. If you hop between several agent harnesses, npx skills or the uvx form lets you pick which agents to install into and upgrades the same way.

Why can you run deno from uvx at all? The deno package on PyPI exists because the name was requested through PyPI's formal process and then handed over to the Deno team. Deno is a server-side JavaScript runtime from the same creator as Node, built partly to fix problems in the Node ecosystem. It behaves more like a browser, with fine-grained permissions: to read the file system or environment variables, a script has to opt in explicitly.

With the skill installed, getting started takes one prompt. The marimo docs show /marimo-pair with me on notebook.py in Claude Code and $marimo-pair with me on notebook.py in Codex, and the agent starts marimo and connects to the notebook. The skill's scripts need bash, curl and jq on your PATH.

“Being able to share packages between ecosystems without having to reinstall a new package manager I think is really important because both the Python ecosystem and the npm ecosystem are growing so much.”

Trevor Manz

Pair programming with your data: messy Excel files, plot selections and what-if questions

Automate the tedium. Spend attention where it matters. Phase 1, agent driven: the messy Excel file, parsed cell by cell into a dataframe. Phase 2, human plus agent: exploratory data analysis, where the human selects a region of a plot and the agent maps it back to the dataframe. Headless for wrangling, hands-on for insight.

What does an agent get from a live notebook that it can't get from a folder of files? State. A marimo notebook holds data frames, intermediate values and plot selections in memory, and marimo pair lets the agent look at them. Before an integration like this, that in-memory state only helped if you copied an output into the chat yourself and told the agent what it was. Now the agent can answer "what's in this data frame?" by looking at the columns, and marimo can report which cells and values changed as the agent works.

The clearest example is a plot selection. During exploratory analysis you circle a region of a chart and ask what you just selected. The agent takes the selected indices, compares them against the data frame and comes back with an answer. Questions that used to mean typing a lot of code get cheap, and cheap questions get asked. The same idea extends to visuals: in the integrated browser of VS Code or Cursor, you can click a plot to capture a screenshot and add it as context, so a multimodal model reasons about the rendered output and not only the code.

The second use is getting data in. Loading a messy Excel file in Python is a chore, because you end up writing a little parser to find the separate tables in the sheet. Trevor Manz dragged a spreadsheet into marimo pair and asked the agent to load three tables into the notebook. By hand that might have taken an hour, and the agent needed a couple of minutes, maybe one, which left him to spend his time on the plots and what they say.

marimo's deterministic execution order is what lets you split the work this way. Rather than vibe coding the whole analysis, you hand the data-loading step to the agent and keep your own attention for cleaning, plotting and modeling. Python's ecosystem for ingesting data does the heavy lifting, and you step in once the data is in a useful shape. Michael Kennedy, no fan of vibe coding in general, sees an on-ramp here: someone can ask decent questions about data without knowing which Excel library to install or how to select the third sheet.

The what-if framing matters as much as the speed. Agents made code experiments cheap, since an idea that once ate a weekend might take an afternoon, and the goal is for questions about your data to feel that cheap too. A connected kernel also gives you a richer canvas than a terminal. Ask for a bar chart or a box plot and you get one, rather than ASCII tables of numbers.

“Instead of vibe coding the whole thing, you can maybe allow someone to kind of vibe code the first bit of how do we get the data into memory?”

Trevor Manz

Running marimo pair against a remote kernel on molab

Local drive. Remote execution. A line drawing of a laptop labeled Local Agent connects by a dashed red arrow to a glowing server rack labeled molab plus CoreWeave GPUs. A swappable URL in the execute code bash script lets your local agent authenticate and pair program against a remote cloud sandbox.

What if the notebook isn't on your machine? Say marimo is running on a server or a cloud service while your agent, Claude Code for instance, runs on your laptop. Can the two still pair?

They can, and the reason is in how the tool call works. When the agent runs Python through marimo pair, the request goes through a bash script called execute code (execute-code.sh in the skill), and that script takes a URL you can swap. Point it at localhost, or at a marimo kernel somewhere else, with some authentication. The marimo pair README says servers with auth take a MARIMO_TOKEN environment variable. That connects a local agent to a remote kernel: a sandbox that isn't running on your machine at all, which you still drive from your own. A machine with GPUs is a better place to run heavy code, and this is how you reach one without moving your agent.

marimo has a service for exactly that. molab is marimo's cloud-hosted version of marimo notebooks, and at the time of recording the team had recently released it on CoreWeave infrastructure, with some GPUs for the community. The marimo docs describe pairing a local agent with a notebook on molab through the same steps as a local one:

  1. Open the notebook's Actions menu and select Pair an agent.
  2. Pick your agent and click Copy command.
  3. Paste and run the command in your terminal, where Claude Code or Codex runs.

From then on you're pair programming locally against a sandbox in the cloud. The agent stays where it is, and the computation happens on the bigger machine.

It's a clean split, and it falls out of the design. The agent needs one tool, running Python in the kernel, and the kernel's address is just a URL. Whether that URL points at your laptop or a data center doesn't change how the agent works.

“And then you have a sandbox that's not running on your machine at all, but somewhere in the cloud. But you're driving that from your local machine.”

Trevor Manz

The marimo pair roadmap: VS Code integration and real-time collaboration

The future: multi-player shared canvas. Several human and robot avatars, labeled Node 1 through Node 4, send arrows into a glowing ring labeled Active marimo Kernel. Real-time collaboration where multiple humans and multiple agents talk to the same live kernel. Tighter native VS Code integrated panel rendering.

Where can you run a marimo pair session? That depends on where you like to drive your agent. The marimo docs name Claude Code, Codex and OpenCode as agents that can connect to a running notebook. Today the workflows are mostly terminal-oriented, plus the chat built into the marimo editor itself. Some of what follows works today, and the rest is direction rather than shipped features.

VS Code is the next stop. If you've opened a Jupyter notebook in VS Code or Cursor, you've seen the editor's built-in notebook UI. marimo's VS Code extension reuses that native view and swaps in marimo outputs. At the time of recording, the team was working on letting an agent inside VS Code drive those notebook outputs too, expected to ship in probably the next week or so, and on a tighter integration of the native editor generally.

An editor gives you at least three ways to run an agent: its built-in chat panel, an extension such as the Claude Code or Codex one, or the terminal. At the time of recording, all three could start a marimo pair session, and the difference was what you'd see. Launch from the terminal or the Claude Code extension and the agent will likely start marimo's command line tool and open a web view of the marimo editor inside VS Code. Use the built-in chat panel and it drives the more integrated native notebook view.

The broader plan is to show up wherever people drive agents, so they can spin up a marimo notebook and collaborate on it. Further out, starting a chat in Claude Desktop or Codex Desktop and having it drive a notebook was described as something that might come eventually.

The most speculative item is collaboration. Michael Kennedy sees a Google Docs equivalent for agent sessions as a missing piece of the agentic AI world: you start a session, someone else joins it, and you all talk to the same agent. At the time of recording, marimo was working on real-time collaboration features, and one maybe on the table was multiple people, each with their own agent, talking to the same marimo kernel. Nothing more specific was promised, so treat it as an idea in progress.

“Our direction with Marimo Pair is to try to think of all the places in which folks are trying to drive agents that maybe we could have the ability to spin up a Marimo notebook and allow folks to collaborate on these reproducible artifacts.”

Trevor Manz

Why agent-built marimo notebooks stay reproducible

The ultimate output: a reproducible artifact. A person and a robot both point at one document with a seal reading Guaranteed Reproducible. Whether you vibe-code headless or pair-program cell by cell, you aren't left with an AI chat transcript but a durable, shareable, reproducible Python program.

What do you have when an agent session ends? With most tools, a chat transcript. With marimo pair, a marimo notebook: a reproducible Python program that still communicates your results with the agent turned off. marimo pair is increasingly the main way marimo users who like writing code with agents create and share notebooks, and usage runs from hands-on to hands-off. Hands-on is exploratory: spin up a notebook, load a data set, prompt for plots, read the outputs and decide where to go next. You direct the work, you just don't type the code. Hands-off is headless: spin off many sessions on a similar problem, then connect to the running notebooks later to see what each agent did.

Why does headless work at all? Anyone who has tried to one-shot a notebook knows the catch. The agent can't verify what it wrote, and at best it runs the whole thing at the end and fixes it cell by cell. The result can be a well-formed but meaningless notebook. marimo pair forces a different process. The agent builds the notebook the way you would, one cell at a time - load the data, then look at the nulls. If a step errors, it's fixed right there rather than after everything is generated. The team reports much higher quality output this way, since a notebook built under marimo's constraints has to run.

Reproducible also means the file says what it needs. marimo notebooks are Python files, and sandbox mode records their dependencies in a PEP 723 inline metadata block at the top. A header looks like this, following the format in marimo's docs:

# /// script
# requires-python = ">=3.11"
# dependencies = [
#     "marimo",
#     "polars",
# ]
# ///

With that header in notebook.py, uvx marimo edit --sandbox notebook.py opens it in an isolated environment prepared from those requirements, and uv can also run the file as a script. The docs add that sandboxes isolate installed packages, not access to your files or network, so only run notebooks you trust.

uvx marimo edit --sandbox notebook.py

To try it, pick a data set you have in mind, drag it in, and ask the agent to load it and start making plots. For some people, runtime inspection shifts the work from very hands-on to thinking cell by cell about what to do next. The skill and instructions are at marimo.io/pair and in the marimo pair repository on GitHub, and the team wants to hear where it falls short.

If you'd like to go further, Talk Python Training has three courses that fit this topic: Agentic AI Programming for Python for working with tool-using agents like Claude Code, Just Enough Python for Data Scientists for the habits, reproducibility among them, that take notebook work from ad hoc to reliable, and Polars for Power Users for the data frames an agent ends up inspecting and plotting.

“That's our goal at Marimo, to make sure that whether you knew how to write Python code or you don't know how to write Python code, you're able to produce this reproducible artifact for your data analysis.”

Trevor Manz

Talk Python's Mastodon Michael Kennedy's Mastodon