Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Frontends

The extension works the same way in each Jupyter frontend, but the frontends differ in what one page shows. The behavior below was checked with the tested versions.

JupyterLab

Jupyter Notebook 7

Each page (/tree, /notebooks/<path>, /edit/<path>) is a separate application with its own 21 tools. get_context adds a note that tells the agent this.

JupyterLite

Install jupyter_webmcp in the environment that runs jupyter lite build: the build then includes the extension and jupyterlab-ai-commands. Serve the site from localhost, 127.0.0.1 or HTTPS.

Upstream issues

These issues are in other packages (jupyterlab-ai-commands 0.4.0 unless stated):

  1. execute-in-kernel never returns when its kernel restarts, so a pending run_code call never settles (server kernels and JupyterLite).

  2. The commands that open a document widget fail or hang in apps that show one document per page (Jupyter Notebook 7, the notebooks UI of JupyterLite): create-file, and add-cell, set-cell-content, run-cell, delete-cell, save-notebook and set-file-content on a document that is not open in the page. create-notebook returns, but it starts a kernel in a page that cannot show the notebook.

  3. create-notebook and create-file fail when the file exists, but leave an Untitled file.

  4. There are no commands to interrupt or restart a kernel by id (this extension adds them), and add-cell has no position: "end": to append a cell, agents pass the id of the last cell.

  5. For a missing path, the file and notebook commands open an error dialog and can stay pending.

  6. get-notebook-content gives no cell ids for notebooks older than nbformat 4.5.

  7. Argument descriptions say “If not provided, uses the active notebook” also where the tool requires the argument.

  8. jupyterlite-ai 0.20.1 requires jupyterlab-ai-commands < 0.4, so the two packages cannot be installed together with this extension.