ipyllm is a open source IPython extension that seamlessly integrates Large Language Models (LLMs) into your live IPython environment. Built on top of the versatile llm package, ipyllm extends the IPython REPL with agents that access your current environment to help you solve data analysis tasks, assist you with the exploration of an API or help you debug issues in your code.

What can ipyllm do for you? Link to heading

  • Effortless Data Exploration: Instead of explaining your dataset in text, ask %llm What columns in df have missing values? or %%llm Plot the rolling average of sales using matplotlib and run the code.. The model inspects the live variables, writes the visualization, and executes it in your session.
  • Contextual Debugging: When a script stalls or fails, drop ipyllm.embed() into your code. It works just like IPython.embed(), giving the assistant direct access to the function’s local scope and variables. You can ask: “What is holding result in a None state?” and let the model inspect local state on the fly.
  • Diagnostic Shell Integration: Run commands inside %%llm --run (such as pytest -q) to capture stdout, stderr, and exit codes instantly, letting the model explain failures and suggest fixes without manual log pasting.

Supercharging Data Analysis with Agent Skills Link to heading

Data analysis workflows often require specialized domain knowledge. ipyllm bridges this gap by supporting local Agent Skills.

By placing instruction files (SKILL.md) in project or user directories (.agents/skills/, .cursor/skills/, etc.), you can invoke domain expertise instantly with a slash prefix:

%llm /pandas Find and handle outliers in `df` using IQR.
%%llm /seaborn
Compare the feature distributions in `df` and explain the plot.

When you combine Agent Skills with a live IPython environment, the model receives precise, specialized instructions on how to approach a problem, while retaining the ability to execute code and verify results directly against your actual data objects.

Stay tuned for upcoming features!. For further details, please take a look at the documentation. The code is freely available at GitHub. You can install ipyllm from PyPI as well.