---
title: Deploy marimo with AI on Blossom
url: "/deploy/marimo/"
canonical_url: https://blossom88.com/deploy/marimo/
markdown_url: https://blossom88.com/deploy/marimo.md
summary: Run a private reactive Python notebook and keep its edits through a deploy.
categories:
- deployment
- development
stack:
- Python
- marimo
---

# Deploy marimo with AI on Blossom

[marimo](https://marimo.io/) is a Python notebook editor that reruns
dependent cells when inputs change. Try it with a workshop attendance
table and a slider that filters the rows.

## Ask Your Agent

> **Ask your AI agent:** Deploy marimo on Blossom and help me run a simple private notebook.
>
> Follow this guide: https://blossom88.com/deploy/marimo/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and choose a Blossom Cloud Location when you log in. You can also use [Blossom BYOC (bring your own cloud)](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#blossom-byoc).

## How It Runs

| Part | Role | Where |
|---|---|---|
| marimo editor | Run Python cells and serve the notebook and its controls | Persistent Service with Blossom Account access |
| Notebook files | Keep saved Python notebooks across Container updates | Service Volume |

## Deploy the Editor

Keep the workspace private. Add a Volume for the notebooks and give
the editor a token so trusted collaborators can sign in.

<details class="optional-reading" markdown="1">
<summary>Notes for your agent</summary>

Run the [marimo editor](https://docs.marimo.io/cli/#marimo-edit) headless
on port `8080` using the official image. Mount the notebook Volume at
`/app/data`. Use the image's application user and the `/health` endpoint.
For this sample notebook, set `runtime.auto_instantiate=true` so its
results render when it opens.

Write the editor token from a runtime secret to a private file. Pass
that file to `--token-password-file` and keep token values out of logs.
Use Account access for the Blossom endpoint.

</details>

<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom app_plan:preview --data marimo-plan.yml
    blossom service:create --data marimo-service.yml
    blossom environment:deploy --id environment-100 --follow

</details>

## Run a Sample Notebook

Create a notebook with visits to three workshop rooms. Open it in
the browser, sign in, and use a slider to set the minimum count.

![Filter the workshop attendance table from a marimo notebook.](/deploy/assets/images/marimo/workshop-visit-filter.webp)

> **Ask your AI agent:** Make a small workshop attendance notebook with a filter for the minimum number of visits.

> Follow this guide: https://blossom88.com/deploy/marimo/



## Save an Edit

Change the notebook heading and save the Python file. Keep the
file on the Service Volume so it is available to the next Container.

> **Ask your AI agent:** Rename the notebook heading to Workshop attendance report and save it.

> Follow this guide: https://blossom88.com/deploy/marimo/



## Reopen It After a Deploy

Replace the Container and open the notebook again. Check the changed
heading, then move the slider to see whether the table still updates.

![Reopen the saved workshop report after Container replacement.](/deploy/assets/images/marimo/workshop-notebook-after-replacement.webp)


> **Ask your AI agent:** Replace the marimo Container and help me reopen and run the saved notebook.

> Follow this guide: https://blossom88.com/deploy/marimo/



## What You Get

- A private Python notebook workspace
- A notebook with a filter that updates its output
- A saved edit you can reopen after a deploy

Tested on Blossom: The saved heading and notebook filter worked after Container replacement.
