# Union.ai

Union.ai empowers AI development teams to rapidly ship high-quality code to production by offering optimized performance, unparalleled resource efficiency, and a delightful workflow authoring experience. With Union.ai your team can:

* Run complex AI workloads with performance, scale, and efficiency.
* Achieve millisecond-level execution times with reusable containers.
* Scale out to multiple regions, clusters, and clouds as needed for resource availability, scale, or compliance.

Union.ai is built on top of the leading open-source workflow orchestrator, [Flyte](https://www.union.ai/docs/v2/flyte/).

Union.ai provides all the features of Flyte, plus much more, in an environment where you keep your data and workflow code on your own infrastructure. Union.ai is available as [BYOC](https://www.union.ai/docs/v2/union//deployment/byoc/_index) (Bring Your Own Cloud), where Union.ai manages the infrastructure for you, or [Self-managed](https://www.union.ai/docs/v2/union//deployment/selfmanaged/_index), where you manage the data plane yourself.

> [!NOTE]
> These are the Union.ai **2.0** docs.
> To switch to [version 1.0](https://www.union.ai/docs/v1/union/) or to another product variant, use the selectors above.

## Basics

Learn the basics of Flyte, covering all the core concepts around tasks and apps.

### [Flyte 2](https://www.union.ai/docs/v2/union/user-guide/overview/page.md)

Build AI workflows in pure Python with built-in durability, reproducibility, and recovery.

### [Quickstart](https://www.union.ai/docs/v2/union/user-guide/quickstart/page.md)

Install the SDK and run your first workflow locally in a few minutes.

### [Core concepts](https://www.union.ai/docs/v2/union/user-guide/core-concepts/page.md)

The building blocks of every Flyte program: TaskEnvironments, tasks, runs, actions, and apps.

### [Run modes](https://www.union.ai/docs/v2/union/user-guide/run-modes/page.md)

Run the same task code locally, on a devbox, or on a remote cluster.

## Tasks

Build durable, scalable, and reproducible batch workloads.

### [Configure tasks](https://www.union.ai/docs/v2/union/user-guide/task-configuration/page.md)

Define `TaskEnvironment`s for container images, resources, secrets, caching, retries, and more; use triggers for schedules.

### [Build tasks](https://www.union.ai/docs/v2/union/user-guide/task-programming/page.md)

Compose tasks with fanout, parallelism, error handling, traces, files, and DataFrames.

### [Run and deploy tasks](https://www.union.ai/docs/v2/union/user-guide/task-deployment/page.md)

Use `flyte run` for iteration or `flyte deploy` to register a stable task version.

## Apps

Create long-running services to host dashboards, APIs, and model endpoints.

### [Configure apps](https://www.union.ai/docs/v2/union/user-guide/configure-apps/page.md)

Define `AppEnvironment`s with ports, autoscaling, custom domains, and authentication.

### [Build apps](https://www.union.ai/docs/v2/union/user-guide/build-apps/page.md)

Build dashboards, REST APIs, and model endpoints with FastAPI, Streamlit, vLLM, and more.

### [Native app integrations](https://www.union.ai/docs/v2/union/user-guide/native-app-integrations/page.md)

Use pre-built environments for popular frameworks like Streamlit, FastAPI, vLLM, and SGLang.

### [Serve and deploy apps](https://www.union.ai/docs/v2/union/user-guide/serve-and-deploy-apps/page.md)

Use `flyte serve` for fast iteration or `flyte deploy` for production deployments.

## Agents

Build durable, self-healing agents using tasks and apps as building blocks.

### [Build agents](https://www.union.ai/docs/v2/union/user-guide/build-agent/page.md)

Implement ReAct, Plan-and-Execute, and other agent patterns with full observability.

### [Sandboxing](https://www.union.ai/docs/v2/union/user-guide/sandboxing/page.md)

Safely execute LLM-generated code with workflow sandboxes or ephemeral containers.

## Access and identity

How to authenticate and manage user permissions on your Union cluster.

### [Authenticating](https://www.union.ai/docs/v2/union/user-guide/authenticating/page.md)

Authenticate with Union.ai using OAuth2, API keys, and service accounts.

### [User management](https://www.union.ai/docs/v2/union/user-guide/user-management/page.md)

Manage users, roles, and policies for your Union cluster.

## Advanced Guides

Organize your codebase, optimize performance for production, and migrate from
other workflow orchestrators.

### [Project patterns](https://www.union.ai/docs/v2/union/user-guide/project-patterns/page.md)

Patterns for BYO images, monorepos with uv, CI/CD, and multi-team resource management.

### [Run scaling](https://www.union.ai/docs/v2/union/user-guide/run-scaling/page.md)

Tune task overhead, batching, reusable containers, and fanout to scale your workflows.

### [Advanced project](https://www.union.ai/docs/v2/union/user-guide/advanced-project/page.md)

An advanced guide for building an LLM reporting agent on Flyte.

### [Migration](https://www.union.ai/docs/v2/union/user-guide/migration/page.md)

Port a Flyte 1 codebase to Flyte 2, or map Airflow concepts to their Flyte 2 equivalents.

## Subpages

- [Overview](https://www.union.ai/docs/v2/union/user-guide/overview/page.md)
  - Pure Python, no DSL
  - Durability
  - Reproducibility
  - Recoverability
  - Built for scale
  - What this means in practice
- [Quickstart](https://www.union.ai/docs/v2/union/user-guide/quickstart/page.md)
  - What you'll need
  - Install the SDK
  - Configure
  - Write your first workflow
  - Run it
  - See the results
  - Next steps
- [Core concepts](https://www.union.ai/docs/v2/union/user-guide/core-concepts/page.md)
  - How Flyte works
- [Run modes](https://www.union.ai/docs/v2/union/user-guide/run-modes/page.md)
  - [Local](https://www.union.ai/docs/v2/union/user-guide/running-locally/page.md)
  - [Devbox](https://www.union.ai/docs/v2/union/user-guide/running-devbox/page.md)
  - [Remote](https://www.union.ai/docs/v2/union/user-guide/running-remote/page.md)
- [Configure tasks](https://www.union.ai/docs/v2/union/user-guide/task-configuration/page.md)
  - Task configuration levels
  - Example
  - Task configuration parameters
- [Build tasks](https://www.union.ai/docs/v2/union/user-guide/task-programming/page.md)
  - What you'll learn
  - When to use these patterns
- [Run and deploy tasks](https://www.union.ai/docs/v2/union/user-guide/task-deployment/page.md)
  - Ephemeral deployment and immediate execution
  - Programmatic
  - CLI
  - Persistent deployment
  - Programmatic
  - CLI
  - Running already deployed tasks
  - Programmatic
  - CLI
  - Configuring runs with `flyte.with_runcontext()`
- [Configure apps](https://www.union.ai/docs/v2/union/user-guide/configure-apps/page.md)
  - Hello World example
  - Using fserve args
  - Using @app_env.server
  - Differences from TaskEnvironment
  - Configuration topics
- [Build apps](https://www.union.ai/docs/v2/union/user-guide/build-apps/page.md)
  - App types
  - Usage patterns
  - Next steps
- [Native app integrations](https://www.union.ai/docs/v2/union/user-guide/native-app-integrations/page.md)
  - When to use a native integration
  - Available integrations
  - Next steps
- [Serve and deploy apps](https://www.union.ai/docs/v2/union/user-guide/serve-and-deploy-apps/page.md)
  - Serve vs Deploy
  - `flyte serve`
  - `flyte deploy`
  - Using Python SDK
  - Serve
  - Deploy
  - Using the CLI
  - Serve
  - Deploy
  - Next steps
- [Build an agent](https://www.union.ai/docs/v2/union/user-guide/build-agent/page.md)
  - Quickstart
  - Next steps
- [Sandboxing](https://www.union.ai/docs/v2/union/user-guide/sandboxing/page.md)
  - Why sandboxing matters for AI
  - Types of sandboxes
  - What Flyte offers
  - Workflow sandbox (Monty)
  - Code sandbox (container)
  - When to use which
  - Learn more
- [Authenticating](https://www.union.ai/docs/v2/union/user-guide/authenticating/page.md)
  - Quick start
  - Programmatic
  - CLI
  - Authentication modes
  - PKCE authentication (browser-based) {#pkce}
  - Programmatic
  - CLI
  - Device flow authentication {#device-flow}
  - Programmatic
  - CLI
  - API key authentication (OAuth2 app credentials) {#api-key}
  - Programmatic
  - CLI
  - Comparison table
  - Switching between authentication modes
  - Token storage and keyring {#token-storage}
  - How it works
  - Systems without keyring support
  - Solution: Install keyrings.alt
  - Verifying keyring functionality
  - Troubleshooting
  - Browser doesn't open for PKCE
  - Device flow code expires
  - API key doesn't work
  - Best practices
- [User management](https://www.union.ai/docs/v2/union/user-guide/user-management/page.md)
  - Built-in policies
  - Custom roles and policies
  - Prerequisites
  - Walkthrough: restrict a team to run workflows in production only
  - Programmatic
  - CLI
  - Updating roles and policies
  - Programmatic
  - CLI
  - Managing users in the UI
  - Available actions
  - CLI command reference
- [Project patterns](https://www.union.ai/docs/v2/union/user-guide/project-patterns/page.md)
  - [Bring your own image (BYOI)](https://www.union.ai/docs/v2/union/user-guide/bring-your-own-image/page.md)
  - [Monorepo with uv](https://www.union.ai/docs/v2/union/user-guide/monorepo-with-uv/page.md)
  - [CI/CD deployments](https://www.union.ai/docs/v2/union/user-guide/cicd/page.md)
  - [Resource management and multi-team scaling](https://www.union.ai/docs/v2/union/user-guide/resource-management/page.md)
- [Scale your runs](https://www.union.ai/docs/v2/union/user-guide/run-scaling/page.md)
  - Understanding Flyte execution
  - Performance optimization
  - Key concepts for scaling
- [Advanced project](https://www.union.ai/docs/v2/union/user-guide/advanced-project/page.md)
  - What you'll build
  - Concepts covered
  - Architecture
  - Prerequisites
  - Parts
  - Key takeaways
- [Migration](https://www.union.ai/docs/v2/union/user-guide/migration/page.md)
  - [From Flyte 1 to 2](https://www.union.ai/docs/v2/union/user-guide/flyte-2/page.md)
  - [From Airflow to Flyte](https://www.union.ai/docs/v2/union/user-guide/from-airflow/page.md)

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/user-guide/_index.md
**HTML**: https://www.union.ai/docs/v2/union/user-guide/
