PyCharm: We Gave AI Agents a L... Note

PyCharm: We Gave AI Agents a Live Jupyter Kernel in PyCharm

Traditional AI agents struggle with Jupyter notebooks, often corrupting files and losing model state upon completion. A new Jupyter skill integrated into PyCharm addresses this by allowing AI agents to operate within a live Jupyter kernel. This innovation ensures state persistence across cells, preventing notebook corruption. It also optimizes long jobs by having the agent wait for execution rather than constantly polling. This live kernel approach proved to be approximately 12% cheaper for Claude Opus 5 across twelve machine learning tasks. The cost savings stem from an improved cache-warming mechanism, leading to a higher percentage of cache reads. Previously, AI tools treated notebooks as plain text, leading to corruption and loss of critical runtime information when using subprocesses. The new Jupyter skill leverages PyCharm's internal notebook intelligence to provide the agent with direct kernel control. This allows agents to write and run Python code directly, maintaining variables and trained models. The skill also implements a more efficient waiting mechanism and reads only new output, reducing token waste. While cost savings are evident, especially for stateful jobs, the skill also offers workflow improvements for other models. Users are reminded to explicitly instruct agents to save their work. Complex ML tasks may still require human intervention, as the skill addresses tooling inefficiencies, not fundamental ML difficulty. This functionality is available with a JetBrains AI subscription.