> ## Documentation Index
> Fetch the complete documentation index at: https://datagen.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 5. Ship an app

> Build a marimo dashboard notebook and share it with your team

The agent answers questions and sends a weekly report. Some people want to explore the numbers themselves. In this last part you build a **marimo** dashboard -- a reactive Python notebook -- and share it with your workspace.

## Before you start

* You completed [4. Build an agent](/tutorial/04-build-agent).
* **Apps** appears on your navigation rail. Apps is enabled per account; if it is missing, contact [support@datagen.dev](mailto:support@datagen.dev).
* The data for the dashboard is a CSV file in **Files**.&#x20;

<Note>
  A running app reads the workspace files you select on its **Sources** tab, copied into the app at startup, and credentials from its vault. A notebook has no builder chat, so it does not connect knowledge bases. See [Build apps](/apps/build) for everything a custom app can use.
</Note>

## 1. Create the notebook

<Steps>
  <Step title="Open Notebooks">
    Click **Apps** on the left navigation rail, then the **Notebooks** card.
  </Step>

  <Step title="Fill in the dialog">
    Click **New notebook** and fill in:

    | Field | Value |
    | - | - |
    | Title | A display name. |
    | Name | Lowercase letters, digits, dashes or underscores. It names the notebook file and cannot be changed later. |
    | Description | Optional. What the dashboard shows. |
    | Sandbox environment | Keep **Workspace default**. This field appears only when Sandbox Environments is enabled. |
  </Step>

  <Step title="Create">
    Click **Create**. The notebook starts and opens in the marimo editor.
  </Step>
</Steps>

## 2. Give the notebook its data

1. In the notebook view, click **App details**, then open the **Sources** tab.
2. Click the edit (pencil) icon, select the CSV file, and save the selection.
3. Click **Rebuild sources**, or stop and reopen the notebook, so the running notebook gets a local copy.

The notebook reads a read-only copy of each selected file under the directory in the `DATAGEN_SOURCES_DIR` environment variable, at the file's full storage key. A file on the **Workspace** tab of Files has a key that starts with `.raw/`.

## 3. Build the dashboard

Click **Open app** to return to the notebook, and add the cells below. marimo reruns dependent cells automatically, so the dashboard updates as soon as someone changes a control.

```python Load the data theme={null}
import os

import marimo as mo
import pandas as pd

SOURCES = os.environ["DATAGEN_SOURCES_DIR"]
df = pd.read_csv(f"{SOURCES}/.raw/<folder>/<file>.csv")
```

```python Filter theme={null}
segment = mo.ui.dropdown(
    options=sorted(df["<segment_column>"].dropna().unique().tolist()),
    label="Segment",
)
segment
```

```python Key numbers theme={null}
view = df if segment.value is None else df[df["<segment_column>"] == segment.value]

mo.hstack(
    [
        mo.stat(value=f"{len(view):,}", label="Rows"),
        mo.stat(value=f"{view['<metric_column>'].sum():,.0f}", label="<metric name>"),
    ]
)
```

```python Detail table theme={null}
mo.ui.table(view)
```

<Tip>
  If the notebook needs a Python package that is not installed, add it to a [Sandbox Environment](/foundation/sandbox-environments) with a built notebook image and choose that environment for the notebook.
</Tip>

## 4. Share it

The notebook is already shared: every notebook lives in the workspace's shared notebooks folder, and workspace members open it from **Apps** > **Notebooks** with **Open**.

* Each member who opens the notebook gets their own sandbox. The notebook's **Instances** tab lists who has one running.
* Workspace admins can limit who sees the notebook on its **Access** tab, when that tab is available in your workspace.
* There is no public link. Only signed-in workspace members can open the notebook.

## What you built

Across the five parts you built a complete internal AI workflow on DataGen AI Cloud:

| Part | Building block | Result |
| - | - | - |
| 1 | Data | A connection and a published analytic model |
| 2 | Files | A shared folder of reference documents |
| 3 | Context | A versioned knowledge base built from the documents |
| 4 | Agents | An agent that answers questions and posts a weekly report to Slack |
| 5 | Apps | A marimo dashboard shared with the workspace |

Learn more in [Apps overview](/apps/overview), [Build apps](/apps/build) and [Publish and share](/apps/publish-and-share).

<CardGroup cols={2}>
  <Card title="Previous: Build an agent" icon="arrow-left" href="/tutorial/04-build-agent">
    Build the agent and schedule its weekly report.
  </Card>

  <Card title="Next: Apps overview" icon="arrow-right" href="/apps/overview">
    Notebooks and custom apps, and when to use each.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.