Software Engineering Daily – Reinventing the Python Notebook with Akshay Agrawal
Date: March 10, 2026
Host: Kevin Ball (K. Ball)
Guest: Akshay Agrawal, creator of Marimo
Overview
This episode explores how Python notebooks—a cornerstone of data science, research, and exploration—are evolving. Akshay Agrawal introduces Marimo, a next-generation, open-source Python notebook designed to solve inherent issues with conventional tools like Jupyter. The discussion addresses reproducibility, shareability, hidden state, software engineering ergonomics, and Marimo’s impact in bridging interactive exploration and production-level code.
Key Discussion Points & Insights
Akshay Agrawal’s Background and Motivation
- Background: Akshay has experience at Google Brain (TensorFlow team) and a Stanford PhD in machine learning.
- Inspiration: Both his research and software engineering work exposed frustrations with traditional notebook tools, including difficulty managing state, poor reproducibility, and barriers in sharing or productionizing code.
- Goal: Marimo aims to “feel like a next generation open-source Python notebook,” emphasizing reproducibility, scriptability, and web interactivity.
- Quote:
"I realized what I really enjoy doing is building open source developer tools for people who work with data." (C, 01:54)
Limitations of Traditional Notebooks
- Imperative, REPL-like Paradigm: Jupyter notebooks are compared to “fancy REPLs” with UI, useful for exploration but problematic for reproducibility and code sharing.
- Three Key Problems:
- Hidden State:
- Imperative execution sequence leads to state inconsistencies.
- Example: Deleting or reordering cells can “break” the code/data linkage unseen by the user, leading to analysis errors.
- Quote:
"All of a sudden, the code on your page doesn't match the variables in memory." (C, 03:48)
- Poor Version Control Ergonomics:
- Jupyter’s .ipynb files are JSON and store binary data (plots, images), making them unfriendly for Git and code reuse.
- Duplicate code across multiple notebooks is common.
- Ineffective Sharing & Collaboration:
- Collaborators must recreate full environments and can’t easily interact with results (e.g. change parameters or use widgets).
- Quote:
"With Marimo, we wanted to make it so that any notebook could also really easily double as like an interactive web app..." (C, 05:44)
- Hidden State:
Marimo’s Reactive Execution Model
- Reactive Notebooks: Inspired by Julia’s Pluto and JavaScript’s Observable, Marimo implements a reactive paradigm for Python.
- How It Works:
- Each cell is aware of variable dependencies.
- Changing a variable triggers reruns of dependent cells, keeping output in sync automatically.
- Uses Python’s AST for static analysis—overhead is “totally negligible.”
- Explicitly does not try to track mutating memory object references due to Python’s dynamic nature; instead, focuses on variable assignment.
- Encourages more functional code practices.
- Configuration: Lazy/reactive modes let users balance between instant reactivity and manual control for expensive computations.
- Quote:
"What Marimo is... they're what are called reactive notebooks... Marimo will automatically run all the other cells that read the variable X." (C, 08:22)
Reproducibility, Versioning, and File Format
- Notebooks as Python Files:
- Marimo stores notebooks as .py files—each cell as a function, decorated to mark inclusion in a notebook.
- A “main” guard at the end orchestrates execution in dependency order.
- Opened up “reuse as code”—import functions/classes from notebooks directly.
- Package Environment:
- Marimo has optional, PEP723-compliant, built-in package/virtualenv management via the UV package manager.
- Flexible Snapshots:
- Optionally auto-snapshots an .ipynb version for legacy compatibility/showing static data, enabling best-of-both-worlds workflows.
- Quote:
"You can go to the command line, say Python my notebook py. It'll run it as a script, you can even parameterize with CLI args." (C, 15:44)
Notebooks to Production: Bridging the Divide
- Scriptability:
- Marimo notebooks can run as scripts or even be triggered in cron jobs for pipelines.
- Supports loading different data sources based on execution context (interactive vs. script).
- Code Reuse:
- Functions/pieces from Marimo notebooks can be imported and reused, encouraging modularity and DRY practices.
- Interactive Data Apps:
- Internal tools, reporting dashboards, and even user-facing interactive web apps can be rapidly prototyped and deployed from the same Marimo file.
- Quote:
"You can use [Marimo] for backend engineering, like we're doing our data pipelines with [these] notebooks just because we can." (C, 21:21)
UI Widgets and Interactivity
- UI Primitives:
- Marimo provides a UI module for sliders, dropdowns, textboxes, and more.
- Assign UI elements to variables, and Marimo hooks these into the reactive execution model.
- Changing a UI widget updates dependent cells instantly—ideal for exploration or internal tools.
- Shareability:
- CLI allows exporting as interactive HTML reports or serving notebooks as read-only web apps (hiding code).
- Used by both technical and non-technical stakeholders (e.g. sports teams analytics, internal tax software tools).
- Quote:
"You can just like stay in the same tool and incrementally abstract it... making a tool that’s good enough for you and your colleagues…" (C, 29:56)
Integration with Modern Coding and AI Agents
- AI-Generated Notebooks:
- The pure Python file format means LLMs (like Claude) can easily generate valid Marimo notebooks.
- Marimo's built-in linter (
marimo check) and strong static semantics enhance agentic/LLM workflows for code generation.
- Development World Shifts:
- Marimo is well-aligned for future integration with agentic, LLM-driven workflows—code discovery, schema mapping, and even automated notebook generation.
- Marimo is modularizing its kernel to enable headless/agent-driven usage, e.g. programmatic notebook transformations or execution by bots.
- Quote:
"Claude is like really good at writing [Marimo notebooks] because it is a pure Python file format." (C, 31:38)
Static Analysis, Linting, and Extensibility
- Linting and Correctness:
- Marimo enforces an acyclic dataflow graph (no cycles between cells) and no duplicate variable definitions per notebook.
- Extension Points:
- File format is open and human-writable.
- Adopts the "anywidget" protocol to support third-party JavaScript-powered interactive widgets, bringing in a large ecosystem created for Jupyter/Colab.
- Quote:
"[Anywidget] allows you to expand your imagination... get creative." (C, 45:31)
Educational Roots and Future Directions
- Academic Beginnings:
- Marimo received early support from Stanford’s SLAC National Lab, addressing scientific and educational pain points.
- Education is a core focus—reactivity and interactivity are ideal for teaching numerical and computational concepts.
- Inspired by Pluto.jl (Julia), which originated for educational use at MIT.
- Future Developments:
- Closing feature-parity gaps with Jupyter/Colab ecosystems (e.g. JupyterHub integration, hosted environments).
- Expanding headless/agent integration—empowering automated agents and LLMs to drive notebook execution.
- Deepening support for interactive widgets, extension APIs, and educational outreach.
- Outreach:
"If you find Marimo interesting... please try it out. Or better yet, reach out to me and my team." (C, 46:09)
Notable Quotes
-
On hidden state and reproducibility:
"Once you get past the just exploratory phase, you're kind of writing a program even in a notebook, right? But... you may run one cell, then forget to run other cells that depended on that cell." (C, 03:29)
-
On reactivity and static analysis:
"There’s no runtime tracing involved... Marimo statically reads the code of every cell... and just builds this dependency graph." (C, 08:22)
-
On bridging the gap between data exploration and production:
"You totally can [reuse code]. And so it really does blur the boundaries of what you can use a notebook for." (C, 20:50)
-
On UI interactivity:
"There should be some UI element to control the value of that variable. So in Marimo... now you have like user interface interactivity in your notebook..." (C, 25:48)
-
On agentic/AI-assisted programming:
"Claude is like really good at writing [Marimo notebooks]... it can also run the notebook as a script to check if it's doing the right thing." (C, 31:38)
-
On educational focus:
"I really do feel like that combination of reactivity and interactivity can really just make concepts a lot more intuitive." (C, 46:09)
Timestamps for Major Segments
- 00:00–01:54: Introduction, Akshay’s background and Marimo’s mission
- 03:11–07:44: What’s wrong with traditional notebooks? Three core issues
- 08:22–12:44: Reactive execution model explained; static analysis in Python
- 13:51–15:56: File formats, reproducibility, and code as first-class artifacts
- 20:03–21:59: Notebooks as reusable, production-quality software components
- 23:55–25:06: Dual-mode execution, parameterization, and automated reporting
- 25:48–29:29: UI widgets for exploration and web app publication
- 31:38–34:30: AI integration: LLMs and agents writing/using notebooks
- 34:30–37:29: Marimo’s internal projects/future – agentic & headless interaction
- 39:06–41:01: Static analysis rules, lints, and current extension API surface
- 42:09–45:31: Anywidget: third-party interactive widgets, integration and future plans
- 46:09–end: Marimo’s academic origins and ongoing educational outreach
Memorable Moments
- "Gentle parenting" for code: Marimo’s static approach nudges users toward good functional coding habits without being punitive. (C, 12:44)
- Importable from Vim: The file format is so clean Akshay jokes, “You can actually write Marimo notebooks by hand in Vim.” (C, 41:01)
- Anywidget developer joins Marimo: "We hired Trevor, the creator of anywidget, because... it emerged as the standard for interactive notebooks." (C, 42:29)
Conclusion
The episode presents Marimo as a forward-thinking evolution of the Python notebook, addressing pain points experienced by both researchers and engineers. Its reactivity, pure-Python surface, ergonomic versioning, and extensibility—especially supporting UI interactivity and agent integration—make it uniquely poised for both educational and production use in a rapidly shifting AI-powered software landscape.
To learn more or get involved, visit the Marimo project or reach out to Akshay and his team.
