This release is a pre-release and may not be stable for production use.
AXL Workflows (axl) is the foundation layer of the AXL AI Platform — a full AI platform from development to deployment. Define data and ML workflows as plain Python classes; axl compiles them to a backend-agnostic IR, packages them as a portable .axlp bundle, and ships them to any runtime provider.
Build once, ship everywhere.
- Local runtime → fast iteration on your machine.
- Argo Workflows → production Kubernetes pipelines.
- Kubeflow Pipelines (v2) → KFP- and Vertex-compatible execution.
Write once → compile to a portable IR → run anywhere. No YAML, no vendor lock-in. Portability is the point: the IR and the .axlp pack are the product. See the vision and roadmap.
axl-workflows is the foundation layer of the AXL AI Platform, and the only layer that exists today.
🚀 Quick Start
# Install
pip install axl-workflows
# Or with uv
uv pip install axl-workflows
# Create your first workflow
axl --help
✨ Key Features
-
Class-based DSL: Define workflows as Python classes, with steps as methods and a
dag()to wire them. -
Simple params: Treat parameters as a normal step that returns a Python object (e.g., a Pydantic model or dict). No special Param/Artifact classes.
-
IO Handlers: Steps return plain Python objects; axl persists/loads them via an
io_handler(default: pickle).- Per-step override (
@step(io_handler=...)) - Input modes: receive objects by default or file paths with
input_mode="path".
- Per-step override (
-
Intermediate Representation (IR): Backend-agnostic DAG model (nodes, edges, resources, IO metadata).
-
Multiple backends:
- Local runtime → develop and iterate quickly.
- Argo Workflows → YAML generation for production Kubernetes pipelines.
- Kubeflow Pipelines (v2) → KFP- and Vertex-compatible pipeline packages.
-
Unified runner image: One container executes steps locally and in Argo pods.
-
Resource & retry hints: Declare CPU, memory, caching, retries, and conditions at the step level.
-
CLI tools: Compile, validate, run locally, or render DAGs.
📦 Example Workflow (params as a step, with Pydantic)
# examples/churn_workflow.py
from axl import Workflow, step
from pydantic import BaseModel
# Parameters are just a normal step output (typed with Pydantic for convenience).
class TrainParams(BaseModel):
seed: int = 42
input_path: str = "data/raw.csv"
class ChurnTrain(Workflow):
# Workflow configuration via class attributes
name = "churn-train"
image = "ghcr.io/axl-platform/axl-workflows/runner:0.3.0"
io_handler = "pickle"
@step
def params(self) -> TrainParams:
# Use defaults here; optionally read from YAML/env if you prefer.
return TrainParams()
@step # default io_handler = pickle
def preprocess(self, p: TrainParams):
import pandas as pd
df = pd.read_csv(p.input_path)
# ... feature engineering ...
return df # persisted via pickle (default)
@step
def train(self, features, p: TrainParams):
from sklearn.ensemble import RandomForestClassifier
import numpy as np
y = (features.sum(axis=1) > features.sum(axis=1).median()).astype(int)
X = features.select_dtypes(include=[np.number]).fillna(0)
model = RandomForestClassifier(n_estimators=50, random_state=p.seed).fit(X, y)
return model # persisted via pickle
@step
def evaluate(self, model) -> float:
# pretend evaluation
return 0.9123
def dag(self):
p = self.params()
feats = self.preprocess(p)
model = self.train(feats, p)
return self.evaluate(model)
Variations
-
Receive a file path instead of an object:
from pathlib import Path @step(input_mode={"features": "path"}) def profile(self, features: Path) -> dict: return {"bytes": Path(features).stat().st_size}
-
Override the io handler (e.g., Parquet for DataFrames):
from axl.io.parquet_io import parquet_io_handler @step(io_handler=parquet_io_handler) def preprocess(self, p: TrainParams): import pandas as pd return pd.read_csv(p.input_path) # saved as .parquet; downstream gets a DataFrame
🛠 CLI
# Compile to Argo Workflows YAML
axl compile -m examples/churn_workflow.py:ChurnTrain --target argo --out churn.yaml
# Compile to Kubeflow Pipelines v2 package
axl compile -m examples/churn_workflow.py:ChurnTrain --target kfp --out pipeline.yaml
# Run locally
axl run local -m examples/churn_workflow.py:ChurnTrain
# Validate workflow definition
axl validate -m examples/churn_workflow.py:ChurnTrain
# Render DAG graph
axl render -m examples/churn_workflow.py:ChurnTrain --out dag.png
Cluster lifecycle and storage setup are out of scope for
axl. Today, follow the upstream install steps in the Argo and KFP guides.
📐 Architecture
axl-workflows is Layer 1 of the AXL AI Platform:
┌─────────────────────────────────────────────────┐
│ LAYER 4: MONITOR not started │
├─────────────────────────────────────────────────┤
│ LAYER 3: SERVE not started │
├─────────────────────────────────────────────────┤
│ LAYER 2: MANAGE not started │
├─────────────────────────────────────────────────┤
│ LAYER 1: AUTHOR → COMPILE → RUN ← (here) │
├─────────────────────────────────────────────────┤
│ OPS (cross-cutting) axlctl not started │
└─────────────────────────────────────────────────┘
Only Layer 1 exists today; the rest is stated direction.
Within this repo, the layers are:
-
Authoring Layer
- Python DSL:
@stepdecorator,Workflowbase class - Params are a normal step (often a Pydantic model)
- Configuration via class attributes (name, image, io_handler)
- IO handled by io_handlers (default: pickle)
- Wire dependencies via
dag()(auto-inferred in v0.3.0+)
- Python DSL:
-
IR (Intermediate Representation)
- Backend-agnostic DAG: nodes, edges, inputs/outputs, resources, retry policies, IO metadata
-
Compilers
- Argo: IR → Argo Workflow YAML
- KFP: IR → Kubeflow Pipelines v2 package
- Plugin architecture — add any target via entry points
-
Runtime
- Unified runner image (
axl-runner) executes steps in pods and locally - Handles env (via uv), IO handler save/load, structured logging, retries
- Unified runner image (
-
CLI
axl compile,axl run local,axl validate,axl renderaxl pack,axl build-image
📂 Project Structure
axl/
core/ # DSL: decorators, base classes, typing
io/ # io_handlers (pickle default; parquet/npy/torch optional)
ir/ # Intermediate Representation (nodes, edges, workflows)
compiler/ # Backend compilers (Argo, Kubeflow)
runtime/ # Runner container + IO + env setup (uv)
cli.py # CLI entrypoint
examples/
churn_workflow.py
tests/
test_core.py # Tests for DSL components
test_ir.py # Tests for IR components
pyproject.toml
README.md
🎯 Why AXL Workflows?
-
Local development is fast and simple.
-
Argo/KFP is production-grade but YAML is verbose and hard to get started with.
-
axl bridges the gap:
- Simple, class-based DSL — no YAML, no vendor-specific decorators
- Params as a normal step — no special
Param/Artifactclasses - IO handlers for painless object ↔ file persistence
- Backend-agnostic IR — one workflow definition, multiple compile targets
- Compile once, run anywhere
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file axl_workflows-0.5.0a1.tar.gz.
File metadata
- Download URL: axl_workflows-0.5.0a1.tar.gz
- Upload date:
- Size: 174.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
201029ee1801c177363db48a68e4c4d06149d2e72a6f3b0b52ab9b0eba82c252
|
|
| MD5 |
05b99888cde7041ffcc6dbd51ce13853
|
|
| BLAKE2b-256 |
675ee4e3f4ba84bfd47ef1d7d29148926a131bc50d13cdefe8256234f8aab2bc
|
Provenance
The following attestation bundles were made for axl_workflows-0.5.0a1.tar.gz:
Publisher:
release.yml on axl-platform/axl-workflows
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
axl_workflows-0.5.0a1.tar.gz -
Subject digest:
201029ee1801c177363db48a68e4c4d06149d2e72a6f3b0b52ab9b0eba82c252 - Sigstore transparency entry: 2545626796
- Sigstore integration time:
-
Permalink:
axl-platform/axl-workflows@d1874f8baa0e93270627ad2ec488eb4654f0e9cc -
Branch / Tag:
refs/tags/v0.5.0a1 - Owner: https://github.com/axl-platform
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d1874f8baa0e93270627ad2ec488eb4654f0e9cc -
Trigger Event:
push
-
Statement type:
File details
Details for the file axl_workflows-0.5.0a1-py3-none-any.whl.
File metadata
- Download URL: axl_workflows-0.5.0a1-py3-none-any.whl
- Upload date:
- Size: 85.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cc11557f3a17672a94c4983091d5e3d6e0bfd05b862ef8a6a9a28a488be3a74
|
|
| MD5 |
979ba0039cf2b0b6590b16349f15bbb2
|
|
| BLAKE2b-256 |
6edf406531359b8528aed5c8c525b950669ff4a654729ab9f0899785a8b45091
|
Provenance
The following attestation bundles were made for axl_workflows-0.5.0a1-py3-none-any.whl:
Publisher:
release.yml on axl-platform/axl-workflows
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
axl_workflows-0.5.0a1-py3-none-any.whl -
Subject digest:
7cc11557f3a17672a94c4983091d5e3d6e0bfd05b862ef8a6a9a28a488be3a74 - Sigstore transparency entry: 2545626910
- Sigstore integration time:
-
Permalink:
axl-platform/axl-workflows@d1874f8baa0e93270627ad2ec488eb4654f0e9cc -
Branch / Tag:
refs/tags/v0.5.0a1 - Owner: https://github.com/axl-platform
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d1874f8baa0e93270627ad2ec488eb4654f0e9cc -
Trigger Event:
push
-
Statement type: