zenml 0.90.0


pip install zenml

  Latest version

Released: Oct 01, 2025


Meta
Author: ZenML GmbH
Requires Python: >=3.9, <3.13

Classifiers

Development Status
  • 4 - Beta

Intended Audience
  • Developers
  • Science/Research
  • System Administrators

License
  • OSI Approved :: Apache Software License

Programming Language
  • Python :: 3 :: Only
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12

Topic
  • System :: Distributed Computing
  • Software Development :: Libraries :: Python Modules

Typing
  • Typed

ZenML Header

Your unified toolkit for shipping everything from decision trees to complex AI agents, built on the MLOps principles you already trust.

PyPi PyPi PyPi Contributors License

FeaturesRoadmapReport BugSign up for ZenML ProBlogPodcast

🎉 For the latest release, see the release notes.


ZenML is a unified MLOps framework that extends the battle-tested principles you rely on for classical ML to the new world of AI agents. It's one platform to develop, evaluate, and deploy your entire AI portfolio - from decision trees to complex multi-agent systems. By providing a single framework for your entire AI stack, ZenML enables developers across your organization to collaborate more effectively without maintaining separate toolchains for models and agents.

🚨 The Problem: MLOps Works for Models, But What About AI?

No MLOps for modern AI

You're an ML engineer. You've perfected deploying scikit-learn models and wrangling PyTorch jobs. Your MLOps stack is dialed in. But now, you're being asked to build and ship AI agents, and suddenly your trusted toolkit is starting to crack.

  • The Adaptation Struggle: Your MLOps habits (rigorous testing, versioning, CI/CD) don’t map cleanly onto agent development. How do you version a prompt? How do you regression test a non-deterministic system? The tools that gave you confidence for models now create friction for agents.

  • The Divided Stack: To cope, teams are building a second, parallel stack just for LLM-based systems. Now you’re maintaining two sets of tools, two deployment pipelines, and two mental models. Your classical models live in one world, your agents in another. It's expensive, complex, and slows everyone down.

  • The Broken Feedback Loop: Getting an agent from your local environment to production is a slow, painful journey. By the time you get feedback on performance, cost, or quality, the requirements have already changed. Iteration is a guessing game, not a data-driven process.

💡 The Solution: One Framework for your Entire AI Stack

Stop maintaining two separate worlds. ZenML is a unified MLOps framework that extends the battle-tested principles you rely on for classical ML to the new world of AI agents. It’s one platform to develop, evaluate, and deploy your entire AI portfolio.

# Morning: Your sklearn pipeline is still versioned and reproducible.
train_and_deploy_classifier()

# Afternoon: Your new agent evaluation pipeline uses the same logic.
evaluate_and_deploy_agent()

# Same platform. Same principles. New possibilities.

With ZenML, you're not replacing your knowledge; you're extending it. Use the pipelines and practices you already know to version, test, deploy, and monitor everything from classic models to the most advanced agents.

💻 See It In Action: Multi-Agent Architecture Comparison

The Challenge: Your team built three different customer service agents. Which one should go to production? With ZenML, you can build a reproducible pipeline to test them on real data and make a data-driven decision, with full observability via Langgraph, LiteLLM & Langfuse.

https://github.com/user-attachments/assets/edeb314c-fe07-41ba-b083-cd9ab11db4a7

from zenml import pipeline, step
from zenml.types import HTMLString
import pandas as pd

@step
def load_real_conversations() -> pd.DataFrame:
    """Load customer service queries for testing."""
    return load_customer_queries()

@step
def train_intent_classifier(queries: pd.DataFrame):
    """Train a scikit-learn classifier alongside your agents."""
    return train_sklearn_pipeline(queries)

@step
def load_prompts() -> dict:
    """Load prompts as versioned ZenML artifacts."""
    return load_agent_prompts_from_files()

@step
def run_architecture_comparison(queries: pd.DataFrame, classifier, prompts: dict) -> tuple:
    """Test three different agent architectures on the same data."""
    architectures = {
        "single_agent": SingleAgentRAG(prompts),
        "multi_specialist": MultiSpecialistAgents(prompts), 
        "langgraph_workflow": LangGraphAgent(prompts)  # Real LangGraph implementation!
    }
    
    # ZenML automatically versions agent code, prompts, and configurations
    # LiteLLM provides unified access to 100+ LLM providers
    # Langgraph orchestrates a multi-agent graph
    # Langfuse tracks costs, performance, and traces for full observability
    results = test_all_architectures(queries, architectures)
    mermaid_diagram = generate_langgraph_visualization()
    
    return results, mermaid_diagram

@step
def evaluate_and_decide(queries: pd.DataFrame, results: dict) -> HTMLString:
    """Generate beautiful HTML report with winner selection."""
    return create_styled_comparison_report(results)

@pipeline
def compare_agent_architectures():
    """Data-driven agent architecture decisions with full MLOps tracking."""
    queries = load_real_conversations()
    prompts = load_prompts()  # Prompts as versioned artifacts
    classifier = train_intent_classifier(queries)
    results, viz = run_architecture_comparison(queries, classifier, prompts)
    report = evaluate_and_decide(queries, results)

if __name__ == "__main__":
    compare_agent_architectures()
    # 🎯 Rich visualizations automatically appear in ZenML dashboard

🚀 See the complete working example → Prefer a smaller end-to-end template? Check out the Minimal Agent Production example — a lightweight document analysis service with pipelines, evaluation, and a simple web UI.

The Result: A clear winner is selected based on data, not opinions. You have full lineage from the test data and agent versions to the final report and deployment decision.

Development lifecycle

🚀 Get Started (5 minutes)

🏗️ Architecture Overview

ZenML uses a client-server architecture with an integrated web dashboard (zenml-io/zenml-dashboard) for pipeline visualization and management:

  • Local Development: pip install "zenml[server]" - runs both client and server locally
  • Production: Deploy server separately, connect with pip install zenml + zenml login <server-url>
# Install ZenML with server capabilities
pip install "zenml[server]"

# Install required dependencies
pip install scikit-learn openai numpy

# Initialize your ZenML repository
zenml init

# Start local server or connect to a remote one
zenml login

# Set OpenAI API key (optional)
export OPENAI_API_KEY=sk-svv....

Your First Pipeline (2 minutes)

# simple_pipeline.py
from zenml import pipeline, step
from sklearn.ensemble import RandomForestClassifier
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
from typing import Tuple
from typing_extensions import Annotated
import numpy as np

@step
def create_dataset() -> Tuple[
    Annotated[np.ndarray, "X_train"],
    Annotated[np.ndarray, "X_test"], 
    Annotated[np.ndarray, "y_train"],
    Annotated[np.ndarray, "y_test"]
]:
    """Generate a simple classification dataset."""
    X, y = make_classification(n_samples=100, n_features=4, n_classes=2, random_state=42)
    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
    return X_train, X_test, y_train, y_test

@step
def train_model(X_train: np.ndarray, y_train: np.ndarray) -> RandomForestClassifier:
    """Train a simple sklearn model."""
    model = RandomForestClassifier(n_estimators=10, random_state=42)
    model.fit(X_train, y_train)
    return model

@step
def evaluate_model(model: RandomForestClassifier, X_test: np.ndarray, y_test: np.ndarray) -> float:
    """Evaluate the model accuracy."""
    predictions = model.predict(X_test)
    return accuracy_score(y_test, predictions)

@step
def generate_summary(accuracy: float) -> str:
    """Use OpenAI to generate a model summary."""
    import openai

    client = openai.OpenAI()  # Set OPENAI_API_KEY environment variable
    response = client.chat.completions.create(
        model="gpt-3.5-turbo",
        messages=[{
            "role": "user", 
            "content": f"Write a brief summary of a ML model with {accuracy:.2%} accuracy."
        }],
        max_tokens=50
    )
    return response.choices[0].message.content

@pipeline
def simple_ml_pipeline():
    """A simple pipeline combining sklearn and OpenAI."""
    X_train, X_test, y_train, y_test = create_dataset()
    model = train_model(X_train, y_train)
    accuracy = evaluate_model(model, X_test, y_test)
    try:
        import openai  # noqa: F401
        generate_summary(accuracy)
    except ImportError:
        print("OpenAI is not installed. Skipping summary generation.")


if __name__ == "__main__":
    result = simple_ml_pipeline()

Run it:

export OPENAI_API_KEY="your-api-key-here"
python simple_pipeline.py

🗣️ Chat With Your Pipelines: ZenML MCP Server

Stop clicking through dashboards to understand your ML workflows. The ZenML MCP Server lets you query your pipelines, analyze runs, and trigger deployments using natural language through Claude Desktop, Cursor, or any MCP-compatible client.

💬 "Which pipeline runs failed this week and why?"
📊 "Show me accuracy metrics for all my customer churn models"  
🚀 "Trigger the latest fraud detection pipeline with production data"

Quick Setup:

  1. Download the .dxt file from zenml-io/mcp-zenml
  2. Drag it into Claude Desktop settings
  3. Add your ZenML server URL and API key
  4. Start chatting with your ML infrastructure

The MCP (Model Context Protocol) integration transforms your ZenML metadata into conversational insights, making pipeline debugging and analysis as easy as asking a question. Perfect for teams who want to democratize access to ML operations without requiring dashboard expertise.

📚 Learn More

🖼️ Getting Started Resources

The best way to learn about ZenML is through our comprehensive documentation and tutorials:

For visual learners, start with this 11-minute introduction:

Introductory Youtube Video

📖 Production Examples

  1. Agent Architecture Comparison - Compare AI agents with LangGraph workflows, LiteLLM integration, and automatic visualizations via custom materializers
  2. Minimal Agent Production - Document analysis service with pipelines, evaluation, and web UI
  3. E2E Batch Inference - Complete MLOps pipeline with feature engineering
  4. LLM RAG Pipeline - Production RAG with evaluation loops
  5. Agentic Workflow (Deep Research) - Orchestrate your agents with ZenML
  6. Fine-tuning Pipeline - Fine-tune and deploy LLMs

🏢 Deployment Options

For Teams:

  • Self-hosted - Deploy on your infrastructure with Helm/Docker
  • ZenML Pro - Managed service with enterprise support (free trial)

Infrastructure Requirements:

  • Docker (or Kubernetes for production)
  • Object storage (S3/GCS/Azure)
  • MySQL-compatible database (MySQL 8.0+ or MariaDB)
  • Complete requirements

🎓 Books & Resources

ZenML is featured in these comprehensive guides to production AI systems.

🤝 Join ML Engineers Building the Future of AI

Contribute:

Stay Updated:

  • 🗺 Public Roadmap - See what's coming next
  • 📰 Blog - Best practices and case studies
  • 🎙 Slack - Talk with AI practitioners

❓ FAQs from ML Engineers Like You

Q: "Do I need to rewrite my agents or models to use ZenML?"

A: No. Wrap your existing code in a @step. Keep using scikit-learn, PyTorch, LangGraph, LlamaIndex, or raw API calls. ZenML orchestrates your tools, it doesn't replace them.

Q: "How is this different from LangSmith/Langfuse?"

A: They provide excellent observability for LLM applications. We orchestrate the full MLOps lifecycle for your entire AI stack. With ZenML, you manage both your classical ML models and your AI agents in one unified framework, from development and evaluation all the way to production deployment.

Q: "Can I use my existing MLflow/W&B setup?"

A: Yes! ZenML integrates with both MLflow and Weights & Biases. Your experiments, our pipelines.

Q: "Is this just MLflow with extra steps?"

A: No. MLflow tracks experiments. We orchestrate the entire development process – from training and evaluation to deployment and monitoring – for both models and agents.

Q: "How do I configure ZenML with Kubernetes?"

A: ZenML integrates with Kubernetes through the native Kubernetes orchestrator, Kubeflow, and other K8s-based orchestrators. See our Kubernetes orchestrator guide and Kubeflow guide, plus deployment documentation.

Q: "What about cost? I can't afford another platform."

A: ZenML's open-source version is free forever. You likely already have the required infrastructure (like a Kubernetes cluster and object storage). We just help you make better use of it for MLOps.

🛠 VS Code Extension

Manage pipelines directly from your editor:

🖥️ VS Code Extension in Action!
ZenML Extension

Install from VS Code Marketplace.

📜 License

ZenML is distributed under the terms of the Apache License Version 2.0. See LICENSE for details.

0.90.0 Oct 01, 2025
0.90.0rc0 Sep 29, 2025
0.85.0 Sep 12, 2025
0.84.3 Aug 27, 2025
0.84.2 Aug 06, 2025
0.84.1 Jul 30, 2025
0.84.0 Jul 11, 2025
0.83.1 Jun 23, 2025
0.83.0 May 28, 2025
0.82.1 May 14, 2025
0.82.0 Apr 30, 2025
0.81.0 Apr 16, 2025
0.80.2 Apr 09, 2025
0.80.1 Mar 28, 2025
0.80.0 Mar 19, 2025
0.75.1 Mar 18, 2025
0.75.0 Feb 26, 2025
0.74.0 Feb 06, 2025
0.73.0 Jan 21, 2025
0.72.0 Jan 13, 2025
0.71.0 Dec 05, 2024
0.70.0 Nov 12, 2024
0.68.1 Oct 28, 2024
0.68.0 Oct 24, 2024
0.67.0 Sep 30, 2024
0.66.0 Sep 09, 2024
0.65.0 Aug 28, 2024
0.64.0 Aug 08, 2024
0.63.0 Jul 30, 2024
0.62.0 Jul 16, 2024
0.61.0 Jul 09, 2024
0.60.0 Jun 26, 2024
0.58.2 Jun 10, 2024
0.58.1 Jun 06, 2024
0.58.0 May 27, 2024
0.57.1 May 14, 2024
0.57.0 May 02, 2024
0.57.0rc2 Apr 30, 2024
0.57.0rc1 Apr 29, 2024
0.56.4 Apr 24, 2024
0.56.3 Apr 09, 2024
0.56.2 Mar 25, 2024
0.56.1 Mar 21, 2024
0.56.0 Mar 21, 2024
0.55.5 Mar 06, 2024
0.55.4 Feb 29, 2024
0.55.3 Feb 20, 2024
0.55.2 Feb 06, 2024
0.55.1 Jan 26, 2024
0.55.0 Jan 23, 2024
0.54.1 Jan 15, 2024
0.54.0 Jan 08, 2024
0.53.1 Dec 21, 2023
0.53.0 Dec 20, 2023
0.52.0 Dec 12, 2023
0.51.0 Dec 11, 2023
0.50.0 Nov 28, 2023
0.47.0 Nov 14, 2023
0.46.1 Nov 10, 2023
0.46.0 Nov 06, 2023
0.45.6 Oct 31, 2023
0.45.5 Oct 24, 2023
0.45.4 Oct 20, 2023
0.45.3 Oct 18, 2023
0.45.2 Oct 16, 2023
0.45.1 Oct 15, 2023
0.45.0 Oct 12, 2023
0.44.4 Nov 14, 2023
0.44.3 Sep 27, 2023
0.44.2 Sep 11, 2023
0.44.1 Aug 31, 2023
0.44.0 Aug 29, 2023
0.43.1 Jan 23, 2024
0.43.0 Aug 15, 2023
0.42.2 Jan 23, 2024
0.42.1 Jul 21, 2023
0.42.0 Jul 20, 2023
0.41.0 Jul 04, 2023
0.40.3 Jun 19, 2023
0.40.2 Jun 05, 2023
0.40.1 May 26, 2023
0.40.0 May 26, 2023
0.39.1 May 10, 2023
0.39.0 May 10, 2023
0.38.0 Apr 12, 2023
0.37.0 Apr 03, 2023
0.36.1 Mar 24, 2023
0.36.0 Mar 20, 2023
0.35.1 Mar 08, 2023
0.35.0 Mar 06, 2023
0.34.0 Feb 20, 2023
0.33.0 Feb 03, 2023
0.32.1 Jan 26, 2023
0.32.0 Jan 24, 2023
0.31.1 Jan 13, 2023
0.31.0 Dec 23, 2022
0.30.0 Dec 09, 2022
0.30.0rc3 Dec 08, 2022
0.30.0rc2 Dec 06, 2022
0.30.0rc1 Dec 05, 2022
0.30.0rc0 Dec 02, 2022
0.23.0 Dec 02, 2022
0.22.0 Nov 18, 2022
0.21.1 Nov 04, 2022
0.21.0 Nov 03, 2022
0.20.5 Oct 21, 2022
0.20.4 Oct 15, 2022
0.20.3 Oct 12, 2022
0.20.2 Oct 07, 2022
0.20.1 Oct 05, 2022
0.20.0 Oct 05, 2022
0.20.0rc1 Oct 02, 2022
0.13.2 Sep 09, 2022
0.13.1 Aug 26, 2022
0.13.0 Aug 17, 2022
0.12.0 Aug 02, 2022
0.11.0 Jul 19, 2022
0.10.0 Jun 28, 2022
0.9.0 Jun 14, 2022
0.8.1 May 24, 2022
0.8.1rc0 May 24, 2022
0.8.0 May 18, 2022
0.7.3 Apr 28, 2022
0.7.2 Apr 14, 2022
0.7.1 Apr 11, 2022
0.7.0 Mar 28, 2022
0.6.3 Mar 14, 2022
0.6.2 Feb 23, 2022
0.6.1 Feb 07, 2022
0.6.0 Jan 26, 2022
0.5.7 Jan 13, 2022
0.5.6 Dec 23, 2021
0.5.5 Dec 13, 2021
0.5.4 Dec 05, 2021
0.5.3 Nov 23, 2021
0.5.2 Nov 05, 2021
0.5.1 Oct 23, 2021
0.5.0 Oct 15, 2021
0.5.0rc2 Oct 05, 2021
0.5.0rc1 Oct 05, 2021
0.3.9rc2 Jun 10, 2021
0.3.9rc1 Jun 10, 2021
0.3.8 Jun 04, 2021
0.3.7.1rc4 May 17, 2021
0.3.7.1rc3 May 17, 2021
0.3.7.1rc1 May 15, 2021
0.3.7.1rc0 May 14, 2021
0.3.7 Apr 22, 2021
0.3.7rc0 Apr 22, 2021
0.3.6.1 Apr 06, 2021
0.3.6 Mar 30, 2021
0.3.6rc0 Mar 30, 2021
0.3.5 Mar 18, 2021
0.3.5rc0 Mar 18, 2021
0.3.4 Mar 11, 2021
0.3.4rc0 Mar 11, 2021
0.3.3 Feb 26, 2021
0.3.3rc0 Feb 26, 2021
0.3.2 Feb 12, 2021
0.3.1 Feb 05, 2021
0.3.1rc0 Feb 05, 2021
0.2.0 Jan 22, 2021
0.2.0rc2 Jan 22, 2021
0.2.0rc1 Jan 22, 2021
0.1.5 Jan 19, 2021
0.1.4 Jan 08, 2021
0.1.3 Dec 26, 2020
0.1.3rc0 Dec 26, 2020
0.1.2 Dec 22, 2020
0.1.1 Dec 21, 2020
0.1.0 Dec 21, 2020
0.0.1rc2 Dec 16, 2020
0.0.1rc1 Dec 13, 2020

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
click (<=8.2.1,>=8.0.1)
cloudpickle (>=2.0.0)
distro (<2.0.0,>=1.6.0)
docker (~=7.1.0)
gitpython (<4.0.0,>=3.1.18)
jsonref
packaging (>=24.1)
psutil (>=5.0.0)
pydantic (<=2.11.9,>=2.0)
python-dateutil (<3.0.0,>=2.8.1)
pyyaml (>=6.0.1)
rich (>=12.0.0)
setuptools (>=70.0.0)
importlib-metadata (<=7.0.0)