Using Jupyter AI without Real-Time Collaboration (RTC)

Hi everyone,

I’m trying to deploy Jupyter AI in a multi-user JupyterHub environment running on an HPC cluster.

Our users do not need Real-Time Collaboration (RTC). We only want the AI capabilities (chat, notebook assistance, commands, etc.) while keeping the classic single-user notebook workflow.

Environment
JupyterHub 5.3.0
JupyterLab 4.4.6
Notebook 7.4.5
Jupyter Server 2.17.0
BatchSpawner + Grid Engine
Shared NFS home directories
The problem

After installing Jupyter AI 3.0, users started experiencing:

Very slow notebook opening
“File ID error”
“File changed on disk”
Intermittent notebook loading failures

From the server logs we observed requests such as:

POST /api/fileid/index
PUT /api/collaboration/session/…
GET /api/collaboration/room/…

even though we never intended to enable collaborative editing.

Eventually we found that Jupyter AI installs components such as:

jupyter_server_documents
jupyter_server_fileid
@jupyter-ai-contrib/server-documents
@jupyter/docprovider-extension

After removing these components, notebook opening returned to normal and the File ID errors disappeared.

What I’m trying to achieve

I’d like to run:

:white_check_mark: Jupyter AI
:white_check_mark: AI chat
:white_check_mark: AI notebook assistance

but without:

Real-Time Collaboration
File ID manager
Collaborative document provider
RTC sessions

In other words, I want notebooks to behave exactly like a standard JupyterLab installation while still exposing the AI features.

Questions
Is running Jupyter AI without RTC officially supported?
Are jupyter_server_documents and the RTC stack mandatory dependencies, or only optional?
Is there a recommended way to disable all RTC functionality while keeping the AI features?
Has anyone successfully deployed Jupyter AI in a non-collaborative JupyterHub environment?

Any recommendations or examples would be greatly appreciated.

Thanks!

Have you tried deploying GitHub - jupyterlite/ai: Browser-based AI code completions and chat for JupyterLab, Notebook 7 and JupyterLite ✨ · GitHub? This one does not include RTC components.

There is some explanation on the differences between jupyter-ai and jupyterlite-ai on Project Jupyter | AI in Jupyter

Hi, I don’t have an answer to your question (I am a newbie jupyter admin), but I just wanted to share that we have a similar setup to yours (jupyterhub, jupyterlab 4,3,x etc.) and we successfully installed jupyter-ai. We also got RTC, but we don’t use it and does not seem to cause any issues. The only issue we faced is related to the the jupyter MCP server, which you can find in this post.

We don’t use jupyternaut at this time (may in future), but we created our own Jupyter-AI persona.

Hope this helps somehow.

Hi @krassowski,

Thanks for the suggestion.
I tried deploying jupyterlite-ai instead of jupyter-ai.

I tested with:
JupyterHub 5.3.0
JupyterLab 4.6.2
Notebook 7.6.1
Python 3.12

I installed the latest main branch from GitHub:
cloned the repository
ran jlpm install
ran jlpm build
installed:
python/jupyterlite-ai
python/jupyternaut-persona

The extensions now appear as:

@jupyterlite/ai enabled OK
@jupyternaut/persona enabled OK

However, no AI UI is exposed:

no AI sidebar
no AI settings
no chat
no plugins appear in the JupyterLab Plugin Manager

The browser console shows no JavaScript errors.
Is there an additional activation or configuration step required when using jupyterlite-ai with a regular JupyterLab installation (not JupyterLite)?

Hi @krassowski,

Just an update after following your suggestion.

I switched from jupyter-ai to jupyterlite-ai and created a completely isolated JupyterHub development environment for testing.

Current environment:

  • JupyterHub 5.3.0
  • JupyterLab 4.6.2
  • Notebook 7.6.1
  • Python 3.12
  • BatchSpawner + Grid Engine
  • Shared NFS filesystem

To avoid using the PyPI package, I cloned the latest main branch and built it from source:


git clone https://github.com/jupyterlite/ai.git
jlpm install
jlpm build

pip install -e python/jupyterlite-ai
pip install -e python/jupyternaut-persona

The installation appears to be successful.

jupyter labextension list reports:


@jupyterlite/ai enabled OK
@jupyternaut/persona enabled OK

There are no JavaScript errors in the browser console, and JupyterLab is running from the same Python environment where the extensions are installed.

However, I still don’t get any AI functionality in the UI.

Specifically:

  • no AI sidebar
  • no AI chat
  • no AI settings
  • no @jupyterlite/ai plugins visible in the JupyterLab Plugin Manager

Here is what the JupyterLab UI looks like after the installation:

(attach the screenshot)

Did I miss an activation/configuration step, or is there currently a limitation when running jupyterlite-ai inside a regular JupyterLab/JupyterHub deployment (instead of JupyterLite)?

Thanks!

Sorry, I do not follow why you would want to avoid using the PyPI package?

(attach the screenshot)

This is missing.

I can’t think of a reason this would not work on JupyterHub. I think the installation steps seem off, it clearly suggests that the frontend extension is not in fact correctly installed.

Thanks. I actually tried the PyPI package first. With jupyterlite-ai 0.19.0 and JupyterLab 4.6.2, jupyter labextension list reported @jupyterlite/ai as incompatible (enabled X) due to an @jupyter/ydoc dependency conflict.
That is why I tried building from source. After doing that, the extension changed to enabled OK, but the AI UI still did not appear.
I agree that the symptom looks like the frontend extension is not being loaded correctly.
If PyPI is the recommended installation method for regular JupyterLab/JupyterHub, could you please share the expected installation steps/version combination? I can reproduce them in a clean test environment.
I’ll also attach the missing screenshot.

jupyter labextension list output is a suggestion in that case. It does not mean that it won’t work.

@guy_ford Thanks for opening this topic! Yes, currently Jupyter AI v3 requires RTC to support a few of its key features. I’m getting similar reports from other users, and it’s really clear that Jupyter AI needs an RTC-free default that keeps RTC usage optional for people who don’t need it.

I am actively working on a proposal to decouple the two and make the next release RTC-free by default. It may take a few weeks but the plan is to have a Jupyter AI v3.2 that makes RTC optional by 9/1. Really hope this timeline works for you, let me know if you’d like to test the pre-releases (those may come sooner)!

Also, I think (?) our Zulip chat usually gets more attention from maintainers. I made an account for the first time replying to this haha. Feel free to DM me if you have any questions! (jupyter.zulipchat.com)

Update: resolved

I was able to resolve the issue, and jupyterlite-ai is now working correctly in our JupyterHub development environment. The AI chat is visible and loading as expected.

The issue turned out to be related to the runtime environment used by the Grid Engine spawner. After aligning the single-user server environment with the Python/Jupyter environment where jupyterlite-ai was installed and restarting the JupyterHub/single-user server, the frontend extension loaded correctly.

Also, as @krassowski pointed out, the enabled X shown by jupyter labextension list due to the @jupyter/ydoc version check did not prevent the extension from working.

So jupyterlite-ai 0.19.0 is working for us with JupyterHub and JupyterLab 4.6.2.

Thanks @krassowski for pointing me in the right direction!