How marimo-team/marimo works
marimo is a reactive Python notebook platform: users edit or run Python/SQL cells, and dependent cells rerun to keep notebook state and outputs consistent. Its product spans the browser editor, notebook model, reactive runtime, data/UI integrations, and deployment modes including scripts, web apps, slides, and browser WASM. The README supports these capability branches; source-index imports and excerpts provide narrower implementation links. Several major backend areas were not sampled, so their internal calls are intentionally not inferred.
Main entry points: _runtime Kernel runtime · app-container.tsx Notebook editor · cell_manager.py Cell manager · commands.py Kernel command protocol
Components 25
Notebook editor
- Notebook editor
frontend/src/components/editor/app-container.tsx - Cell editing and run controls
frontend/src/components/editor/cell/useRunCells.ts - Editor AI features
frontend/src/components/chat/chat-panel.tsx
Notebook execution
- Notebook app model
marimo/_ast/app.py - Cell manager
marimo/_ast/cell_manager.py - Kernel command protocol
marimo/_runtime/commands.py - Session management
marimo/_server/session_manager.py - Kernel runtime
marimo/_runtime
Data and integrations
- Interactive UI elements
marimo/_plugins/ui - Dataframe tables
marimo/_plugins/ui/_impl/tables/table_manager.py - SQL engines
marimo/_sql/get_engines.py - External storage callbacks
marimo/_runtime/callbacks/external_storage.py - External storage backends
marimo/_data/_external_storage/storage.py - Storage inspector
frontend/src/components/storage/storage-inspector.tsx
Configuration and sharing
- Package management
marimo/_runtime/packages/pypi_package_manager.py - Configuration manager
marimo/_config/manager.py - Virtual file storage
marimo/_runtime/virtual_file/storage.py - Script and app deployment
marimo/_server - Browser WASM runtime
marimo/_pyodide/pyodide_session.py
AI and tooling
- Agent pairing service
marimo/_mcp/code_server/main.py - Notebook linting
marimo/_lint/rule_engine.py
Other components
- Notebook author
- Browser user
- External data sources
- External AI agent
Connections 23
- Notebook author → Notebook editor: edits notebook
- Browser user → Notebook editor: interacts with
- Notebook editor → Cell editing and run controls: edits cells
- Cell editing and run controls → Notebook app model: runs cells
- Notebook app model → Cell manager: manages cells
marimo/_ast/cell_manager.py - Cell manager → Kernel command protocol: emits changes
marimo/_ast/cell_manager.py - Session management → Kernel command protocol: dispatches commands
marimo/_server/session_manager.py - Kernel command protocol → Kernel runtime: instructs runtime
marimo/_runtime/callbacks/external_storage.py - Kernel runtime → Cell manager: runs dependents
- Kernel runtime → Interactive UI elements: updates elements
- Kernel runtime → Dataframe tables: serves table data
marimo/_plugins/ui/_impl/tables/table_manager.py - Kernel runtime → SQL engines: discovers engines
marimo/_sql/get_engines.py - External data sources → SQL engines: provides connections
- External storage callbacks → External storage backends: lists and downloads
marimo/_runtime/callbacks/external_storage.py - External storage callbacks → Virtual file storage: registers previews
marimo/_runtime/callbacks/external_storage.py - Storage inspector → Notebook editor: inspects storage
frontend/src/components/storage/storage-inspector.tsx - Kernel runtime → Package management: installs packages
marimo/_runtime/packages/pypi_package_manager.py - Session management → Configuration manager: loads settings
marimo/_server/session_manager.py - Notebook author → Script and app deployment: deploys notebook
- Notebook author → Browser WASM runtime: runs in browser
- Editor AI features → Agent pairing service: pairs with agents
- External AI agent → Agent pairing service: connects to
marimo/_mcp/code_server/main.py - Notebook author → Notebook linting: checks notebook