jupyter-ai-agents

๐Ÿช ๐Ÿค– AI Agents with ๐Ÿ”ง MCP tools and ๐Ÿงฐ Skills for JupyterLab โ€” Chat with your Notebook and execute code.

160
Stars
21
Forks
Jupyter Notebook
Language
8/23/2026
Added
View on GitHubDownload ZIP

โš ๏ธ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/datalayer/jupyter-ai-agents

Getting Started

Guides for using skills like jupyter-ai-agents.

Security Report

Verified

Last scanned: โ€”

{
  "status": "PASSED",
  "issues": []
}

README.md

Datalayer

Become a Sponsor

๐Ÿช ๐Ÿค– Jupyter AI Agents

Github Actions Status PyPI - Version

๐Ÿช โœจ AI Agents for JupyterLab with ๐Ÿ› ๏ธ MCP tools - Chat interface for intelligent notebook interaction, code execution, and workspace management.

๐Ÿ’ฌ Chat Interface

Experience seamless AI-powered assistance directly within JupyterLab through our intuitive chat interface:

Jupyter AI Agents Chat 1

The chat interface is built using Pydantic AI for robust AI agent orchestration and Vercel AI Elements for the user interface components.

MCP Server Integration

By default, the Jupyter MCP Server is started as a Jupyter server extension, providing access to all Jupyter MCP server tools directly through the chat interface. This enables the AI agent to interact with notebooks, execute code, manage files, and perform various Jupyter operations seamlessly.

Jupyter AI Agents Chat 2

Getting Started with Chat

Currently, we support Anthropic Claude Sonnet 4.0 as the AI model. To get started:

  1. Set up your environment:

    export ANTHROPIC_API_KEY='your-api-key-here'
    
  2. Install Jupyter AI Agents:

    pip install jupyter_ai_agents
    pip uninstall -y pycrdt datalayer_pycrdt
    pip install datalayer_pycrdt==0.12.17
    
  3. Launch JupyterLab with the required configuration:

    jupyter lab
    
  4. Access the chat interface through the right panel in JupyterLab.

What's Coming Next

We're actively working on expanding the capabilities of Jupyter AI Agents:

  • ๐Ÿš€ More LLM Providers: Integration with additional AI model providers
  • โš™๏ธ MCP Configuration: Enhanced MCP server configuration options
  • ๐Ÿ”ง Extended Tool Access: Chat access to tools from other MCP servers
  • ๐Ÿ› ๏ธ Enhanced Features: And much more!

Check out our GitHub Issues to see what we're working on. Contributions are welcome!

Note: The documentation at https://jupyter-ai-agents.datalayer.tech will be updated soon to reflect the new chat features and capabilities.

๐Ÿ–ฅ๏ธ CLI Usage

CLI Usage

You can also use Jupyter AI Agents through the command line interface for automated notebook operations.

Jupyter AI Agents CLI

Basic Installation

To install Jupyter AI Agents, run the following command:

pip install jupyter_ai_agents
pip uninstall -y pycrdt datalayer_pycrdt
pip install datalayer_pycrdt==0.12.17

Or clone this repository and install it from source:

git clone https://github.com/datalayer/jupyter-ai-agents
cd jupyter-ai-agents
pip install -e .

JupyterLab Setup

The Jupyter AI Agents can directly interact with JupyterLab. The modifications made by the Jupyter AI Agents can be seen in real-time thanks to Jupyter Real Time Collaboration. Make sure you have JupyterLab installed with the Collaboration extension:

pip install jupyterlab==4.4.1 jupyter-collaboration==4.0.2

We ask you to take additional actions to overcome limitations and bugs of the pycrdt library. Ensure you create a new shell after running the following commands:

pip uninstall -y pycrdt datalayer_pycrdt
pip install datalayer_pycrdt==0.12.17

Examples

Jupyter AI Agents provides CLI commands to help your JupyterLab session using Pydantic AI agents with Model Context Protocol (MCP) for tool integration.

Start JupyterLab, setting a port and a token to be reused by the agent, and create a notebook notebook.ipynb.

# make jupyterlab
jupyter lab --port 8888 --IdentityProvider.token MY_TOKEN

Jupyter AI Agents supports multiple AI model providers (more information can be found on this documentation page).

API Keys Configuration

Set the appropriate API key for your chosen provider:

OpenAI:

export OPENAI_API_KEY='your-api-key-here'

Anthropic:

export ANTHROPIC_API_KEY='your-api-key-here'

Azure OpenAI:

export AZURE_OPENAI_API_KEY='your-api-key-here'
export AZURE_OPENAI_ENDPOINT='https://your-resource.openai.azure.com'
export AZURE_OPENAI_API_VERSION='2024-08-01-preview'  # optional

Important for Azure OpenAI:

  • The AZURE_OPENAI_ENDPOINT should be just the base URL (e.g., https://your-resource.openai.azure.com)
  • Do NOT include /openai/deployments/... or query parameters in the endpoint
  • The deployment name is specified via the --model-name parameter
  • See .env.azure.example for a complete configuration template

Other providers:

export GOOGLE_API_KEY='your-api-key-here'        # For Google/Gemini
export COHERE_API_KEY='your-api-key-here'        # For Cohere
export GROQ_API_KEY='your-api-key-here'          # For Groq
export MISTRAL_API_KEY='your-api-key-here'       # For Mistral
# AWS credentials for Bedrock
export AWS_ACCESS_KEY_ID='your-key'
export AWS_SECRET_ACCESS_KEY='your-secret'
export AWS_REGION='us-east-1'

Model Specification

You can specify the model in two ways:

  1. Using --model with full string (recommended):

    --model "openai:gpt-4o"
    --model "anthropic:claude-sonnet-4-0"
    --model "azure-openai:deployment-name"
    
  2. Using --model-provider and --model-name:

    --model-provider openai --model-name gpt-4o
    --model-provider anthropic --model-name claude-sonnet-4-0
    

Supported providers: openai, anthropic, azure-openai, github-copilot, google, bedrock, groq, mistral, cohere

Prompt Agent

Create and execute code based on user instructions:

# Using full model string (recommended)
jupyter-ai-agents prompt \
  --url http://localhost:8888 \
  --token MY_TOKEN \
  --model "anthropic:claude-sonnet-4-0" \
  --path notebook.ipynb \
  --input "Create a matplotlib example"

# Using provider and model name
jupyter-ai-agents prompt \
  --url http://localhost:8888 \
  --token MY_TOKEN \
  --model-provider anthropic \
  --model-name claude-sonnet-4-0 \
  --path notebook.ipynb \
  --input "Create a pandas dataframe with sample data and plot it"

Jupyter AI Agents - Prompt

Explain Error Agent

Analyze and fix notebook errors:

jupyter-ai-agents explain-error \
  --url http://localhost:8888 \
  --token MY_TOKEN \
  --model "anthropic:claude-sonnet-4-0" \
  --path notebook.ipynb \
  --current-cell-index 5

Jupyter AI Agents - Explain Error

REPL Mode (Interactive)

For an interactive experience with direct access to all Jupyter MCP tools, use the REPL mode:

jupyter-ai-agents repl \
  --url http://localhost:8888 \
  --token MY_TOKEN \
  --model "anthropic:claude-sonnet-4-0"

In REPL mode, you can directly ask the AI to:

  • List notebooks in directories
  • Read and analyze notebook contents
  • Execute code in cells
  • Insert new cells
  • Modify existing cells
  • Install Python packages

Example REPL interactions:

> List all notebooks in the current directory
> Create a new notebook called analysis.ipynb
> In analysis.ipynb, create a cell that imports pandas and loads data.csv
> Execute the cell and show me the first 5 rows
> Add a matplotlib plot showing the distribution of the 'age' column

The REPL provides special commands:

  • /exit: Exit the session
  • /markdown: Show last response in markdown format
  • /multiline: Toggle multiline input mode (use Ctrl+D to submit)
  • /cp: Copy last response to clipboard

You can also use a custom system prompt:

jupyter-ai-agents repl \
  --url http://localhost:8888 \
  --token MY_TOKEN \
  --model "anthropic:claude-sonnet-4-0" \
  --system-prompt "You are a data science expert specializing in pandas and matplotlib."

Prompt Agent

Create and execute code based on user instructions:

# Using full model string (recommended)
jupyter-ai-agents prompt \
  --url http://localhost:8888 \
  --token MY_TOKEN \
  --model "anthropic:claude-sonnet-4-0" \
  --path notebook.ipynb \
  --input "Create a matplotlib example"

# Using provider and model name
jupyter-ai-agents prompt \
  --url http://localhost:8888 \
  --token MY_TOKEN \
  --model-provider anthropic \
  --model-name claude-sonnet-4-0 \
  --path notebook.ipynb \
  --input "Create a pandas dataframe with sample data and plot it"

Explain Error Agent

Analyze and fix notebook errors:

jupyter-ai-agents explain-error \
  --url http://localhost:8888 \
  --token MY_TOKEN \
  --model "anthropic:claude-sonnet-4-0" \
  --path notebook.ipynb \
  --current-cell-index 5

Uninstall

About the Technology

Jupyter AI Agents empowers AI models to interact with and modify Jupyter Notebooks. The agent is equipped with tools such as adding code cells, inserting markdown cells, executing code, enabling it to modify the notebook comprehensively based on user instructions or by reacting to the Jupyter notebook events.

This Agent is innovative as it is designed to operate on the entire Notebook, not just at the cell level, enabling more comprehensive and seamless modifications.

The Agent can also run separately from the Jupyter server as the communication is achieved through RTC via the Jupyter NbModel Client and the Jupyter Kernel Client.

Jupyter AI Agents <---> JupyterLab
       |
       | RTC (Real Time Collaboration)
       |
Jupyter Clients

Contributing

Development install

# Clone the repo to your local environment
# Change directory to the jupyter_ai_agents directory
# Install package in development mode - will automatically enable
# The server extension.
pip install -e ".[test,lint,typing]"

Running Tests

Install dependencies:

pip install -e ".[test]"

To run the python tests, use:

pytest

Development uninstall

pip uninstall jupyter_ai_agents

Packaging the library

See RELEASE.

Frequently Asked Questions

What is jupyter-ai-agents?โŒ„

jupyter-ai-agents is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by datalayer. ๐Ÿช ๐Ÿค– AI Agents with ๐Ÿ”ง MCP tools and ๐Ÿงฐ Skills for JupyterLab โ€” Chat with your Notebook and execute code. It has 160 GitHub stars.

Is jupyter-ai-agents safe to use?โŒ„

jupyter-ai-agents returned warnings in SkillsLLM's automated security scan. It has no critical vulnerabilities, but review the flagged issues in the Security Report section before adding it to your workflow.

How do I install jupyter-ai-agents?โŒ„

Clone the repository with "git clone https://github.com/datalayer/jupyter-ai-agents" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is jupyter-ai-agents written in?โŒ„

jupyter-ai-agents is primarily written in Jupyter Notebook. It is open-source under datalayer on GitHub, so you can review or fork the full source.

Are there alternatives to jupyter-ai-agents?โŒ„

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh jupyter-ai-agents against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

โญ 242,219โ‘‚ 36,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details โ†’
15

An agentic skills framework & software development methodology that works.

โญ 234,966โ‘‚ 20,863Shell
AI Agentsai-agentsbrainstorming
View details โ†’

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

โญ 185,940โ‘‚ 28,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details โ†’

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

โญ 128,868โ‘‚ 8,826Rust
AI Agentsclaude-codeai-tools
View details โ†’

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

โญ 120,031โ‘‚ 19,897Shell
AI Agents
View details โ†’

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

โญ 242,219โ‘‚ 36,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details โ†’
15

An agentic skills framework & software development methodology that works.

โญ 234,966โ‘‚ 20,863Shell
AI Agentsai-agentsbrainstorming
View details โ†’

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

โญ 201,881โ‘‚ 60,308TypeScript
MCP Serversapisai-tools
View details โ†’

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

โญ 185,940โ‘‚ 28,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details โ†’

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

โญ 128,868โ‘‚ 8,826Rust
AI Agentsclaude-codeai-tools
View details โ†’