Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

docs: emphasize generate with ai (#5289)

Akshay Agrawale70fd8366410
diff --git a/README.md b/README.md
index 52c75a84f3..50f480952f 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@
**marimo** is a reactive Python notebook: run a cell or interact with a UI
element, and marimo automatically runs dependent cells (or <a href="#expensive-notebooks">marks them as stale</a>), keeping code and outputs
-consistent. marimo notebooks are stored as pure Python, executable as scripts,
+consistent. marimo notebooks are stored as pure Python (with first-class SQL support), executable as scripts,
and deployable as apps.
**Highlights**.
@@ -43,12 +43,13 @@ and deployable as apps.
- 🖐️ **interactive:** [bind sliders, tables, plots, and more](https://docs.marimo.io/guides/interactivity.html) to Python — no callbacks required
- 🐍 **git-friendly:** stored as `.py` files
- 🛢️ **designed for data**: query dataframes, databases, warehouses, or lakehouses [with SQL](https://docs.marimo.io/guides/working_with_data/sql.html), filter and search [dataframes](https://docs.marimo.io/guides/working_with_data/dataframes.html)
+- 🤖 **AI-native**: [generate cells with AI](https://docs.marimo.io/guides/generate_with_ai/) tailored for data work
- 🔬 **reproducible:** [no hidden state](https://docs.marimo.io/guides/reactivity.html#no-hidden-state), deterministic execution, [built-in package management](https://docs.marimo.io/guides/package_management/)
- 🏃 **executable:** [execute as a Python script](https://docs.marimo.io/guides/scripts.html), parameterized by CLI args
- 🛜 **shareable**: [deploy as an interactive web app](https://docs.marimo.io/guides/apps.html) or [slides](https://docs.marimo.io/guides/apps.html#slides-layout), [run in the browser via WASM](https://docs.marimo.io/guides/wasm.html)
- 🧩 **reusable:** [import functions and classes](https://docs.marimo.io/guides/reusing_functions/) from one notebook to another
- 🧪 **testable:** [run pytest](https://docs.marimo.io/guides/testing/) on notebooks
-- ⌨️ **a modern editor**: [GitHub Copilot](https://docs.marimo.io/guides/editor_features/ai_completion.html#github-copilot), [AI assistants](https://docs.marimo.io/guides/editor_features/ai_completion.html#using-ollama), vim keybindings, variable explorer, and [more](https://docs.marimo.io/guides/editor_features/index.html)
+- ⌨️ **a modern editor**: [GitHub Copilot](https://docs.marimo.io/guides/editor_features/ai_completion.html#github-copilot), [AI assistants](https://docs.marimo.io/guides/editor_features/ai_completion.html), vim keybindings, variable explorer, and [more](https://docs.marimo.io/guides/editor_features/index.html)
```python
pip install marimo && marimo tutorial intro
@@ -94,22 +95,25 @@ millions of rows blazingly fast, no code required.
<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-df.gif" width="700px" />
-**Performant runtime.** marimo runs only those cells that need to be run by
-statically analyzing your code.
+**Generate cells with data-aware AI.** [Generate code with an AI
+assistant](https://docs.marimo.io/guides/editor_features/ai_completion/) that is highly
+specialized for working with data, with context about your variables in memory;
+[zero-shot entire notebooks](https://docs.marimo.io/guides/generate_with_ai/text_to_notebook/).
+Customize the system prompt, bring your own API keys, or use local models.
-**Dynamic markdown and SQL.** Use markdown to tell dynamic stories that depend on
-Python data. Or build [SQL](https://docs.marimo.io/guides/working_with_data/sql.html) queries
-that depend on Python values and execute them against dataframes, databases,
+<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/docs-generate-with-ai.gif" width="700px" />
+
+**Query data with SQL.** Build [SQL](https://docs.marimo.io/guides/working_with_data/sql.html) queries
+that depend on Python values and execute them against dataframes, databases, lakehouses,
CSVs, Google Sheets, or anything else using our built-in SQL engine, which
returns the result as a Python dataframe.
<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-sql-cell.png" width="700px" />
-Your notebooks are still pure Python, even if they use markdown or SQL.
+Your notebooks are still pure Python, even if they use SQL.
-**Deterministic execution order.** Notebooks are executed in a deterministic
-order, based on variable references instead of cells' positions on the page.
-Organize your notebooks to best fit the stories you'd like to tell.
+**Dynamic markdown.** Use markdown parametrized by Python variables to tell
+dynamic stories that depend on Python data.
**Built-in package management.** marimo has built-in support for all major
package managers, letting you [install packages on import](https://docs.marimo.io/guides/editor_features/package_management.html). marimo can even
@@ -118,6 +122,13 @@ requirements](https://docs.marimo.io/guides/package_management/inlining_dependen
in notebook files, and auto install them in
isolated venv sandboxes.
+**Deterministic execution order.** Notebooks are executed in a deterministic
+order, based on variable references instead of cells' positions on the page.
+Organize your notebooks to best fit the stories you'd like to tell.
+
+**Performant runtime.** marimo runs only those cells that need to be run by
+statically analyzing your code.
+
**Batteries-included.** marimo comes with GitHub Copilot, AI assistants, Ruff
code formatting, HTML export, fast code completion, a [VS Code
extension](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo),
diff --git a/docs/_static/readme-generate-with-ai.gif b/docs/_static/readme-generate-with-ai.gif
new file mode 100644
index 0000000000..6113a2158a
Binary files /dev/null and b/docs/_static/readme-generate-with-ai.gif differ
diff --git a/docs/_static/readme-generate-with-ai.mp4 b/docs/_static/readme-generate-with-ai.mp4
new file mode 100644
index 0000000000..f60cc2a99a
Binary files /dev/null and b/docs/_static/readme-generate-with-ai.mp4 differ
diff --git a/docs/guides/editor_features/ai_completion.md b/docs/guides/editor_features/ai_completion.md
index 89a54989e5..2171849f8c 100644
--- a/docs/guides/editor_features/ai_completion.md
+++ b/docs/guides/editor_features/ai_completion.md
@@ -8,6 +8,11 @@ marimo is an AI-native editor, with support for full-cell AI code generation:
as well as inline copilots (like GitHub Copilot).
+marimo's AI assistant is specialized for working with data: unlike traditional
+assistants that only have access to the text of your program, marimo's assistant
+has access to the values of variables in memory, letting it code against
+your dataframe and database schemas.
+
This guide provides an overview of these features and how to configure them.
!!! tip "Locating your marimo.toml config file"
@@ -17,6 +22,10 @@ This guide provides an overview of these features and how to configure them.
## Generating cells with AI
+<video autoplay muted loop playsinline width="100%" height="100%" align="center">
+ <source src="/_static/readme-generate-with-ai.mp4" type="video/mp4">
+</video>
+
marimo has built-in support for generating and refactoring code with LLMs.
marimo works with hosted AI providers, such as OpenAI, Anthropic, and Google,
as well as local models served via Ollama.
diff --git a/docs/index.md b/docs/index.md
index aa3950c6a9..fa72fbbf63 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -17,7 +17,8 @@ marimo is a reactive Python notebook: run a cell or interact with a UI
element, and marimo automatically runs dependent cells (or [marks them as
stale](guides/reactivity.md#configuring-how-marimo-runs-cells)), keeping code and outputs
consistent and preventing bugs before they happen. Every marimo notebook is
-stored as pure Python (Git-friendly), executable as a script, and deployable as an app.
+stored as pure Python (Git-friendly), executable as a script, and deployable as an app;
+while stored as Python, marimo notebooks also have native support for SQL.
/// admonition | Built from the ground up
type: tip
@@ -59,12 +60,13 @@ reproducibility, maintainability, composability, and shareability.
- 🖐️ **interactive:** [bind sliders, tables, plots, and more](guides/interactivity.md) to Python — no callbacks required
- 🐍 **git-friendly:** stored as `.py` files
- 🛢️ **designed for data**: query dataframes, databases, warehouses, and lakehouses [with SQL](guides/working_with_data/sql.md); filter and search [dataframes](guides/working_with_data/dataframes.md)
+- 🤖 **AI-native**: [generate cells with AI](https://docs.marimo.io/guides/generate_with_ai/) tailored for data work
- 🔬 **reproducible:** [no hidden state](guides/reactivity.md), deterministic execution, [built-in package management](guides/editor_features/package_management.md)
- 🏃 **executable:** [execute as a Python script](guides/scripts.md), parameterized by CLI args
- 🛜 **shareable**: [deploy as an interactive web app](guides/apps.md) or [slides](guides/apps.md#slides-layout), [run in the browser via WASM](guides/wasm.md)
- 🧩 **reusable:** [import functions and classes](guides/reusing_functions.md) from one notebook to another
- 🧪 **testable:** [run pytest](guides/testing/index.md) on notebooks
-- ⌨️ **a modern editor**: [GitHub Copilot](guides/editor_features/ai_completion.md#github-copilot), [AI assistants](guides/editor_features/ai_completion.md#using-ollama), vim keybindings, variable explorer, and [more](guides/editor_features/index.md)
+- ⌨️ **a modern editor**: [GitHub Copilot](guides/editor_features/ai_completion.md#github-copilot), [AI assistants](guides/editor_features/ai_completion.md), vim keybindings, variable explorer, and [more](guides/editor_features/index.md)
## A reactive programming environment
@@ -111,22 +113,27 @@ millions of rows blazingly fast, no code required.
<source src="/_static/docs-df.webm" type="video/webm">
</video>
-**Performant runtime.** marimo runs only those cells that need to be run by
-statically analyzing your code.
+**Generate cells with data-aware AI.** [Generate code with an AI
+assistant](https://docs.marimo.io/guides/editor_features/ai_completion/) that is highly
+specialized for working with data, with context about your variables in memory;
+[zero-shot entire notebooks](https://docs.marimo.io/guides/generate_with_ai/text_to_notebook/).
+Customize the system prompt, bring your own API keys, or use local models.
+
+<video autoplay muted loop playsinline width="700px" align="center">
+ <source src="/_static/readme-generate-with-ai.mp4" type="video/mp4">
+</video>
-**Dynamic markdown and SQL.** Use markdown to tell dynamic stories that depend on
-Python data. Or build [SQL](guides/working_with_data/sql.md) queries
-that depend on Python values and execute them against dataframes, databases,
+**Query data with SQL.** Build [SQL](https://docs.marimo.io/guides/working_with_data/sql.html) queries
+that depend on Python values and execute them against dataframes, databases, lakehouses,
CSVs, Google Sheets, or anything else using our built-in SQL engine, which
returns the result as a Python dataframe.
<img src="https://raw.githubusercontent.com/marimo-team/marimo/main/docs/_static/readme-sql-cell.png" width="700px" />
-Your notebooks are still pure Python, even if they use markdown or SQL.
+Your notebooks are still pure Python, even if they use SQL.
-**Deterministic execution order.** Notebooks are executed in a deterministic
-order, based on variable references instead of cells' positions on the page.
-Organize your notebooks to best fit the stories you'd like to tell.
+**Dynamic markdown.** Use markdown parametrized by Python variables to tell
+dynamic stories that depend on Python data.
**Built-in package management.** marimo has built-in support for all major
package managers, letting you [install packages on import](guides/editor_features/package_management.md). marimo can even
@@ -135,6 +142,13 @@ requirements](guides/package_management/inlining_dependencies.md)
in notebook files, and auto install them in
isolated venv sandboxes.
+**Deterministic execution order.** Notebooks are executed in a deterministic
+order, based on variable references instead of cells' positions on the page.
+Organize your notebooks to best fit the stories you'd like to tell.
+
+**Performant runtime.** marimo runs only those cells that need to be run by
+statically analyzing your code.
+
**Batteries-included.** marimo comes with GitHub Copilot, AI assistants, Ruff
code formatting, HTML export, fast code completion, a [VS Code
extension](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo),