unionai/workshops

21

stars

429

commits

Python

primary language

Aug 20, 2026

updated

README

Flyte & Union.ai Tutorials

Tutorials and examples for building AI agents, ML pipelines, and data workflows with Flyte 2.


πŸ‘‰ Tonight's workshop: RAG and Agentic Memory

tutorials/rag-agent-memory/

Open In Colab

Build a document index, search it with no model at all, answer from it with citations, see the embedding space in 2D, then point the same vector store the other way so an agent writes its own memories into it.

Runs entirely in Colab. No cluster, no vector database to host, and no API key needed until step 2 (step 3's chart doesn't need one either). Or run it locally with flyte run --local, or on a Flyte cluster where every step becomes a container.

Along the way: what tokenization actually does to your text, why chunking is a hyperparameter rather than plumbing, where dense retrieval quietly fails, and how to swap Chroma for Qdrant without touching a single step.

git clone https://github.com/unionai/workshops
cd workshops/tutorials/rag-agent-memory
uv venv .venv --python 3.11 && source .venv/bin/activate
uv pip install -r requirements.txt
flyte run --local step0_index.py index

ExampleDescription
RAG and Agentic MemoryOne vector store, pointed two directions β€” build a RAG index, watch retrieval work with no model involved, visualize the embedding space, then let an agent write its own memories back into it
Code Mode β€” NYC Taxi analystClaude writes one program, the Monty sandbox runs it, and its loops fan out into durable parallel tasks over real NYC taxi data
LangGraph Research PipelineResearch agent pipeline β€” LangGraph orchestrates planning and quality gates, Flyte fans out parallel researcher tasks
LangGraph ReAct AgentBuild a ReAct agent with LangGraph + OpenAI on Flyte
Stable DiffusionGenerate images from text prompts with SDXL Turbo on GPU
DuckDB ETLExtract and transform data with DuckDB SQL
Fraud Detection with FeastReal-time fraud scoring with Feast feature store + XGBoost

Get Started

TutorialWhat you'll learn
Flyte BasicsFlyte 2 fundamentals β€” tasks, pipelines, error handling, TaskEnvironment, ReusePolicy, map()
LangGraph ReAct AgentBuild a ReAct agent with tools in a single file
Stable DiffusionGPU inference with Flyte reports
Image ClassifierFine-tune ResNet18 on HuggingFace dataset with PyTorch
DuckDB ETLData pipeline with DuckDB SQL and Flyte reports
Snowflake ETLETL pipeline with the Snowflake connector
Flyte Local DevLocal dev features β€” TUI, caching, reports, tracing, serving (no cluster needed)
Fraud Detection with FeastFraud scoring pipeline with Feast feature store, XGBoost, and real-time serving

Agents

TutorialDescription
Code Mode β€” NYC Taxi analystThe agent writes a program instead of calling tools one at a time. It runs in the Monty sandbox, and a loop in the generated code becomes a fan-out of durable, parallel query tasks over 3M+ real taxi trips
RAG and Agentic MemoryOne Chroma store, pointed two directions β€” build a document index, search it with no model, answer from it with citations, see the embedding space in 2D, then let an agent write its own memories back into it
LangGraph Research PipelineResearch agent pipeline β€” LangGraph orchestrates planning and quality gates, Flyte fans out parallel researcher tasks via Tavily web search
LangGraph ReAct AgentSingle-file ReAct agent with LangGraph
Planner Multi-Agent SystemScalable planner multi-agent system
ReAct Multi-Agent SystemAdaptive ReAct multi-agent system
Debate Multi-Agent SystemMulti-agent debate pattern
Manager Multi-Agent SystemManager-worker agent delegation
Sequential Multi-Agent SystemSequential agent pipeline
AutoresearchAutoresearch-style self-healing agent on Flyte

MCP

TutorialDescription
MCP Recipe AssistantBuild and deploy a recipe assistant MCP server on Union

LLM Fine-Tuning

TutorialDescription
LoRA / QLoRA / FullFine-tune an LLM on text-to-SQL with LoRA, QLoRA, or full fine-tuning β€” live training reports, FastAPI serving, Gradio UI
GRPO β€” Code GenerationTeach a model to write Python with GRPO β€” reward = sandboxed test execution, MBPP dataset, live reward/pass-rate charts
GRPO β€” DistributedScale GRPO across the cluster β€” fan out sandboxed verification to a reusable pool, then disaggregate rollouts onto vLLM workers with LoRA weight sync
GRPOGRPO fine-tuning on math/reasoning tasks
DPODirect Preference Optimization for alignment
PPOProximal Policy Optimization for RLHF

ML / AI

TutorialDescription
Fraud Detection with FeastFraud scoring pipeline with Feast feature store, XGBoost, and real-time serving
Stable DiffusionImage generation with SDXL Turbo
Image ClassifierFine-tune ResNet18 on Beans dataset
DETR Object DetectionFine-tune DETR for object detection with live mAP charts

Biotech / Life Sciences

TutorialDescription
Genomic Variant Effect PredictionScore DNA mutations with HuggingFace Carbon genomic foundation model β€” zero-shot pathogenicity prediction on BRCA2, TP53, KRAS, and more
DNA Sequence Generation & AnalysisGenerate DNA with Carbon and compare to real genes β€” GC content, codon usage, ORFs, dinucleotide frequencies
Gene Comparison Across SpeciesCompare homologous genes across 6 species with Carbon scoring, phylogenetic trees, and ESMFold 3D structure comparison
Protein Sequence AnalysisAnalyze protein properties, compute sequence similarity, run ESM-2 embeddings, and predict 3D structures with ESMFold
Drug Molecule ScreeningVirtual drug screening β€” compute physicochemical properties, apply Lipinski's Rule of Five, rank candidates by drug-likeness
Cell Microscopy ClassificationFine-tune a Vision Transformer (ViT) to classify blood cell types from microscopy images

Data

TutorialDescription
DuckDB ETLSQL-based data pipeline with DuckDB
Snowflake ETLETL with Snowflake connector
Lance Streaming for VisionConvert a swarm of tiny per-sample image files (real CPPE-5 detection data) into one Lance dataset, benchmark per-file vs Lance streaming against real object storage, then train / evaluate / explore a Faster R-CNN streamed straight from S3 on a T4

Setup

# 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.

Run examples

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:

uv run flyte start tui

Contributors

sagecodes

409 commits

cosmicBboy

19 commits

samhita-alla

1 commits

unionai/workshops

21

stars

429

commits

Python

primary language

Aug 20, 2026

updated

README

Flyte & Union.ai Tutorials

Tutorials and examples for building AI agents, ML pipelines, and data workflows with Flyte 2.


πŸ‘‰ Tonight's workshop: RAG and Agentic Memory

tutorials/rag-agent-memory/

Open In Colab

Build a document index, search it with no model at all, answer from it with citations, see the embedding space in 2D, then point the same vector store the other way so an agent writes its own memories into it.

Runs entirely in Colab. No cluster, no vector database to host, and no API key needed until step 2 (step 3's chart doesn't need one either). Or run it locally with flyte run --local, or on a Flyte cluster where every step becomes a container.

Along the way: what tokenization actually does to your text, why chunking is a hyperparameter rather than plumbing, where dense retrieval quietly fails, and how to swap Chroma for Qdrant without touching a single step.

git clone https://github.com/unionai/workshops
cd workshops/tutorials/rag-agent-memory
uv venv .venv --python 3.11 && source .venv/bin/activate
uv pip install -r requirements.txt
flyte run --local step0_index.py index

ExampleDescription
RAG and Agentic MemoryOne vector store, pointed two directions β€” build a RAG index, watch retrieval work with no model involved, visualize the embedding space, then let an agent write its own memories back into it
Code Mode β€” NYC Taxi analystClaude writes one program, the Monty sandbox runs it, and its loops fan out into durable parallel tasks over real NYC taxi data
LangGraph Research PipelineResearch agent pipeline β€” LangGraph orchestrates planning and quality gates, Flyte fans out parallel researcher tasks
LangGraph ReAct AgentBuild a ReAct agent with LangGraph + OpenAI on Flyte
Stable DiffusionGenerate images from text prompts with SDXL Turbo on GPU
DuckDB ETLExtract and transform data with DuckDB SQL
Fraud Detection with FeastReal-time fraud scoring with Feast feature store + XGBoost

Get Started

TutorialWhat you'll learn
Flyte BasicsFlyte 2 fundamentals β€” tasks, pipelines, error handling, TaskEnvironment, ReusePolicy, map()
LangGraph ReAct AgentBuild a ReAct agent with tools in a single file
Stable DiffusionGPU inference with Flyte reports
Image ClassifierFine-tune ResNet18 on HuggingFace dataset with PyTorch
DuckDB ETLData pipeline with DuckDB SQL and Flyte reports
Snowflake ETLETL pipeline with the Snowflake connector
Flyte Local DevLocal dev features β€” TUI, caching, reports, tracing, serving (no cluster needed)
Fraud Detection with FeastFraud scoring pipeline with Feast feature store, XGBoost, and real-time serving

Agents

TutorialDescription
Code Mode β€” NYC Taxi analystThe agent writes a program instead of calling tools one at a time. It runs in the Monty sandbox, and a loop in the generated code becomes a fan-out of durable, parallel query tasks over 3M+ real taxi trips
RAG and Agentic MemoryOne Chroma store, pointed two directions β€” build a document index, search it with no model, answer from it with citations, see the embedding space in 2D, then let an agent write its own memories back into it
LangGraph Research PipelineResearch agent pipeline β€” LangGraph orchestrates planning and quality gates, Flyte fans out parallel researcher tasks via Tavily web search
LangGraph ReAct AgentSingle-file ReAct agent with LangGraph
Planner Multi-Agent SystemScalable planner multi-agent system
ReAct Multi-Agent SystemAdaptive ReAct multi-agent system
Debate Multi-Agent SystemMulti-agent debate pattern
Manager Multi-Agent SystemManager-worker agent delegation
Sequential Multi-Agent SystemSequential agent pipeline
AutoresearchAutoresearch-style self-healing agent on Flyte

MCP

TutorialDescription
MCP Recipe AssistantBuild and deploy a recipe assistant MCP server on Union

LLM Fine-Tuning

TutorialDescription
LoRA / QLoRA / FullFine-tune an LLM on text-to-SQL with LoRA, QLoRA, or full fine-tuning β€” live training reports, FastAPI serving, Gradio UI
GRPO β€” Code GenerationTeach a model to write Python with GRPO β€” reward = sandboxed test execution, MBPP dataset, live reward/pass-rate charts
GRPO β€” DistributedScale GRPO across the cluster β€” fan out sandboxed verification to a reusable pool, then disaggregate rollouts onto vLLM workers with LoRA weight sync
GRPOGRPO fine-tuning on math/reasoning tasks
DPODirect Preference Optimization for alignment
PPOProximal Policy Optimization for RLHF

ML / AI

TutorialDescription
Fraud Detection with FeastFraud scoring pipeline with Feast feature store, XGBoost, and real-time serving
Stable DiffusionImage generation with SDXL Turbo
Image ClassifierFine-tune ResNet18 on Beans dataset
DETR Object DetectionFine-tune DETR for object detection with live mAP charts

Biotech / Life Sciences

TutorialDescription
Genomic Variant Effect PredictionScore DNA mutations with HuggingFace Carbon genomic foundation model β€” zero-shot pathogenicity prediction on BRCA2, TP53, KRAS, and more
DNA Sequence Generation & AnalysisGenerate DNA with Carbon and compare to real genes β€” GC content, codon usage, ORFs, dinucleotide frequencies
Gene Comparison Across SpeciesCompare homologous genes across 6 species with Carbon scoring, phylogenetic trees, and ESMFold 3D structure comparison
Protein Sequence AnalysisAnalyze protein properties, compute sequence similarity, run ESM-2 embeddings, and predict 3D structures with ESMFold
Drug Molecule ScreeningVirtual drug screening β€” compute physicochemical properties, apply Lipinski's Rule of Five, rank candidates by drug-likeness
Cell Microscopy ClassificationFine-tune a Vision Transformer (ViT) to classify blood cell types from microscopy images

Data

TutorialDescription
DuckDB ETLSQL-based data pipeline with DuckDB
Snowflake ETLETL with Snowflake connector
Lance Streaming for VisionConvert a swarm of tiny per-sample image files (real CPPE-5 detection data) into one Lance dataset, benchmark per-file vs Lance streaming against real object storage, then train / evaluate / explore a Faster R-CNN streamed straight from S3 on a T4

Setup

# 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.

Run examples

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:

uv run flyte start tui

Contributors

sagecodes

409 commits

cosmicBboy

19 commits

samhita-alla

1 commits

Languages

Python

60.5%

Jupyter Notebook

39.5%