# Notebooks

> Analyze data in interactive Python notebooks alongside your chat in Kilo Desktop.

- 网址：https://funcoding.ai/agents/kilo-code/desktop/features/notebooks/
- 来源：Kilo Code 官方文档原文（英文），MIT 许可，同步于 2026-10-11
- 官方原文：https://kilo.ai/docs/desktop/features/notebooks

---
Open interactive Python notebooks in a tab next to your chat, so you can explore and visualize data without leaving the conversation. A notebook is a shared document you and the agent build together: you edit and run cells directly, while the agent reads, writes, and runs cells alongside you as you talk through the analysis. Notebooks run on a dedicated notebook runtime.

![A Python notebook open beside a chat in Kilo Desktop](https://funcoding.ai/official-assets/kilo-code/packages/kilo-docs/public/img/desktop/notebooks-with-chat.webp)

## Open a notebook

A notebook opens as its own tab beside the chat. There are a few ways to get there:

- **Ask the agent** to list the files in your workspace, then select an `.ipynb` file in its reply to open it.
- **From the [Files](https://funcoding.ai/agents/kilo-code/desktop/features/files/) tab**, search or browse the workspace and select an `.ipynb` file.
- **Ask the agent to open it** by name — the agent can open and list notebooks for you, so the one you're discussing stays in view. You can also create a new notebook by asking the agent.

## Work with cells

The toolbar at the top of the notebook has controls to  add a code cell,  add a Markdown cell,  run cells,  restart, restart and run all cells, and  interrupt a running cell. Run a cell to see its output inline, and view the status (such as **Idle**) on the right of the toolbar.

![The notebook toolbar](https://funcoding.ai/official-assets/kilo-code/packages/kilo-docs/public/img/desktop/notebooks-toolbar-controls.webp)

Each individual cell includes controls to  run it, switch it between  code and  Markdown,  hide its input or output, and  delete it.

## Edit with the agent

Work on notebooks together with the agent. Ask it to make a change — fix a typo, add analysis, rework a chart — and it reads the notebook, edits or adds cells, and saves. When the notebook is open beside the chat, the results appear in its tab, and a dot marks each cell the agent changes so you can see at a glance what it edited. The notebook doesn't need to be open, though — the agent can edit any notebook in your workspace.

## Environment and packages

Each notebook uses a Python environment. Select the kernel button in the toolbar to see the details of that environment. New notebooks can get a shared `environment.yml` in their workspace; toggle this under [Settings → Notebooks](https://funcoding.ai/agents/kilo-code/desktop/settings/general/#notebooks).

The agent can work with [conda environments](https://funcoding.ai/agents/kilo-code/desktop/features/environments/) too — ask it to find an appropriate conda environment for this notebook and point the notebook at it, and it will. A helpful pattern is to have the agent write an `environment.yml` into the workspace: then every notebook there, existing or new, picks up that environment automatically.

## Runtime status

The notebook runtime starts on demand. While it's starting you'll see a brief status; if it can't be reached, the tab shows a Retry button.
