Skip to main content
Create and run notebooks in Python, R, or Julia, and work in them alongside agents. Qualia saves every notebook as a standard .ipynb file, so it also opens in JupyterLab, VS Code, or any other notebook tool. By default, a new agent works in a notebook. It edits the open notebook’s cells and runs them on the kernel, the process that executes the notebook’s code. For standalone scripts or long training runs, set Default agent execution mode to Script in Settings > Agents before you create the agent. See Execution mode.

Create a notebook

  1. Press Cmd/Ctrl+N, choose File > New File…, or click New file in the Files sidebar.
  2. Choose Notebook and name the file.
To open an existing notebook, click its .ipynb file in the Files sidebar. Notebooks open in tabs. Right-click a file in the sidebar to rename, duplicate, or delete it.

Work with files

To upload or download files, see File Explorer. If a file is too large for the editor, read it from notebook code or a terminal instead. In cloud compute, /project holds the shared workspace. Read inputs and save outputs there so that other notebooks and agents can use them, for example /project/data/input.csv.

Cell types

  • Code cells run Python, R, or Julia, with syntax highlighting, bracket matching, and auto-indentation.
  • Markdown cells hold formatted text and LaTeX math.
  • Raw cells hold unformatted text that passes through unchanged, for example for nbconvert.
For inline math in notebook Markdown, use $x^2$. Use $$x^2$$ if the same text must also render in chat and writeups. For a display equation, put $$ on its own line before and after it.

Add cells

  • Hover above or below a cell and click Code or Markdown.
  • In command mode, press A to insert a code cell above, or B to insert one below.
To change a cell’s type, use the cell’s Change cell type menu. In command mode, you can also press Y (code), M (Markdown), or R (raw).

Run cells

Markdown and raw cells render instead of running. To run, interrupt, or restart from the toolbar, see Kernel Toolbar.

Command mode shortcuts

Press Escape to leave the editor and enter command mode. Press Enter to go back to editing the cell. Qualia asks you to confirm before deleting a cell. Anyone else editing the notebook can still click Restore on it. Turn on the Python language server in Settings > Editor > Code intelligence to jump around code in cells and text files:

Outputs

Qualia renders all standard Jupyter outputs, such as text, pandas DataFrames, matplotlib and Plotly charts, images, ipywidgets, and tracebacks. A running cell keeps its output when you reload or reconnect. Qualia shortens long text output so that the notebook stays responsive. Click Show all to display the hidden lines; find in the notebook still searches them. If an output is extremely long, the cell notes how much it left out and names a log file with the full text, so you and the agent can still search all of it.

Select an image region

To send part of an image to chat, hold Cmd (macOS) or Ctrl (Windows and Linux) and drag across the image. Then click Attach selection. This works on plot outputs, Markdown images, and chat images. If a region is selected, use the expand button in the image’s top-right corner to open the image viewer.

Image viewer

To open the image viewer, focus an image preview and click it again, or focus it with Tab and press Enter or Space. Previews include plot outputs, images in Markdown cells and writeups, chat images, and knowledge figures. Image files from the Files sidebar open straight in the viewer. In the viewer you can:
  • Zoom and pan: use the toolbar, Cmd/Ctrl+scroll, or Cmd/Ctrl with +, −, or 0. Hold Cmd/Ctrl and drag to pan.
  • Select a region: drag across the image. Press Escape or click Clear to deselect.
  • Copy, download, or attach: right-click or use the toolbar. Images from a notebook attach to that notebook’s agent, and images from a chat return to that chat.

Plotly charts

Qualia-managed Python environments can display Plotly charts inline. If you use your own environment, install plotly and nbformat there first. To use a chart in a writeup or dashboard, ask the agent to capture it.

Set default plot style

Use Settings > Plotting to set the defaults every matplotlib plot starts from, such as resolution, figure size, font, line width, grid, color cycle, and colormap. Its export settings set the resolution and file format for plt.savefig() calls that don’t pass their own dpi or format. Code in a notebook still wins. For example, plt.figure(figsize=(10, 4)) or plt.rcParams["font.size"] = 14 overrides the setting. To make your own color cycle, click Create custom scheme next to Color cycle, name it, and add colors with the picker or as hex codes, such as #1f77b4. Matplotlib reads these defaults when a kernel first imports it. To apply new settings to a running notebook, restart its kernel from the kernel toolbar, then re-run the cells that draw plots.

Tag cells

Add tags to cells to mark what they are for, such as preprocessing or model-v2. Click the tag icon (Edit cell tags) in the cell’s toolbar, type a tag, and press Enter. To remove a tag, open the same menu and click it. Agents follow the descriptions of three built-in tags: For example, tag a cell that loads a fixed dataset IMMUTABLE so that the agent doesn’t rewrite it while it edits the cells below. To delete a custom tag’s definition, use Settings > Notebooks > Custom tags.

Save a notebook

Press Cmd/Ctrl+S to write the notebook to its .ipynb file. Everyone editing the notebook sees unsaved edits, and the toolbar shows whether the notebook has unsaved changes. If the file changes on disk after you open it, for example through git checkout, a banner asks what to do. Choose Keep mine to write your edits over the file, or Load disk version to replace your edits with the file.

Edit a shared notebook together

In a shared cloud workspace, Owners and Editors edit the same notebook at the same time, and so do agents. Each cell shows who else is editing it. Viewers and Commenters see You have view access in the toolbar, with editing, running, and kernel controls turned off. See Shared workspaces for roles.

Find in a notebook

Press Cmd/Ctrl+F to search the current notebook. See Search for options such as regular expressions and replace.

Export and import a workspace

You can save a whole workspace as one .qualia archive: its chats, tasks, knowledge, notebooks, and images. To export, choose File > Workspace Transfer > Export Workspace…, or Export .qualia from the workspace menu in the Files sidebar. In Qualia Cloud, choose File > Export Workspace…. On the desktop app with a local workspace, turn on Include workspace files to add data, scripts, and modules so the imported workspace can run. This option leaves out caches, virtual environments, version-control folders, and credential folders such as .ssh and .aws, but it keeps .env files. Don’t share an archive with workspace files carelessly, because it carries everything else in the folder. To import, choose Import Workspace… or Import .qualia. Imports add to the active workspace without changing its settings, and never overwrite a file that already exists. If an archive comes from a newer version of Qualia, update the app and try again.

Export a notebook

To get a copy that runs without Qualia, with captured values written in place of qualia.get() calls, see Export a notebook that runs without Qualia.