Runcell: An AI Agent That Turns Your Jupyter Notebook Into a Data Science Co-Pilot
Updated on

If you spend most of your day inside Jupyter notebooks, you’ve probably tried AI coding tools like GitHub Copilot or Cursor. They’re great at autocomplete, but they stop at text — you still have to paste the snippet, run the cell, debug the error, install missing packages, and keep track of variables.
Runcell takes the next step.
It embeds an autonomous AI agent directly inside Jupyter, where it can read the live environment — variables, cells, DataFrames, plots — and then write, execute, debug, and iterate on code automatically. Instead of jumping between prompts and cells, the entire workflow becomes one continuous loop.
What Exactly Is Runcell?
Runcell is a JupyterLab extension + Python package (pip install runcell) that turns your notebook into an AI-powered automation environment.
Unlike standalone chat assistants, Runcell can:
- Read notebook state (
globals(), cell history, variables) - Insert and run code cells
- Generate visualizations
- Debug failing code
- Explain results in natural language
- Re-plan workflows as your notebook changes
It feels less like autocomplete and more like pairing with a junior developer who can touch the keyboard.
The Four Core Modes (with Demo Videos)
Runcell organizes its capabilities into four modes. Below are the official demos embedded from runcell.dev.
🎓 Interactive Learning Mode
AI teacher that explains algorithms with runnable examples — great for learning topics like K-means vs DBSCAN, PCA, clustering, etc.
🤖 Autonomous Agent Mode
The “YOLO button.”
The agent plans the task, writes code, runs cells, fixes errors, installs packages, and retries until the goal is complete.
✏️ Reasoning Agent
An advanced reasoning mode that thinks step-by-step before acting. It analyzes your notebook deeply and produces reliable refactors, code improvements, or stepwise solutions.
💬 AI-Enhanced Jupyter
Ask questions about your code, get explanations, generate charts, or request summaries — all inserted directly into your notebook.
Why Does Context Matter?
Most AI assistants operate outside your notebook. They generate code snippets without knowing:
- What variables exist
- What libraries are imported
- What shape your DataFrame has
- What errors occurred earlier
- Which cell produced which output
This leads to the classic “copy → paste → run → NameError → fix manually” loop.
Runcell solves this by reading environment context before generating code.
It knows:
df_salesis a 1M-row pandas DataFrame- You imported
matplotlib.pyplot as plt - A previous cell returned a seaborn heatmap
- Your kernel restarted 2 minutes ago
This context-awareness is what allows Runcell to finish multi-step tasks instead of handing you half-working scaffolds.
The idea builds on the Jupyter ecosystem’s recent push toward Notebook Intelligence (NBI), tool-calling, and Jupyter AI magics — but bundles it into a polished, plug-and-play experience.
Typical Workflow
Here’s what using Runcell feels like:
1. Install
pip install runcell
jupyter labextension enable runcell # Lab 4 auto-detects the extension2. Open any notebook
Click the Runcell sidebar icon.
3. Tell it what you want:
“Load
sales.csv, compute YoY growth by region, and visualize it as a seaborn heatmap.”
4. Watch the agent handle the rest:
- Creates new code cells
- Runs them in order
- Installs
seabornif missing - Fixes import errors
- Explains results in Markdown
- Re-plans automatically when you edit a cell
It’s a fully assisted notebook workflow — without leaving Jupyter.
Where Runcell Shines
🔍 Exploratory Data Analysis (EDA)
Automate imports, cleaning, sampling, profiling, and chart generation.
📊 Reporting Workflows
Monthly recurring notebooks (same logic, new data) are perfect for autonomous execution.
🧪 Teaching & Demos
Interactive Learning Mode converts abstract topics into live, tweakable examples.
🧩 Refactoring & Debugging
Reasoning Agent finds bugs, rewrites functions, and simplifies messy notebooks.
💨 Rapid Prototyping
Ask for charts, try new models, and iterate without manual boilerplate.
Seamless Integration Across Environments
Runcell supports:
- JupyterLab 4
- Classic Notebook
- VS Code Notebooks
No editor switching. No new workflow to learn. Just install and the agent appears directly inside your environment.
Limitations & Caveats
🔐 Cloud LLMs (for now)
Runcell uses cloud models unless you configure a local model. Sensitive datasets may require offline mode or careful configuration.
🧠 Autonomy Requires Clear Goals
Autonomous Agent mode can use more tokens if your request is ambiguous.
🧬 Multi-language notebooks
Python works best today; R/Julia support is experimental.
🖥️ Heavy notebooks may be summarized
Large DataFrames may be sampled or summarized before context is sent to the model.
The Bottom Line
Runcell isn't just autocomplete. It’s full-stack notebook automation — planning, coding, execution, debugging, and explanation — all inside Jupyter.
It transforms the notebook from a manual tool into a collaborative AI workspace that helps you think, iterate, and ship faster.
If you want an agent that understands your notebook and works with you, try:
pip install runcellGive your Jupyter workflow a co-pilot — and give your keyboard a break.