Flyte & Union.ai Tutorials
Tutorials and examples for building AI agents, ML pipelines, and data workflows with Flyte 2 .
Tutorial
What you'll learn
Flyte Basics
Flyte 2 fundamentals — tasks, pipelines, error handling, TaskEnvironment, ReusePolicy, map()
LangGraph ReAct Agent
Build a ReAct agent with tools in a single file
Stable Diffusion
GPU inference with Flyte reports
Image Classifier
Fine-tune ResNet18 on HuggingFace dataset with PyTorch
DuckDB ETL
Data pipeline with DuckDB SQL and Flyte reports
Snowflake ETL
ETL pipeline with the Snowflake connector
Flyte Local Dev
Local dev features — TUI, caching, reports, tracing, serving (no cluster needed)
Fraud Detection with Feast
Fraud scoring pipeline with Feast feature store, XGBoost, and real-time serving
Tutorial
Description
Protein Sequence Analysis
Analyze protein properties, compute sequence similarity, run ESM-2 embeddings, and predict 3D structures with ESMFold
Drug Molecule Screening
Virtual drug screening — compute physicochemical properties, apply Lipinski's Rule of Five, rank candidates by drug-likeness
# Clone the repository
git clone https://github.com/unionai/workshops
cd workshops
# Navigate to any tutorial
cd tutorials/langgraph_agent_research
# Create virtual environment and install dependencies
uv venv .venv --python 3.11
source .venv/bin/activate
uv pip install -r requirements.txt
Flyte Cluster (for remote runs)
flyte create config \
--endpoint < your-endpoint> \
--auth-type headless \
--builder remote \
--domain development \
--project flytesnacks
Don't have a cluster? Request access at flyte.org .
Remote:
uv run flyte run workflow.py research_pipeline --query " Compare quantum computing approaches"
Local:
uv run flyte run --local workflow.py research_pipeline --query " Compare quantum computing approaches"
Local with TUI:
uv run flyte run --local --tui workflow.py research_pipeline --query " Compare quantum computing approaches"
Start TUI dashboard: