Skip to main content

marimo-lens

PyPI License: Apache 2.0

Let your notebook agent see what you see.

Point to a notebook result and say what should change. Lens gives your agent the producing cell, related notebook context, and an annotated image to ground its work in the result you marked.

While the agent works, Lens can show which cell it is changing or checking, bring the result into view for review, and keep completed requests in History for another pass.

Read the user guide for the code-mode agent workflow.

Quick start

Open a local marimo notebook with Lens available:

uvx --with marimo-lens marimo edit notebook.py

Mount Lens in one notebook cell:

from marimo_lens import Lens

lens = Lens()
lens

Keep the cell mounted. Press Select, then click a point or drag a region inside a rendered output. Add a note with what you want the agent to inspect or change.

Connect an agent

Install the Lens skill:

npx skills add marimo-team/marimo-lens

After selecting an output and adding a note, ask the agent:

Resolve my Lens request.

See Agent workflow to connect a code-mode agent.

Python API

The package exports Lens, LensContext, LensError, LensReferences, NotebookReference, SelectionReference, and __version__. The version string comes from the installed marimo-lens distribution metadata.

Agent integrations use five methods:

Method Behavior
lens.context() Returns detached selection context with lazy notebook text
lens.start_activity(cell_id, *, duration_ms=None, label=None, message=None) Marks current work until stopped or its optional hold ends
lens.stop_activity(cell_id) Stops activity attached to that exact cell
lens.reveal(cell_id, *, duration_ms, label=None, message=None) Brings one verified or explanatory cell into view
lens.resolve(selection_ids, *, expected_revision, summary=None) Moves one or more selections to History in one guarded operation

The Python API reference documents return values, errors, limits, and lifecycle behavior.

Project

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marimo_lens-0.0.6.tar.gz (167.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

marimo_lens-0.0.6-py3-none-any.whl (177.9 kB view details)

Uploaded Python 3

File details

Details for the file marimo_lens-0.0.6.tar.gz.

File metadata

  • Download URL: marimo_lens-0.0.6.tar.gz
  • Upload date:
  • Size: 167.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}

File hashes

Hashes for marimo_lens-0.0.6.tar.gz
Algorithm Hash digest
SHA256 a8155651db5280688f2ee8ca24b9282079dce0f0b793515908bf4255150516c6
MD5 efa87d0c1b90ac7b538de2b43a16d9fd
BLAKE2b-256 cf2f7f4a2c4116a57a5217501dd7cf5c16e03d85a3884b4d789e089a28322c3d

See more details on using hashes here.

File details

Details for the file marimo_lens-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: marimo_lens-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 177.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}

File hashes

Hashes for marimo_lens-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f14ad0b669409e1a51ffac3950dcd096ba8eb59e324c639e72bf2d0a995cd129
MD5 d453a8faedfdb7855449d3db7ca566e2
BLAKE2b-256 0e520392a095dfa22a500bdf28c1f70f2d1b528636edcf63a0d98f83ecce02b0

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

This release

0.0.6 This release

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 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