---
title: Deploy Mage AI with AI on Blossom
url: "/deploy/mage-ai/"
canonical_url: https://blossom88.com/deploy/mage-ai/
markdown_url: https://blossom88.com/deploy/mage-ai.md
summary: Build a private Mage AI pipeline that turns a sample CSV into a SQLite table.
categories:
- deployment
- data
stack:
- Python
- pandas
- SQLite
---

# Deploy Mage AI with AI on Blossom

[Mage AI](https://github.com/mage-ai/mage-ai) is a workspace for building
and running data pipelines. Start with a CSV of workshop visits and turn
it into a table with one count per room.

## Ask Your Agent

> **Ask your AI agent:** Deploy Mage AI on Blossom and help me turn a sample CSV into a summary table.
>
> Follow this guide: https://blossom88.com/deploy/mage-ai/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## How It Runs

| Part | Role | Where |
|---|---|---|
| Mage AI | Run the workspace and pipelines | Persistent Service with Blossom Account access and Mage sign-in |
| Project files and SQLite | Keep the pipeline, input CSV, and exported table | Service Volume |

## Deploy Mage AI

Run one Mage Service with a Volume for the project and data. Keep it
behind Blossom Account access and enable Mage sign-in. Share it with
people you trust to run pipeline code.

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

Use Mage's [official image](https://github.com/mage-ai/mage-ai) on port
`6789`. Mount a Volume at `/home/src`. Run `mage start workshop_demo`
from there to create the sample project on the Volume. Use an HTTP
health check on `/`. Set `REQUIRE_USER_AUTHENTICATION=1` and give the
owner unique credentials using `DEFAULT_OWNER_EMAIL`,
`DEFAULT_OWNER_USERNAME`, and `DEFAULT_OWNER_PASSWORD` at runtime.

</details>

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

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

</details>

## Make a Three-Block Pipeline

Load a CSV with three workshop visits. Write a transformer that counts
visits by room and an exporter that saves the result to SQLite.

![Edit the three workshop pipeline blocks in Mage AI.](/deploy/assets/images/mage-ai/workshop-pipeline-blocks.webp)

> **Ask your AI agent:** Make a small Mage pipeline that counts three sample workshop visits by room.

> Follow this guide: https://blossom88.com/deploy/mage-ai/



## Run the Pipeline and Read the Table

Run the pipeline. Query `room_totals` in the exported SQLite file.
The garden should have two visits and the studio one.

> **Ask your AI agent:** Run my pipeline and show me the exported table.

> Follow this guide: https://blossom88.com/deploy/mage-ai/



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

    blossom shell --service service-100 -- mage run workshop_demo workshop_visits

</details>

## Reopen It After a Deploy

Replace the Mage Container. Open the project again and check that
the pipeline, input CSV, and exported table are still there.

![Find the saved workshop pipeline after replacing the Container.](/deploy/assets/images/mage-ai/workshop-pipeline-after-replacement.webp)


> **Ask your AI agent:** Replace the Mage Container and help me reopen the pipeline and its output.

> Follow this guide: https://blossom88.com/deploy/mage-ai/



## What You Get

- A private workspace for building pipelines
- A pipeline that loads, groups, and exports your data
- A SQLite table you can reopen after a deploy

Tested on Blossom: The project and its exported SQLite table were available after Container replacement.
