Registry / llm-agents / jupyter-ai

jupyter-ai

JSON →
library3.0.0pypypi✓ verified 85d ago

Jupyter AI is a set of extensions that provides agentic AI capabilities directly within JupyterLab. It integrates large language models (LLMs) and agents into notebooks and the JupyterLab interface, offering features like real-time chat, code generation, and AI-powered data analysis. The current version is 3.0.0, with an active development cadence releasing frequently, especially leading up to major versions.

pip install jupyter-ai
INSTALL
IMPORT
SIG · JUPYTER-AI
J
jupyter-ai
llm-agentspythonv3.0.0
Install
29.0s avg
Import
3955ms
Disk
314MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.830s · 292.1MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 29.0s · import 0.752s · 274MB
314MB installed
● package 314MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DEFAULT_JUPYTER_SERVER_MCP_TOOLS
from jupyter_ai import DEFAULT_JUPYTER_SERVER_MCP_TOOLS
from jupyter_ai_magics import AiMagics

To use Jupyter AI, ensure it's installed and your JupyterLab server is running. You primarily interact with Jupyter AI through its dedicated chat interface in the JupyterLab sidebar or directly within notebook cells using magic commands (e.g., `%%ai`). Most LLM providers require an API key, which should be set as an environment variable before launching JupyterLab or configured via JupyterLab's settings. The example demonstrates loading magic commands, listing models, and basic usage for code generation and agent interaction.

import os # Before starting JupyterLab, set your API key for a model provider. # Example for OpenAI: # os.environ['OPENAI_API_KEY'] = os.environ.get('OPENAI_API_KEY', 'YOUR_OPENAI_KEY') # For other providers like Anthropic: # os.environ['ANTHROPIC_API_KEY'] = os.environ.get('ANTHROPIC_API_KEY', 'YOUR_ANTHROPIC_KEY') # --- In a Jupyter notebook cell: --- # (Optional) Explicitly load the AI magic commands, though often loaded automatically # %load_ext jupyter_ai_magics # List available models and providers # %%ai list # Use a model for code generation # %%ai chatgpt -f code # Create a Python function to calculate the Nth Fibonacci number recursively. # Use an agent to interact with Jupyter (requires agent-capable model like Claude, Gemini) # %%ai claude -m anthropic.claude-3-haiku-20240307-v1:0 # Write a simple Python script to list files in the current directory and save it as 'list_files.py'. # Note: Agent actions that modify files or execute commands will prompt for approval in the UI. # --- Using the Jupyter AI chat interface: --- # 1. Open the 'Jupyter AI' panel in the left sidebar of JupyterLab. # 2. Select a model provider and model from the dropdowns. # 3. Start a conversation or ask for assistance with your notebook content.
jupyter-ai --version
Debug
Known issues
breakingJupyter AI v3.0.0 introduces significant breaking changes, including a complete overhaul of the agent architecture via the Agent Client Protocol (ACP) and a migration from Langchain to LiteLLM for LLM integration.
fix
Review the official Jupyter AI v3.0.0 documentation and migration guides. Existing codebases or configurations relying on Langchain providers will need to be updated to use LiteLLM. Agent interactions will follow the new ACP model, which may require adjustments to prompts or expectations.
affects: >=3.0.0
breakingThe internal LLM integration framework changed from Langchain to LiteLLM in v3.0.0beta6 (which carried into v3.0.0 stable). Any custom integrations or model configurations built specifically on Langchain will no longer work.
fix
Reconfigure your LLM providers and models according to LiteLLM's conventions. Consult LiteLLM documentation for details on setting up credentials and models. Remove any explicit Langchain dependencies from your environment if they were only for Jupyter AI.
affects: >=3.0.0
gotchaJupyter AI agents in v3.0.0 now require explicit user permission for tool calls that modify the filesystem or execute commands within JupyterLab (e.g., writing files, running terminal commands).
fix
Be aware that agent actions might pause, awaiting your approval in the JupyterLab UI (often in the chat panel or a pop-up dialog). This is a security feature; monitor the agent's output and approve/deny actions as prompted.
affects: >=3.0.0
gotchaThe Dask dashboard, which shows progress for '/learn' calls, is disabled by default starting from v2.31.7. This is intended to avoid unintended resource usage in production environments.
fix
If you need to monitor Dask activity for development or debugging, enable it by starting your Jupyter server with `--AiExtension.enable_dask_dashboard=True`. The dashboard will typically be available on port `8787`.
affects: >=2.31.7
Upgrade
Version history
3.0.0latest on PyPI · released Apr 1, 2026
Audit
Dependencies
jupyterlabrequiredJupyter AI is a JupyterLab extension and requires JupyterLab to function.
jupyter_server_mcprequiredRequired for agent capabilities and managing tool calls within JupyterLab, introduced in v3.0.0.
jupyterlab_commands_toolkitrequiredA core dependency for integrating commands into JupyterLab, added as required in v3.0.0rc1.
litellmrequiredProvides integration with over 1000 LLM providers; replaced Langchain in v3.0.0.
boto3optionalRequired for connecting to Amazon Bedrock models.
Agent activity
20 hits · last 30 days
node
18
Bingbot
1
OpenAI (training)
1
Resources
jupyter-ai — pip install jupyter-ai · libregistry