The Future of Notebooks - with Akshay Agrawal of Marimo

Introduction and Marimo Overview 00:00

  • Introduction of Akshay Agrawal from Marimo and the context of notebooks and AI/data workflows
  • Marimo is an open-source Python notebook built from scratch (not based on Jupyter)
  • Focuses on reactive execution and built-in UI elements for new ways to interact with data and AI models
  • Notebooks are stored as pure Python, can be versioned with git, run as scripts/pipelines, and offer SQL/database connections
  • Marimo serves as a modern replacement for Jupyter, Streamlit, Gradio, and Papermill
  • Noted for rapid prototyping and smooth transition from prototype to production
  • Product sees strong traction: 300,000+ monthly downloads, more GitHub stars than Jupyter Notebook, and used at organizations like OpenAI, Hugging Face, Cloudflare, BlackRock, Stanford, and Berkeley

Problems with Traditional Notebooks & Marimo’s Design Philosophy 02:24

  • Inspiration from issues with Jupyter notebooks: hidden state, reproducibility, inability to version with git
  • Goal: keep interactivity but add software-like guardrails (reproducibility, no hidden state, code reuse as apps or scripts)
  • Emergence of generative AI increased the need for effective data/model interaction tools
  • Marimo designed to enforce best practices (e.g., no redefinition of variables, functional code structure)

Demo: Interactive and Reactive Notebooks 04:26

  • Marimo notebook demo shown with Python code, markdown, and visual outputs (scatter plots with EMNIST dataset)
  • Unique interactivity: hiding code to present an app view, live selection in plots updates visual outputs downstream
  • Code remains simple; reactive model auto-updates outputs based on UI/code interactions
  • Different file format from Jupyter but supports conversion via command line utility (with some code restrictions auto-fixed in conversion)
  • Enables easy, interactive data exploration with less repetitive code compared to Jupyter

Demo: Flexible Layouts and Custom Widgets 08:08

  • Unlike traditional linear notebooks, Marimo supports customizable layout (columns, flexible code arrangement)
  • Example demo: custom widget mimicking Microsoft Paint, outputting reactive drawing data
  • Integration with multimodal models shown (e.g., sending drawn graphs to Gemini, returning mermaid code), highlighting new workflow possibilities in notebooks

AI Integration and Developer Workflow 10:11

  • Built-in AI-native utilities for generating code and working with models
  • "Generate with AI" feature allows code completion and generation based on notebook context (variables, dataframes, etc.)
  • Dependencies can be managed inline in notebook headers via integration with UV package manager (from Astral), enabling reproducible notebooks with embedded dependencies
  • Smooth handling of missing packages: prompts for install, manages packages automatically

Demo: Data Annotation and Hardware Integration 13:13

  • Data annotation workflow demoed, featuring custom widgets for input via PS5 controller
  • Uses UI and hardware integration for efficient, interactive tasks (e.g., classifying search results from vector DB using different embedding models)
  • Live updates and visualizations (e.g., beta distribution plots of model performance) boost feedback and productivity
  • Highlights Marimo’s extensibility (custom hardware/extension support)

Blank Canvas & AI-Powered Workflow 15:50

  • Demo of starting from scratch: empty notebook with "Generate with AI" to help prototyping data analysis
  • User can prompt for transformations or visualizations using natural language, with model inferring context from data and variables
  • AI completions are context-aware: see variable states, column names, sample data, database connections, etc.
  • Multi-turn chat interface for more complex workflows, supporting various model providers via "bring your own key" (OpenAI, Olama, local models)

Technical Architecture: Local vs WebAssembly vs Cloud 20:17

  • Marimo can run locally (pip install) or in the browser (WebAssembly) for lightweight, shareable notebooks
  • WebAssembly playground is browser-based but has some Python ecosystem limitations (e.g., cannot use Torch)
  • Restrictions in WebAssembly led to creating "MoLab," a cloud-hosted, Colab-like environment for running any package without such restrictions
  • MoLab supports importing notebooks from local files or GitHub, configurable CPU/RAM, and uploading data to Cloudflare buckets

File Format, Script Execution, and Data Apps 24:13

  • Marimo notebooks are pure Python files, decorated for use as notebooks or executable scripts
  • Can run as scripts in terminal or as read-only data apps in browser (similar to Streamlit)
  • Potential to build full-featured, interactive data apps that can read/write to databases

Roadmap and Community Involvement 26:06

  • Plans for deeper AI assistant integration (e.g., agent cells that accept prompts to generate code)
  • Encouragement of functional code style, prohibiting variable redefinition to improve code quality ("gentle parenting" of code habits)
  • Marimo project is open source with 100+ contributors, active engagement encouraged
  • Easy onboarding: pip install, try tutorials, or use the MoLab cloud service

Closing Remarks and Call to Action 27:45

  • Call for new users and contributors
  • Marimo seen as reinvention of a core workflow for research and engineering
  • Instructions to get started: pip install Marimo or visit MoLab for the cloud version
  • Users invited to engage on socials and contribute to the project