Skip to main content
You need to firstly install mage_ai library by adding mage_ai to your requirements.txt file. Then you need to download the mage pipeline code into your Prefect directory. You can achieve it by using a git submodule in your Prefect directory. We provide two ways to run mage pipelines in Prefect.
  1. Run pipeline in as a task or ShellTask.
  2. Run pipeline as a Prefect Flow.

Run pipeline as a Prefect task

Example code

Run pipeline in a ShellTask

Example code

Run pipeline as a Prefect flow

Example code