Tutorials and examples for building AI agents, ML pipelines, and data workflows with Flyte 2.
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| Example | Description |
|---|---|
| RAG and Agentic Memory | One 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 analyst | Claude writes one program, the Monty sandbox runs it, and its loops fan out into durable parallel tasks over real NYC taxi data |
| LangGraph Research Pipeline | Research agent pipeline — LangGraph orchestrates planning and quality gates, Flyte fans out parallel researcher tasks |
| LangGraph ReAct Agent | Build a ReAct agent with LangGraph + OpenAI on Flyte |
| Stable Diffusion | Generate images from text prompts with SDXL Turbo on GPU |
| DuckDB ETL | Extract and transform data with DuckDB SQL |
| Fraud Detection with Feast | Real-time fraud scoring with Feast feature store + XGBoost |
| 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 |
|---|---|
| Code Mode — NYC Taxi analyst | The 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 Memory | One 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 Pipeline | Research agent pipeline — LangGraph orchestrates planning and quality gates, Flyte fans out parallel researcher tasks via Tavily web search |
| LangGraph ReAct Agent | Single-file ReAct agent with LangGraph |
| Planner Multi-Agent System | Scalable planner multi-agent system |
| ReAct Multi-Agent System | Adaptive ReAct multi-agent system |
| Debate Multi-Agent System | Multi-agent debate pattern |
| Manager Multi-Agent System | Manager-worker agent delegation |
| Sequential Multi-Agent System | Sequential agent pipeline |
| Autoresearch | Autoresearch-style self-healing agent on Flyte |
| Tutorial | Description |
|---|---|
| MCP Recipe Assistant | Build and deploy a recipe assistant MCP server on Union |
| Tutorial | Description |
|---|---|
| LoRA / QLoRA / Full | Fine-tune an LLM on text-to-SQL with LoRA, QLoRA, or full fine-tuning — live training reports, FastAPI serving, Gradio UI |
| GRPO — Code Generation | Teach a model to write Python with GRPO — reward = sandboxed test execution, MBPP dataset, live reward/pass-rate charts |
| GRPO — Distributed | Scale GRPO across the cluster — fan out sandboxed verification to a reusable pool, then disaggregate rollouts onto vLLM workers with LoRA weight sync |
| GRPO | GRPO fine-tuning on math/reasoning tasks |
| DPO | Direct Preference Optimization for alignment |
| PPO | Proximal Policy Optimization for RLHF |
| Tutorial | Description |
|---|---|
| Fraud Detection with Feast | Fraud scoring pipeline with Feast feature store, XGBoost, and real-time serving |
| Stable Diffusion | Image generation with SDXL Turbo |
| Image Classifier | Fine-tune ResNet18 on Beans dataset |
| DETR Object Detection | Fine-tune DETR for object detection with live mAP charts |
| Tutorial | Description |
|---|---|
| Genomic Variant Effect Prediction | Score DNA mutations with HuggingFace Carbon genomic foundation model — zero-shot pathogenicity prediction on BRCA2, TP53, KRAS, and more |
| DNA Sequence Generation & Analysis | Generate DNA with Carbon and compare to real genes — GC content, codon usage, ORFs, dinucleotide frequencies |
| Gene Comparison Across Species | Compare homologous genes across 6 species with Carbon scoring, phylogenetic trees, and ESMFold 3D structure comparison |
| 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 |
| Cell Microscopy Classification | Fine-tune a Vision Transformer (ViT) to classify blood cell types from microscopy images |
| Tutorial | Description |
|---|---|
| DuckDB ETL | SQL-based data pipeline with DuckDB |
| Snowflake ETL | ETL with Snowflake connector |
| Lance Streaming for Vision | Convert 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 |
# 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.txtflyte create config \
--endpoint <your-endpoint> \
--auth-type headless \
--builder remote \
--domain development \
--project flytesnacksDon'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:
uv run flyte start tui