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 notebook-agent workflow.

Quick start

Open a local marimo notebook with Lens available:

uvx --with marimo-lens marimo edit --no-token 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.

--no-token lets marimo Pair discover this local notebook. Getting started covers existing projects and includes a live selection example.

Connect an agent

Install the Lens skill and marimo Pair:

npx skills add marimo-team/marimo-lens
npx skills add marimo-team/marimo-pair

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

Resolve my Lens request.

The marimo Pair guide covers the ready-made workflow. Overview shows how another agent can read the request, show its activity, return a result, and keep completed feedback available for another pass.

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.5.tar.gz (166.0 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.5-py3-none-any.whl (176.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for marimo_lens-0.0.5.tar.gz
Algorithm Hash digest
SHA256 ff547a82981e0c76a34b772c10d427769739c04a5666887be9e6c9923bf982d2
MD5 8c56d6dc11fd48a1defa28035909403f
BLAKE2b-256 b041b301b69569f01f4066f0ff6de52e4068f493db7105e6c805d36817a98411

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for marimo_lens-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3044ca1e0ddb4eb85456216dd3ee4de02fc67d2c8db6583a635d8f445b61db3c
MD5 2ea1fdc2407057f86ea3a0e919bebe77
BLAKE2b-256 04636b3e70278a7e5e2766d240877f2357cb70de148f31186e343e94075e7f34

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

0.0.6

2 files

This release

0.0.5 This release

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