Browser-based AI workflows in Jupyter

JupyterCon 2025

2025-11-04

Jeremy Tuloup

About

  • Jeremy Tuloup
  • QuantStack
  • JupyterLab, Jupyter Notebook, JupyterLite

The AI space is moving (very) fast

  • New models
  • IDE integrations
  • CLI, TUI
  • Background agents

End-user products for AI in Jupyter

The state in 2025

AI integration in the browser?

  • What about JupyterLite?
  • Using AI models in the browser?

Forward-looking view on AI in Jupyter

One of the possible views for what AI in Jupyter can look like.

Agenda

  • JupyterLite
  • Remote AI Models
  • Agent Mode
  • Model Context Protocol
  • In-Browser LLMs
  • Built-in AI
  • Privacy & Limitations
  • What's Next?

What is JupyterLite?

JupyterLite is a JupyterLab distribution that runs entirely in the web browser, backed by in-browser language kernels.

Lightweight Jupyter running in the browser

  • ✅ can be hosted as a static website
  • ✅ no need to install Python and other packages on the user machine
  • ✅ kernels run in the browser via WebAssembly (Pyodide, Emscripten Forge)
  • ✅ easy to embed a live Python console on your website

center

How to integrate AI in JupyterLite?

https://github.com/jupyterlite/ai

Chat with Remote Models

Connect to AI providers, directly from your browser (without a Python server)

  • Anthropic
  • OpenAI
  • Mistral
  • Ollama
  • More via extensions
Give me the Python code to print the Fibonacci sequence

Code completion

Agent Mode

  • Create new notebooks
  • Tool calling
  • Approve or reject tool calls
Create a demo notebook about pandas and matplotlib
Now clear all the outputs and run all the cells in the notebook

Accept / Reject Diffs

jupyterlab-diff provides commands to display diffs:

  • Split (side-by-side) diffs
  • Unified cell diffs
  • Unified file diffs

https://github.com/jupyter-ai-contrib/jupyterlab-diff

a screenshot showing the diff view

Use `polars` instead of `pandas` in the current notebook
Remove all comments from the current file

Execute JupyterLab Commands

  • Expose JupyterLab commands as tools to the agent:
  • discover_commands(query) to find available commands
  • execute_command(id, args) to execute a command

Control JupyterLab with natural language

  • "toggle the right area"
  • "show the about dialog"
  • "create a new chess pawn in jupytercad"
Create an empty .jcad file. Once opened, build a chess pawn, step by step, using the available jupytercad commands

AI Proxies and Gateways

  • Use LiteLLM or Portkey as a proxy server
  • Maintain a gateway server with secrets
  • Lightweight client in the browser
    • Low friction
    • No configuration needed

Model Context Protocol (MCP)

  • Open-source standard for connecting AI applications to external systems:
    • Tools
    • Resources
    • Prompts

Think of MCP like a USB-C port for AI applications. Just as USB-C provides a standardized way to connect electronic devices, MCP provides a standardized way to connect AI applications to external systems.

https://modelcontextprotocol.io

Remote MCP Servers

  • The server is hosted somewhere else
  • Available from any MCP client with an internet connection
  • Ideal for web-based AI applications

LLMs in the Browser

  • Run models directly in the browser
  • No server dependencies
  • Privacy-focused: no requests to external servers

In-Browser AI libraries

Built-in AI

  • Chrome: Gemini Nano
  • Edge: Phi-4-mini

Not just about code

  • ChromeAI multimodal capabilities:
    • Generate alt text for images
    • Transcribe audio to text
  • New Browser APIs:
    • Proofreader API
    • Summarizer API

Generate alt text for images

Generate transcripts

Proofread notebooks

Summarize files

The Case of Privacy

  • Data stays in the browser
  • No server round-trips
  • Enhanced privacy protection

Limitations of browser-based AI

  • Model size (300MB - 1GB - 22GB)
  • The model must be downloaded before use
  • Performance (requires good hardware, GPU)
  • Browser, flags and hardware compatibility
  • MCP:

Secrets Management

What's Next?

  • Real Time Collaboration and chat
  • Tool calls with built-in AI models (ChromeAI, EdgeAI)
  • AI CLI tool via jupyterlite-terminal

Building blocks for AI in Jupyter

Join us at the sprints!

References