Skip to main content

Flow CLI & SDK

Python → Petaflops with one CLI. Flow procures GPUs through Mithril, spins up InfiniBand-connected instances, and runs your workloads with a compact CLI and SDK.

PyPI - Version Public repo

Background

There's a paradox in GPU infrastructure today: Massive GPU capacity sits idle, even as AI teams wait in queues—starved for compute. Mithril, the AI-compute omnicloud, dynamically allocates GPU resources from a global pool (spanning Mithril's first-party resources and 3rd-party partner cloud capacity) using efficient two-sided auctions, maximizing surplus and reducing costs. Mithril seamlessly supports both reserved-in-advance and just-in-time workloads—maximizing utilization, ensuring availability, and significantly reducing costs.

Infrastructure mode

flow instance create -i 8xh100 -N 20
╭─ Instance Configuration ────────────────────────────────╮
│                                                         │
│  Name           multinode-run                           │
│  Command        sleep infinity                          │
│  Image          nvidia/cuda:12.1.0-runtime-ubuntu22.04  │
│  Working Dir    /workspace                              │
│  Instance Type  8xh100                                  │
│  Num Instances  20                                      │
│  Max price      $12.29/hr                               │
│                                                         │
╰─────────────────────────────────────────────────────────╯

flow instance list
╭───────────────────────────────  Flow ────────────────────────────────╮
│                                                                       │
│     #     Status     Instance               GPU       Owner     Age   │     1    running    multinode-run        8×H100·80G  alex       0m   │
│     2    running    interactive-77c31e   A100·80G    noam       5h   │
│     3    cancelled  dev-a100-test        A100·80G    alex       1d   │
│                                                                       │
╰───────────────────────────────────────────────────────────────────────╯

Research mode (in early preview)

flow submit "python train.py" # -i 8xh100 Bidding for best‑price GPU node (8×H100) with $12.29/h100-hr limit_price…
✓ Launching on NVIDIA H100-80GB for $1/h100-hr

Quick Start

# Optional: install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install via uv or pipx (or see installer scripts in scripts/)
uv tool install flow-compute
# or: pipx install flow-compute

flow setup  # Requires a Mithril account, API key, and project access
flow dev   # Interactive GPU development after initial VM setup

Optional assistant integrations:

flow claude  # Install Flow skills for Claude Code
flow codex   # Install Flow skills for Codex

Why choose Flow

Status quo GPU provisioning involves quotas, complex setups, and queue delays, even as GPUs sit idle elsewhere or in recovery processes. Flow addresses this:

Dynamic Market Allocation – Efficient two-sided auctions ensure you pay the lowest market-driven prices rather than inflated rates.

Simplified Batch Execution – An intuitive interface designed for cost-effective, high-performance batch workloads without complex infrastructure management.

Provision from 1 to thousands of GPUs for long-term reservations, short-term "micro-reservations" (minutes to weeks), or spot/on-demand needs—all interconnected via InfiniBand. High-performance persistent storage and built-in Docker support further streamline workloads, ensuring rapid data access and reproducibility.


Why Flow + Mithril?

Pillar Outcome How
Iteration Velocity and Ease Fresh containers quickly once capacity is allocated. flow dev for DevBox or flow submit to programmatically launch tasks
Best price-performance via market-based pricing Preemptible secure jobs for $1/h100-hr Blind two-sided second-price auction; client-side bid capping
Availability and Elasticity Self-serve access to spot and reserved capacity, subject to account access and market availability. Spot capacity plus overflow capacity from partner clouds
Abstraction and Simplification InfiniBand VMs, CUDA drivers, auto-managed healing buffer—all pre-arranged. Mithril virtualization and base images preconfigured + Mithril capacity management.

"The tremendous demand for AI compute and the large fraction of idle time makes sharing a perfect solution, and Mithril's innovative market is the right approach."Paul Milgrom, Nobel Laureate (Auction Theory and Mechanism Design)


Key Concepts to Get Started

Core Workflows

Infrastructure mode

  • flow instance create -i 8xh100 -N 20 → request a 20-node GPU cluster
  • flow volume create -s 10000 -i file → provision 10 TB of persistent, high-speed storage
  • flow ssh instance -- nvidia-smi → run across all nodes in parallel

In research preview

Research mode

  • flow dev → interactive development on allocated GPU instances.
  • flow submit → reproducible batch jobs.
  • Python API → easy pipelines and orchestration.

Examples

# Launch a batch job on discounted H100s
flow submit "python train.py" -i 8xh100

# Frictionlessly leverage an existing SLURM script
flow submit job.slurm

# Serverless‑style decorator
@app.function(gpu="a100")

Ideal Use Cases

  • Rapid Experimentation – Quick iterations for research sprints.
  • Instant Elasticity – Scale rapidly from one to thousands of GPUs.
  • Collaborative Research – Shared dev environments with per-task cost controls.

Flow is not yet ideal for: always‑on ≤100 ms inference, strictly on‑prem regulated data, or models that fit on laptop or consumer-grade GPUs.


Architecture (30‑s view)

Your intent ⟶ Flow Execution Layer ⟶ Global GPU Fabric

Flow SDK abstracts complex GPU auctions, InfiniBand clusters, and multi-cloud management into a single seamless and unified developer interface.


Installation

Requirements

  • Python 3.10 or later
  • Recommended: use uv to auto-manage a compatible Python when installing the CLI
  • Linux or macOS for native CLI workflows. On Windows, use WSL2; native Windows is not fully validated.

1) Install uv — optional but recommended

Installation guide: docs.astral.sh/uv/getting-started/installation

  • macOS/Linux:
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  • Windows: use WSL2 for the Flow CLI, then run the macOS/Linux command inside WSL.
    curl -LsSf https://astral.sh/uv/install.sh | sh
    

2) Install Flow

  • Global CLI (uv):

    uv tool install flow-compute
    flow setup
    
  • Global CLI (pipx):

    pipx install flow-compute
    flow setup
    

Under the Hood (Advanced)

  • Bid Caps – Protect budgets automatically.
  • Self-Healing – Spot nodes dynamically migrate tasks.
  • Docker/Conda – Pre-built images or dynamic install.
  • Multi-cloud Ready – Mithril (with Oracle, Nebius integrations internal to Mithril), and more coming
  • SLURM Compatible – Run #SBATCH scripts directly.

Python SDK (Research Preview)

Advanced Task Configuration

# Distributed training example (32 GPUs, Mithril groups for InfiniBand connectivity by default)
task = flow.run(
    "torchrun --nproc_per_node=8 train.py",
    instance_type="8xa100",
    num_instances=4,  # Total of 32 GPUs (4 nodes × 8 GPUs each)
    env={"NCCL_DEBUG": "INFO"}
)

# Mount S3 data + persistent volumes
task = flow.run(
    "python analyze.py",
    gpu="a100",
    mounts={
        "/datasets": "s3://ml-bucket/imagenet",  # S3 via s3fs
        "/models": "volume://pretrained-models"   # Persistent storage
    }
)

Key Features Summary

  • Distributed Training – Multi-node InfiniBand clusters auto-configured
  • Code Upload – Automatic with .flowignore (or .gitignore fallback)
  • Live Debugging – SSH into running instances (flow ssh)
  • Cost Protection – Built-in max_price_per_hour safeguards
  • Jupyter Integration – Connect notebooks to GPU instances

Documentation: https://docs.mithril.ai/cli-and-sdk/quickstart

Further Reading

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flow_compute-3.24.0.tar.gz (1.7 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

flow_compute-3.24.0-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

flow_compute-3.24.0-cp313-cp313-manylinux_2_28_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

flow_compute-3.24.0-cp313-cp313-manylinux_2_28_aarch64.whl (5.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

flow_compute-3.24.0-cp313-cp313-macosx_11_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

flow_compute-3.24.0-cp313-cp313-macosx_10_12_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

flow_compute-3.24.0-cp312-cp312-manylinux_2_28_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

flow_compute-3.24.0-cp312-cp312-manylinux_2_28_aarch64.whl (5.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

flow_compute-3.24.0-cp312-cp312-macosx_11_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

flow_compute-3.24.0-cp312-cp312-macosx_10_12_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

flow_compute-3.24.0-cp311-cp311-manylinux_2_28_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

flow_compute-3.24.0-cp311-cp311-manylinux_2_28_aarch64.whl (5.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

flow_compute-3.24.0-cp311-cp311-macosx_11_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

flow_compute-3.24.0-cp311-cp311-macosx_10_12_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

flow_compute-3.24.0-cp310-cp310-manylinux_2_28_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

flow_compute-3.24.0-cp310-cp310-manylinux_2_28_aarch64.whl (5.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

flow_compute-3.24.0-cp310-cp310-macosx_11_0_arm64.whl (4.8 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

flow_compute-3.24.0-cp310-cp310-macosx_10_12_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file flow_compute-3.24.0.tar.gz.

File metadata

  • Download URL: flow_compute-3.24.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for flow_compute-3.24.0.tar.gz
Algorithm Hash digest
SHA256 14e6fca470800c0934fd1979622c9c36e6eab12c5c7401cd7756fb5e36591598
MD5 311f8d7b4e912aaced871b18ed0433a3
BLAKE2b-256 d260a8a5b216994c928ecfbfe12829f54d65bfeaade879ec0017025da8715d50

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df9c4f9a556ab044eef98dc0f45153bd199d27175556a45efe29d8f9667833ef
MD5 4f54cb8ad56bcde311c9b165b024d2a6
BLAKE2b-256 924f1a187450da01424c22e53287c50e6600c95bd014cd865e73495d3871f8be

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7198587ca447217ed8662e74b5ccfc0795e2fef02905a58442eb016537b76a35
MD5 edf3b5e10871d982fd8a6b366f904c2f
BLAKE2b-256 4cb6ee532a234416e1573b92c98988469eba3c31255023cbd890f24619cd6255

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e009e9a82cd91a525a5d744452986c86f0e593447ef5898dbace8c3764a6673f
MD5 cba126d948d522b9e018a27d1bd35269
BLAKE2b-256 472e36c6d929b61ff475608d40231fcc21bdf0805fd9eab23bdc72e6122b7907

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9ab33651e90d7dd15d1b9006eed8c298446ceaeeae568cf45ccfa5849e3c8dd2
MD5 ae621c5f6b821ebab81a0cf2b1549601
BLAKE2b-256 8ca734440a7a333f6c6eced55a27edbca7061cb644f4f0b502f6804c7fb9d437

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7f0f5419329ed9136d7ed7268dd6e0bec41062d3fcd82d119150b62b4574b347
MD5 61cbbf40c15058d8c3b75542db574f51
BLAKE2b-256 fb0c8cdbb4f80606bd61842372ebdd3187def35e551db78823e583684ab8ed84

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 59d375f48b2a0cd32213494f1d57eacc030915c9e89921ef1cf79d5d29c00694
MD5 10c888a14106eef7a6690319a1de5b77
BLAKE2b-256 9435f1266aee5b9b22c547c2e0b92e16c98075f51149495bdc721bdff53d6b44

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6617e5b64ae241fb29bda744c9745855fe0c4d751417760e89b79e41be8f96fa
MD5 76b773c275f3cad597d0ab80e0521582
BLAKE2b-256 153285d486d09a7ff20e4f9b0fbe22bb40e114c3d123d2ede8cbd146e9e0b81c

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3c35ace6131e13f3292d4dd1b5190614ac9efadffe9381447951c207903d9c13
MD5 6950bc312ece73f55d9af01b288c3895
BLAKE2b-256 0e5224cc9bdcc8d1b6bd30a8d258a56ce6e6e1d6b8261d0d8009beaae3d7c2c9

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a0c433173ad8e45505ef42e6a811decfbd50e0674e2652810f65bb67495ba2ff
MD5 2955bf3d79c7e0c6a557495a9728d2e9
BLAKE2b-256 b37c3d4e6589c154af9d545fb879394075ec9674ff29d37eca3156e76e46fe31

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9e69650da6b86419db55db31f19f55f889fc99e36a65c78298f1a3cebdf359a1
MD5 50ef7888929a89cc88b16e85b37f28fe
BLAKE2b-256 b8cee75bb44e891861f2bf3fb181ee586c3d902e18948979b5de14e798277933

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e338a2dc1af83be490e6210284bb0a80b475c3af1c06668e26ae9e355b20f85d
MD5 8ebc11e0b1790b411ee9bc1abf6e7370
BLAKE2b-256 3ac5094dcad584b1b48761586cc7ae00e94e92ce6070e1f4fa5cb88c329ffc1a

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dfe9bb72df1883fde078b4e6a8b044a4347787d22b3b3d43975ad10ad4915182
MD5 551503d720e4b5d79b01f4a23b16f2ff
BLAKE2b-256 cbc31b61b81cc7a3e22ad9c67959613d456c1b21a3ffc77ea68cb5c155815d51

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c3ac0173f7a9f33dcb320962e36634f338133048baba660002c370ab05f73c77
MD5 c796cfa824fe78b8ac9dab5db0a6fcda
BLAKE2b-256 b37aa41ef41d5744d6339854f80e62ac642bc31c80358fda544352836f01cb2e

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f33e2e95fe327d163f3463664a3b77685404652e1b8e12838d1727a1f4717861
MD5 ab519bf2000500d1cfa925dfd3367201
BLAKE2b-256 789298e6cb5ee1ef14c32d8f97d9bc36f26f582bf996733299d572d40d14411a

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 02bf70fd685bf58cac438f52245664fa33b5614adb170f097569635eeba007fa
MD5 1f24237f94ffc5774f57826ae2fd6a73
BLAKE2b-256 6e4917d2cf4701eea228675697641b27220c68b159a085431db6b9c95bfe2fcf

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e01c06127dc53907ac8f44ae01db07bfa45734fec10b551fdd98a9c8b4c28cb5
MD5 0d7c2704fc748457c0169293d499d99f
BLAKE2b-256 cae6d780ff235b3a4a71115ecc1332b85c42ca363fe4ece79c6db52239276b85

See more details on using hashes here.

File details

Details for the file flow_compute-3.24.0-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for flow_compute-3.24.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9aae536c655a7aa508cbd0c01c545063392dc42d9541bc867aaa8319dd64e2bc
MD5 bea0a273d2ad8efc63b338dbe815920e
BLAKE2b-256 22a88a5abc212af0bcde67d660fb664a3ec7f91abc6b9fa30b637f10532a023c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

3.24.0 This release

18 files

3.23.1

18 files

3.23.0

18 files

3.22.1

18 files

3.22.0

18 files

3.21.0

18 files

3.20.10

18 files

3.20.9

18 files

3.20.8

18 files

3.20.7

18 files

3.20.6

4 files

3.20.5

4 files

3.20.4

5 files

3.20.3

5 files

3.20.2

5 files

3.20.1

5 files

3.20.0

5 files

3.19.0

5 files

3.18.0

5 files

3.17.1

5 files

3.17.0

5 files

3.16.2

5 files

3.16.1

5 files

3.16.0

5 files

3.15.1

5 files

3.15.0

5 files

3.14.0

5 files

3.13.2

3 files

3.13.1

5 files

3.13.0

5 files

3.12.2

5 files

3.12.1

5 files

3.12.0

5 files

3.11.1

5 files

3.11.0

5 files

3.10.1

5 files

3.10.0

5 files

3.9.1

5 files

3.9.0

5 files

3.8.4

5 files

3.8.3

5 files

3.8.2

5 files

3.8.1

5 files

3.8.0

5 files

3.7.0

5 files

3.6.2

5 files

3.6.1

5 files

3.6.0

5 files

3.5.6

5 files

3.5.5

5 files

3.5.4

5 files

3.5.3

5 files

3.5.2

5 files

3.5.1

5 files

3.5.0

5 files

3.4.1

5 files

3.4.0

1 file

3.3.0

1 file

3.2.0

5 files

3.1.0

5 files

3.0.0

5 files

2.1.0

2 files

2.0.0

2 files

0.3.9

1 file

0.3.8

1 file

0.3.7

1 file

0.3.6

1 file

0.3.5

1 file

0.3.4

1 file

0.3.3

2 files

0.3.2

2 files

0.3.1

1 file

0.3.1a1

2 files

0.3.0

1 file

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.2.0

1 file

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.28

2 files

0.0.27

1 file

0.0.26

2 files

0.0.25

2 files

0.0.24

2 files

0.0.23

2 files

0.0.22

2 files

0.0.21

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page