# ZenML

> Write ML and AI pipelines once, run them on any infrastructure backend

- Category: Models & Inference / GPU & Compute Clouds
- Language: Python
- Licence: Apache-2.0
- Repository: https://github.com/zenml-io/zenml
- Website: https://zenml.io
- Canonical page: https://ai-tldr.dev/tools/zenml/

## In short

ZenML is an open-source MLOps framework for writing ML and AI workflows as pipelines that run on any infrastructure backend. You describe your logic once as Python pipelines and steps, and ZenML handles containerizing the code, tracking each run, and abstracting away the underlying infrastructure. It sits in the GPU & Compute Clouds category of the Models & Inference tools and is open-source, written in Python and licensed Apache-2.0.

## Overview

ZenML is an open-source MLOps framework for writing ML and AI workflows as pipelines that run on any infrastructure backend. You describe your logic once as Python pipelines and steps, and ZenML handles containerizing the code, tracking each run, and abstracting away the underlying infrastructure.

It is built for ML and AI engineers working on traditional ML use cases, LLM workflows, or agents in a company setting. The same pipeline can run locally during development and on a remote stack such as SageMaker, GCP Vertex, or an orchestrator of your choice in production, without rewriting the code.

Within the MLOps and compute orchestration space, ZenML acts as a portable layer over your existing tools. It integrates with systems like MLflow, LangGraph, and Langfuse, and tracks runs with metrics, logs, and metadata so you can iterate on experiments in development and production.

## What it does

- Write workflows as Python pipelines and steps that run on any infrastructure backend (called stacks)
- Automatically containerizes and tracks your code so runs are reproducible
- Tracks individual runs with metrics, logs, and metadata for observability
- Abstracts away infrastructure complexity so the same pipeline runs locally or in the cloud
- Integrates with existing tools like MLflow, LangGraph, Langfuse, SageMaker, and GCP Vertex
- Client-server architecture with an integrated web dashboard for inspecting pipelines and runs

## Getting started

You can install ZenML, initialize a repository, and connect to a server in about five minutes.

1. Install ZenML

   Install ZenML with server capabilities. Plain `pip install zenml` installs a slimmer client only.

```bash
pip install "zenml[server]"
```

2. Initialize your repository

   Run this inside your project to set up ZenML.

```bash
zenml init
```

3. Start or connect to a server

   Start a local server or connect to a remote one.

```bash
zenml login
```

4. Explore the quickstart example

   The repo ships an examples folder; the quickstart demonstrates core concepts like pipelines, steps, artifacts, snapshots, and deployments. See the docs for your first AI pipeline.

## When to use it

- Run the same ML training pipeline locally during development and on a remote cloud orchestrator in production without changing the code
- Operationalize LLM workflows and agentic loops with run tracking, logs, and metadata
- Standardize and reproduce ML experiments across a team using tracked, containerized pipelines
- Connect existing tools like MLflow, LangGraph, SageMaker, or GCP Vertex behind one portable pipeline layer
