Skip to main content

marimo-lens

PyPI License: Apache 2.0

Let your agent see what you see.

marimo-lens connects a point or region on a rendered marimo notebook output to its producing cells, relevant notebook context, and an annotated image when capture succeeds. A live notebook agent can inspect the request, show its activity, and return results for review. Reopen an addressed selection from History to continue the analysis.

Install and mount

In a project managed by uv:

uv add marimo-lens
uv run marimo edit notebook.py

Requires Python 3.10–3.14 and marimo 0.25.0 or newer. marimo mounts Lens automatically once a cell that imports marimo runs.

Press Select, click a point or drag a region, then add a note.

Custom pages can publish Lens target metadata for notebook inputs, labels, rendering references, and image context. Lens recognizes these source regions automatically. Add data-marimo-lens-target to select authored copy or layout without notebook inputs. Each view controls its targets through its own markup, including with automatically mounted Lens. Native Marimo outputs remain selectable through their existing output cells.

Connect an agent

Connect through marimo pair or the editor's code-mode sidebar, select a result in Lens, and tell the agent:

Use Lens to address my current selection.

The quickstart covers the complete path from connection to a reviewed chart change.

Read the packaged briefing from a terminal:

uvx --with marimo-lens agent-plugins read marimo-lens

In an existing notebook kernel, run import marimo_lens followed by help(marimo_lens.agent). The help includes the same core skill and references from that installation. marimo pair runs it in the notebook's kernel from a terminal:

marimo pair execute --url <URL> --file <notebook.py> -c 'import marimo_lens; help(marimo_lens.agent)'

The uvx command uses an isolated tool environment and does not connect to the notebook.

Use marimo_lens.agent.skill() to read individual skill resources and marimo_lens.agent.plugin() to inspect the installed plugin bundle.

Agents call marimo_lens.agent.connect() to reuse an existing Lens, including automatically mounted instances. When one browser-ready Lens owns the dock, connect() selects it even if the code-mode context contains other Lens objects. discover() lists available handles when an agent needs to inspect availability or choose between instances.

After verification, call resolve(..., summary="...") with what changed or what you found and checked. The summary appears beside the original request in History. A batch shares one summary; resolve separately when outcomes differ.

Use reveal(steps, duration_ms=None) for a transient notebook walkthrough. A small stepper in the popover header lets users move at their own pace. Nothing is saved; referenced cell or upstream changes end the walkthrough.

Lens works with agents that can execute Python in the live notebook kernel, including marimo pair. The package includes the matching agent instructions and registers its Lens capability with marimo. Follow Connect an agent for setup and the inspection, verification, and review workflow.

Documentation

What is Lens? · Getting started · Connect an agent · Custom targets · Python API · Data and trust

Source, issue tracking, and contributor documentation live in the marimo-lens repository.

Metadata

Release files for marimo-lens 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for marimo-lens 0.2.4
File Size Uploaded
marimo_lens-0.2.4.tar.gz 225.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for marimo-lens 0.2.4
File Interpreter ABI Platform
marimo_lens-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 468.8 kB

Release files / marimo_lens-0.2.4.tar.gz

Download URL marimo_lens-0.2.4.tar.gz
Size 225.9 kB
Tags Source
SHA-256 checksum
How to use checksums
79e1498b2d1ec706591391d2f851b84cdd94f4573169f96d2fb2d2808336c418
BLAKE2b-256 checksum
How to use checksums
2d1d3bc7ce08070794c8b83d89f3872b269c29cfd8a0f89c9f448a32b637c018
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / marimo_lens-0.2.4-py3-none-any.whl

Download URL marimo_lens-0.2.4-py3-none-any.whl
Size 242.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
710a234f3cd1f46003cb02c181fef822bd8838ce976acdbe224bb1a5c30e83bd
BLAKE2b-256 checksum
How to use checksums
b0bf87d01addcc68055c293f67f54b1f1e0e4bbc5a5fcfdab47680947912ac46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page