For the complete documentation index, see llms.txt. This page is also available as Markdown.

Notebooks

Mix executable Python or R code with markdown in a single file, run it in your browser, and read the outputs inline.

Notebooks (.ipynb files) mix code and markdown cells in one document. Code runs entirely in your browser (Python via Pyodide, R via WebR), so there's no server or separate runtime to set up.

Create and structure a notebook

1

Create the file

Create a new file with a .ipynb extension, or add one from the Add files screen when creating a project.

2

Add cells

Add cells with Add cell, choosing Code or Markdown for each. Use markdown cells for headings and explanations, and code cells for executable steps.

3

Reorder and save

Drag cells to reorder them, then save. The cell order, types, and content persist when you reopen the file.

Run cells and read outputs

  • Run a single cell with its per-cell run control, or use Run cell & advance to run it and move to the next cell.

  • Use Run all cells to execute the whole notebook top-to-bottom.

  • Each cell shows its output underneath (text, a table, a plot, or an error) along with an execution count.

  • If a cell hangs or a variable seems out of sync, use Stop execution, Restart kernel, or Restart and run all from the notebook toolbar.

Useful shortcuts: Shift+Enter runs the current cell and advances; Mod+Enter runs it in place; Mod+Shift+Enter runs the whole notebook.

Things to know

  • Supported languages are Python and R.

  • The kernel needs a few seconds to start on first use. Running a cell while it's still starting queues the request rather than failing.

  • Restarting the kernel clears all variables. Rerun your setup cells afterwards.

  • Runtime state (variables, outputs) is saved between sessions, but a hard refresh or a storage error can reset it. Rerun your setup cells if that happens.

  • Code you run, including code the AI runs on your behalf, can write files directly into your project, like a .csv or image output. Unlike edits the AI proposes elsewhere, these writes aren't staged for review; they happen immediately, the same as if you'd run the code yourself. See Reviewing AI changes.

Troubleshooting

A cell won't run

Check whether another cell is still executing, or restart the kernel and try again.

Outputs look stale or out of order

Use Run all cells to rebuild state from the top.

Import or module errors

Check that any packages you rely on installed successfully. See the package manager in the notebook toolbar.

The notebook won't open

Confirm the file is valid .ipynb JSON. An empty or corrupted file reopens as a fresh starter notebook.

Next steps

Last updated

Was this helpful?