Skip to main content

Glimpse

Add an AI assistant that can see the page to your NiceGUI app, in one line.

from nicegui import ui
import glimpse

@ui.page('/')
def dashboard():
    ui.echart({...})
    ui.aggrid({...})
    glimpse.attach()    # That's it

ui.run()

Users get a side panel where they can ask about what is on their screen. The assistant reads the live page when they ask, including their filters, sort order, selected tab and chart zoom. You do not annotate anything or pass it any data.

Glimpse beside a sales dashboard. After the user filters the grid, the assistant reports the 21 orders on screen and the highest amount among them

Status: 0.1, an early MVP. Capture, the panel and the security defaults are tested in a real browser. With Claude Opus 5.5, it answered all 26 reference questions correctly, in one run on a single dashboard with a simple scorer. That is a good early sign, not a full evaluation. See known limits.

Install

pip install "glimpse-ai[anthropic]"

Pick the extra for your model: anthropic, vertex for Google Cloud Vertex AI, gemini, openai for OpenAI and local models, and adk for Google ADK agents. The package is glimpse-ai, and you import it as glimpse. Python 3.10 or later and NiceGUI 3.19 or later are required. Gemini and ADK need Python 3.11 or later.

Try it

No API key is needed. Without one, the panel runs in a clearly labelled offline demo mode that answers from simple rules over the page.

git clone https://github.com/axnsantana/glimpse-ai && cd glimpse-ai
conda env create -f environment.yml && conda activate glimpse
python examples/02_sales_dashboard.py

For real answers, set ANTHROPIC_API_KEY or OPENAI_API_KEY on the server, point it at a Google Cloud project for Vertex AI, or run a local model. See Choosing a model.

Examples

Each one is a small runnable app, and each one runs in the test suite as it ships.

Example Shows
01 Quickstart One line, and answers that follow the screen
02 Sales dashboard ui.echart, ui.plotly, ui.aggrid, ui.table, inputs and tabs, with no annotations
03 Large data 200,000 points inside a 6,000-token budget
04 Multi-page apps One call for a whole app, including sub pages
05 Existing layouts Sharing a page with drawers and hostile CSS
06 Custom engines Your own agent, in as little as one async generator
07 Choosing a model Cloud or local models, prompts, usage and limits
08 Privacy and security Secrets stay out, and a compromised model cannot exfiltrate data
09 Developer context Adding what the screen cannot show
10 Two users Sessions that never see each other
11 Cloud and agents Vertex AI with a project and region, the council engine, and your own ADK agent

What makes it different

Passing data to a chat function by hand works until users start filtering. Then a hand-wired assistant answers from all the rows while the user looks at a few. Glimpse reads the view the user actually has, on each question.

Sees the applied view Grid filters and sort, chart zoom and hidden series, table sort, inputs and tabs
Stays inside a budget Large tables and series become statistics computed in Python, plus a visible "Showing 50 of 12,000 rows" and read-only tools to fetch more
Shows its work "What the assistant saw" under each answer, and sources that scroll to the element used
Safe by default Passwords withheld, hidden text ignored, images and external links in answers disabled, sessions isolated
Your model Claude and Gemini, on their APIs or on Vertex AI, OpenAI, local models, a council of models that checks its answers, a Google ADK agent, or your own. No cloud service of ours, and no agent framework required
Small NiceGUI is the only required dependency

The panel beside a host app with its own drawers and hostile CSS

How it works

Page (NiceGUI) -> Adapter -> PageContext -> Context builder -> Engine -> Model -> Sanitizer -> Panel

Everything runs in your NiceGUI process. Read Data flow to see what goes where.

Docs

Development

conda env create -f environment.yml && conda activate glimpse
pytest                # Fast tests, including every example
pytest -m e2e         # Real Chrome against the real examples
ruff check src tests examples

pytest -m live scores a real model on the reference question set (about $0.35 on Claude Opus 5.5) and checks real requests against the budget with the free token counting endpoint. See tests/test_fidelity.py.

License

MIT

Metadata

Release files for glimpse-ai 0.1.0

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

Source distribution (sdist)

Source distribution for glimpse-ai 0.1.0
File Size Uploaded Provenance Actions
glimpse_ai-0.1.0.tar.gz 645.8 kB With provenance Details for glimpse_ai-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for glimpse-ai 0.1.0
File Interpreter ABI Platform Actions
glimpse_ai-0.1.0-py3-none-any.whl Python 3 none any Details for glimpse_ai-0.1.0-py3-none-any.whl

Total release size: 730.9 kB

Release files / glimpse_ai-0.1.0.tar.gz

Download URL glimpse_ai-0.1.0.tar.gz
Size 645.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a7686e1bb139ef1d9b8ef235987c5992a3539ae248335a0356b95a471183aed8
BLAKE2b-256 checksum
How to use checksums
93f6f6b52ed6d91af3cf474333bf005a70f123e7226efeaf3e9eb7146e2454fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / glimpse_ai-0.1.0-py3-none-any.whl

Download URL glimpse_ai-0.1.0-py3-none-any.whl
Size 85.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6b50f55079c1ea585b18c3a2413ef1cc09c26993d8485089a66febf90e42143
BLAKE2b-256 checksum
How to use checksums
242feca6e4e22e84d068bb88e9b0adb0fcbf79d5dc8ee0b0e4be744449487281
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for glimpse-ai 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for glimpse_ai-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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