plmbr/notebook-intelligence

A JupyterLab extension supporting Claude Code, Copilot, Ollama, and OpenAI-compatible LLMs, with MCP, skills, plugins, and notebook agents.

Notebook Intelligence (NBI)

What it is – An open‑source AI coding assistant that lives inside JupyterLab. It adds a chat sidebar, inline code generation, auto‑completion, and a programmable agent that can create, edit, and run notebook cells. The assistant can talk to a variety of large‑language‑model (LLM) back‑ends: GitHub Copilot, any OpenAI‑compatible or LiteLLM‑compatible endpoint, local Ollama models, or Anthropic’s Claude (via the Claude Code CLI).

Key capabilities

  • Chat panel – a left‑sidebar chat UI where you can converse with the model, attach images, and invoke special participants (@workspace, @mcp, …) that route requests to tools.
  • Inline code generation – click the spark‑icon on a cell (or press Ctrl+G/Cmd+G) to open a pop‑over that suggests code; accept with Ctrl+Enter.
  • Auto‑complete – suggestions appear while you type in code cells or Python file editors; Tab accepts.
  • Agent modes
    • Default agent – creates/edits/executes notebooks directly from chat.
    • ACP agent – experimental mode that talks to an external Agent Client Protocol service (currently OpenAI Codex) and requires admin enablement.
  • Claude mode – when the Claude Code CLI is installed, the chat panel runs via Claude Code and inline/chat uses Anthropic models. It brings Claude‑specific tools, skills, and Model Context Protocol (MCP) servers into JupyterLab.
  • Chatbook – a notebook where cells can be written in natural language (NL badge). Running a prompt cell generates code for the notebook’s active kernel and executes it, with configurable confirmation behaviour.
  • Cell‑output actions – right‑click or hover over a cell’s output to ask the model to explain errors, ask follow‑up questions, or troubleshoot, with the output sent as context.
  • Toolbar generation – a spark‑icon on the notebook toolbar opens a pop‑over that scopes generation to that notebook, useful in multi‑notebook sessions.
  • Multi‑language awareness – NBI detects the active kernel and language, ensuring generated code matches the notebook’s language (Python, R, etc.).
  • File‑change reloading – open tabs automatically refresh when the underlying file changes on disk, unless you have unsaved edits.

How to get started

pip install notebook-intelligence   # installs the Python package
jupyter lab                        # restart JupyterLab if it was already running
  1. Click the new NBI icon in JupyterLab’s left sidebar to open the chat panel.
  2. Open Settings (gear icon) → Notebook Intelligence Settings.
  3. Sign in to your LLM provider:
    • GitHub Copilot – click Sign in.
    • OpenAI/LiteLLM – paste an API key.
    • Ollama – point to a running local daemon.
    • Claude – enable Claude mode and ensure the Claude Code CLI is on your PATH (or set NBI_CLAUDE_CLI_PATH).
  4. Type a message in the chat panel and press Enter.

Configuration – Settings are stored in ~/.jupyter/nbi/ (JSON files). You can adjust provider choice, model IDs, token limits, permission modes for Claude, and policies that admins can lock down (e.g., whether auto‑run is allowed, whether bypass‑permissions mode is visible, etc.). Rulesets (markdown files) can be placed in ~/.jupyter/nbi/rules/ to inject custom system‑prompt instructions.

Administration – Certain experimental features (ACP agent, full‑access bypass permissions) are hidden until an admin enables them via environment‑variable policies (NBI_ACP_EXPERIMENTAL_POLICY, NBI_CLAUDE_BYPASS_PERMISSIONS_POLICY, …). Admins can also cap confirmation behaviours and lock UI toggles.

License – The project is released under an open‑source license (see the License section of the repository).

Related

  • Project
  • Dispatch
  • Project
  • Project
  • Project