Skip to content

JupyterLite

JupyterLite runs JupyterLab in the browser, with no server. The xtralite package makes a JupyterLite site with the extensions and defaults of xtralab, and with coding agents that run in the browser:

  • Pi, the pi coding agent, in the JupyterLite terminal.
  • Pi and Jupyternaut, the personas of Jupyter AI Lite, in a chat.

Try xtralite in your browser.

  1. Install xtralite in a Python environment. It installs JupyterLite and the extensions of the site:

    Terminal window
    pip install xtralite
  2. Put the files of the site in a contents folder, then build the site:

    Terminal window
    jupyter lite build --contents contents --output-dir dist
  3. Serve the dist folder with a static file server, for example:

    Terminal window
    python -m http.server --directory dist

The JupyterLite terminal downloads its shell commands (WebAssembly) with micromamba during the build. Install micromamba before you build the site.

jupyter lite build applies the xtralab defaults (the layout, the settings, and the disabled extensions), then the changes of xtralite for the browser.

Feature JupyterLite
Agent launcher Yes: Pi in a terminal, and Pi or Jupyternaut in a chat
Ask an agent Yes, in a new terminal or chat, or in an open chat
Omnibox Yes. The file search reads the files of the site
Terminals panel Yes, for the agents that you start from xtralab
File browser, editor breadcrumbs, themes and defaults Yes
Git diffs No: git needs a server
Language servers No: language servers need a server
Search and replace in files No: the search runs on the server
MCP server No: the agents run in the browser and use JupyterLab directly

The launcher shows:

  • Pi: starts the pi command in a new JupyterLite terminal. The prompt of the launcher is the first message.
  • Pi chat and Jupyternaut chat: open a new chat and send the prompt to the persona.

The omnibox and the ask-agent prompt show the same agents. The ask-agent prompt also lists the open chats where Pi or Jupyternaut takes part: the persona sent a message in the chat, or you sent or mentioned a message to it. The prompt goes to the chat as a message to that persona.

The ask-agent prompt does not list the terminals where Pi runs: without a server, xtralab cannot see which command runs in a terminal.

The agents call the model provider from the browser. Add a provider before you send a prompt:

  • For Pi, run Pi: Add a Model Provider from the command palette, or type /login in the pi command of a terminal. Pi uses the same provider in the terminal and in the chat.
  • For Jupyternaut, open the AI Agent settings.

The provider must accept requests from a web page (CORS). See the pi documentation for the providers that do.

Put a jupyter-lite.json file or an overrides.json file in the folder of the site to change the configuration. Their values replace the values of xtralab and xtralite.

For example, to make Jupyternaut the default persona of the chats, add this jupyter-lite.json:

{
"jupyter-lite-schema-version": 0,
"jupyter-config-data": {
"jupyter_ai_default_persona": "jupyternaut-frontend"
}
}

The launcher shows a terminal agent only when the command exists in the JupyterLite terminal. Without a server, xtralab cannot check the commands: set requireAvailable to false for each agent to show, in the agents setting of xtralab:launcher. xtralite does this for Pi.