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.23.1.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.23.1-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

flow_compute-3.23.1-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.23.1-cp313-cp313-manylinux_2_28_aarch64.whl (5.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.12+ x86-64

flow_compute-3.23.1-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.23.1-cp312-cp312-manylinux_2_28_aarch64.whl (5.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

flow_compute-3.23.1-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.23.1-cp311-cp311-manylinux_2_28_aarch64.whl (5.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.12+ x86-64

flow_compute-3.23.1-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.23.1-cp310-cp310-manylinux_2_28_aarch64.whl (5.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

flow_compute-3.23.1-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.23.1.tar.gz.

File metadata

  • Download URL: flow_compute-3.23.1.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.23.1.tar.gz
Algorithm Hash digest
SHA256 b21c4b5d1777455541abed2db57b210053421d0e5b916113c993c797dfa6fceb
MD5 8189018fe21c09e4c1d91e1b570fc498
BLAKE2b-256 29bb13c76d1268dad7f713e10ba6019a4753fbcf9b0c5843571afa0add9b6ac8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7991dbe2ff09a7a48e580e628fef48bd793a07039d337aac281907e596b3e406
MD5 58e076f594a6f0a94fba270be2184837
BLAKE2b-256 3d05f3729d41b659ac9aaf221e01d741e44decac84f3d4b9e4d00301fe6cdb42

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 91612abf5af56e162848c9478f7d9c33b00047a0073b266bb3f5fd9c521b7452
MD5 19ba0a34dfd89b45cec58ce4b67673ff
BLAKE2b-256 af1ec468c52f405ee0111410788c3be21550722f635d934b4e9076d2026e878b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7ce032ec80216b1284d2ac58022038318e87b4d82a042ae657c31ada5a218ffc
MD5 d4849ed26482e0db6602e2fdb3a9f588
BLAKE2b-256 dcf10f2256e7c98a1976bee3f60d559ac00baeffb5ad8c9867b3b762acb53df6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e3d5d9db97880a2fbf243d45db39a7036cf5c76efcfac2babfb323bbd3d3ec87
MD5 1600c98a0ae4560bc908f00d6dd02ac8
BLAKE2b-256 008213dda5eb4d606deb9b3f7b19600b45a32a5b09aab0002017ec90a53a7194

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 447b91d8e4e4c830348a60a5f2e6731e00c480a11d919d7cd8e1cd16a8b78dff
MD5 5ca421cd155bb4978dbc0747c69ce609
BLAKE2b-256 126e6bfb636ac0b07e5a596f3a702f3297a58b5b943bfdac2d6338ba89494036

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0c61f4149cf150aa960c2d544d2164caf29ac1ebd4b0870770e89825762788f4
MD5 47ff309feddd48b29175b8b291a0730d
BLAKE2b-256 7cc28901b58ccded704caec76c7456830ca18102129eaad149074f3a7be1de85

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 159c0b89e45dc82aa2d116ea76637e7838762190c58deb124aabd83abb4c1e5f
MD5 de2401e82238209c2c03438b7a71504d
BLAKE2b-256 e049905a9546f77b164dc7e9a32e998f289dafbd8664eb9e1de194d794a3cfa4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 89958fb8054400a796a599ed74be307ebc4a2a45a8b84b0e56b61e2f62ac5b03
MD5 d0043e59e6370243a858dd5866d36576
BLAKE2b-256 f32f3ab2f8a80ef958c6d9b3ae96442e4acae28a1a412039c9ae0b80f851dbbd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 05b95ba78750085c69e02009612f834d90e4ef35c0dcc2687e021a78dce8ff70
MD5 1b79af54f6c097e511a7b08d69329c71
BLAKE2b-256 7bf7dfbb520c3c4f5a68a0057438654dad23eb0c69331222ba64e9357776f329

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 56853b08540a2c1dd896505ba9a68bdcc75b5082cbccb405080dea8d72f0caf5
MD5 8f63d5c45f7b2800ef396984b8eb9aa6
BLAKE2b-256 81d6918cbcf89af050199a5c02ad0456031056a1f99d5a6458c84b6bc45fc262

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ef9039d4a72e6f00af803073f0e7022f8a7d274eaae31d37b3ef27d7bdabfce4
MD5 3ecddbb547ddc20ed367ea7038281cfc
BLAKE2b-256 140edb8de5c133eceafe5a7ad46d43b3956866e33d291fdda5fdeb45faf0db7e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c24d9ef953d9ae33afc140dae2374b5ccaa1a9b194b2a62f4917f3fd313abdb5
MD5 6dec99bc0b14b4bf718be32e6f39aff7
BLAKE2b-256 3fc5c0ceb1c95092b2838e9531e4f9483002e90ff1ddf467d3bcd0a0ab89ee5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8b0da64d01d6ffd92055111e8b916480037a02ea935500d32c989cff956ee5a9
MD5 697a504b025d27265b523c43119ed1d3
BLAKE2b-256 9715326b66f3f2dedce847c7fc4e65d18e2001c4079296235af3baa3d3bc8bbb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6d309d06fafc680138583354a3000de9ff938aee4ca19549432863b3ca4b1fb9
MD5 a42d5461085f0b2e3b214b75c1ae55c3
BLAKE2b-256 f228e9c3009b569cfaa18c2f00a02e592763538dd4a33bad743b0e6154013bed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8feff4199fb33bece04a0db507c4e85ae5bf476430e17dc1e693c5bf7a1f5ef9
MD5 e328a2d3818e852815c8d2629d71f8e2
BLAKE2b-256 b35f3ec8c9c5365ce10de8c16c84b9adfaf9e364d2c38548c323909ad8c73f39

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a9ac536793c7cacce01115c73886518df1edf18dfc97a4493d258411bcfb9ca0
MD5 905112510e67c1bc57db471708c793f1
BLAKE2b-256 7111dc588a3fd5e68bfb5e019e64910abcaaf74bec2728787b50b1b53d19189b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flow_compute-3.23.1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 43325f6dd939bd9cc69c0338588477c0ed220166b79d21058270fcd9acc904d4
MD5 06208b35309fd26cf68ac78694b6ebc7
BLAKE2b-256 64279584525ee63ae0add60127ab000df22ba3c5ca771249623a441a6b772d8c

See more details on using hashes here.

Release history Release notifications | RSS feed

3.24.0

18 files

This release

3.23.1 This release

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