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

Connect a notebook agent that can call the Lens Python API to the same running notebook. marimo Pair provides a ready-made integration.

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, and SelectionImage. Agent integrations use four methods:

Method Behavior
lens.context() Returns detached selection context with lazy notebook text
lens.activity(cell_id, *, label=None, message=None) Marks the agent's current work until its result is ready
lens.reveal(cell_id, *, 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.3.tar.gz (173.2 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.3-py3-none-any.whl (182.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: marimo_lens-0.0.3.tar.gz
  • Upload date:
  • Size: 173.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","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.3.tar.gz
Algorithm Hash digest
SHA256 32314e02d330bdd6515cf3adaf0a759bd9792e3e08d9f8dd6ec43bd605ca9870
MD5 76fadbe87a1213dba9405b048974740b
BLAKE2b-256 040d663dad43acee421e2767914ecd3b6dbdc7a76d7185a965b3b6cdd0a47c37

See more details on using hashes here.

File details

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

File metadata

  • Download URL: marimo_lens-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 182.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6d6e8f799dbaf7d1c8f3ec520462e425591ccb317c7a057dccfadf09f3c8e551
MD5 3a0bcee2f1508a124745f02fae10bfa4
BLAKE2b-256 cb87157919c036b671e6bd445ae19873fd487590ec4b5923fb562fcb16e6b0d9

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

0.0.5

2 files

0.0.4

2 files

This release

0.0.3 This release

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