Positron Notebook Editor

Use the Positron Notebook Editor for a native notebook experience with integrated AI assistance, data exploration, and improved data science workflows.
Note

The Positron Notebook Editor is the default editor for Jupyter (.ipynb) files.

The Positron Notebook Editor provides a familiar notebook experience for Jupyter (.ipynb) files. IDE features work out of the box in notebooks, including AI assistance, data exploration, and debugging.

Key features

  • Batteries-included experience: No extensions required for core features
  • Improved user experience: Optimized for data science workflows
  • Notebook-aware AI assistance: AI understands your notebook context, execution history, and execution order
  • Integrated data exploration: Variables pane and Data Explorer work seamlessly
  • Debugging: Works out of the box without additional setup
  • Improved version control: Control what metadata is saved for better diffing and version control

Use the Positron Notebook Editor

The Positron Notebook Editor is the default editor for Jupyter Notebooks, so your .ipynb files open in it automatically. If you prefer the Legacy Notebook Editor, disable the positron.notebook.enabled setting, and .ipynb files will open in the Legacy Notebook Editor instead.

Getting started

You can create and edit .ipynb files in Positron just as you would in other editors. To learn how to use the Positron Notebook Editor, check out our demo notebook.

Notebook layout

For the best experience, open the Command Palette with and run the View: Notebook Layout command. This layout arranges the IDE panes into a notebook-friendly setup, giving you quick access to your variables, plots, and other data science tools alongside your notebook.

Stylized diagram of the Positron IDE with three main regions: the Posit Assistant chat pane on the left, the notebook editor in the center showing a code cell and a scatter plot, and the Session pane on the right listing variables in the active session.

Diagram of the Positron IDE in Notebook layout showing the Posit Assistant chat pane to the left, the notebook editor in the center, and the Session pane with Variables to the right.

To learn more about customizing the Positron interface, read the Layout documentation.

Setting up your environment

Positron comes bundled with Jupyter kernel support for R and Python. Once you have configured a Python or R environment for Positron, you do not need to install any additional dependencies into your environment before using a notebook.

If an environment installed on your computer is not available in Positron, you might want to read more about how Positron discovers Python installations and R installations.

Selecting a notebook kernel

When you first open a Jupyter Notebook, Positron starts a notebook session and automatically selects an interpreter based on the notebook’s language, the current workspace, and your configuration. The interpreter used by the notebook is visible in the Kernel Selector in the notebook editor action bar.

Each notebook session belongs to one notebook editor. Closing the notebook editor shuts down the session.

When a notebook session is active, the Interpreter picker shows the notebook filename. This signals that a notebook, not a console, is currently active. To see the runtime backing the notebook, check the Kernel Selector in the notebook editor action bar.

Notebook Editor action bar with the kernel selector dropdown highlighted in red, showing a Python virtual environment selected.

The Positron Notebook Editor action bar with the kernel selector highlighted, showing a Python virtual environment as the selected interpreter.

You can select a different interpreter for the notebook by selecting the Kernel Selector in the notebook editor action bar. The Change Kernel… option will display a list of all the registered interpreters. Select an interpreter from the list.

Alternatively, you can run the Positron Notebook: Change Kernel… command from the Command Palette.

When a notebook is the active editor, the Interpreter picker also offers a Change Notebook Session… action that opens the same kernel-selection list.

You can restart the notebook session at any time by selecting the icon in the notebook editor action bar.

Version control

The Positron Notebook Editor controls what metadata is saved to the notebook file. This makes notebooks more version-control-friendly. By default, cell outputs are saved but execution counts are not. You can adjust this behavior with the Saving settings below.

AI integration

The Positron Notebook Editor integrates with Posit Assistant to provide notebook-aware AI assistance:

  • Context-aware: Assistant has access to rich context about your notebook, including cell states, execution history, code, and outputs including images and tables.
  • Dynamic Suggestions: Assistant follows your work and dynamically suggests actions to improve your notebook.
  • Actionable Editing: With your permission, Assistant can directly edit and run cells in your notebook.
  • Transparent: You can inspect and control the specific context the Assistant is using.
  • Collaborative: The notebook follows the assistant’s edits, so it scrolls to and highlights cells as they change.

Enable Posit Assistant

To use the integrated notebook AI features, first configure a language model provider. See the Getting Started guide for more details. We recommend using Anthropic for the best experience.

Once you are signed in, you will see assistant specific actions in the notebook editor action bar. To disable notebook AI features, set notebook.ai.enabled to false. See Configure AI features for other ways to turn AI features on and off.

Notebook action bar showing the Ask Assistant icon button.

The Positron Notebook Editor action bar showing the Ask Assistant button.

Notebook Assistant panel

The Notebook Assistant panel provides a quick way to interact with Assistant directly from your notebook. To open it, select the Ask Assistant icon button in the notebook editor action bar.

Notebook Assistant panel showing context cells, quick actions like Fix, Explain, and Improve, and AI-generated suggestions based on the notebook state.

The Notebook Assistant panel showing the cells included in the context, quick actions to fix, explain, or improve the current notebook, and an action to generate AI suggestions based off the current state of the notebook.

From the panel, you can:

  • Change notebook settings: Turn Show edit diffs, Auto-follow edits, and Ghost cell suggestions on or off for this notebook only. Each switch follows your global setting until you change it. Select Open global settings to change the default for all notebooks.
  • View context: See which cells Posit Assistant uses as context.
  • Ask Assistant to: Choose Explain This Notebook, Fix Errors and Issues, or Improve This Notebook.

You can also select Generate AI Suggestions to get prompts based on your file. Or, type your own request in the Or enter a custom prompt box. When you choose any action, suggestion, or custom prompt, Positron starts a new chat in Posit Assistant and sends the prompt.

Fix and explain cell errors

When a cell fails to run, Positron shows Fix and Explain buttons right on the error output. Choose one to send the error to Assistant for immediate help:

  • Fix: Assistant diagnoses the error and suggests a corrected version of your code.
  • Explain: Assistant describes what your code does, analyzes the error, and suggests possible solutions, without editing your notebook.

Use the button to start a new chat with the error attached as context. Use the dropdown arrow on the button to send the error to your current chat instead.

Ghost cell suggestions (experimental)

Ghost cell suggestions use AI to predict your next step after you execute a cell. A ghost cell appears below the current cell with a suggested action you can accept, edit, or dismiss.

To enable ghost cell suggestions, set positron.assistant.notebook.ghostCellSuggestions.enabled to true. By default, suggestions appear automatically after cell execution. To trigger suggestions yourself, disable positron.assistant.notebook.ghostCellSuggestions.automatic and click Get Suggestion or press .

Follow assistant

When Posit Assistant edits cells in your notebook, the notebook scrolls to each cell as it changes and highlights it. This lets you review changes as they happen. To stop following edits in all notebooks, set positron.assistant.notebook.autoFollow to false. To stop following edits in one notebook only, turn off Auto-follow edits in the Notebook Assistant panel.

Customization & settings

General

Saving

Inline Data Explorer

Assistant

Ghost cell suggestions (experimental)