# Core concepts

> **📝 Note**
>
> An LLM-optimized bundle of this entire section is available at [`section.md`](https://www.union.ai/docs/v2/union/user-guide/core-concepts/section.md).
> This single file contains all pages in this section, optimized for AI coding agent context.

Now that you've completed the [Quickstart](https://www.union.ai/docs/v2/union/user-guide/quickstart/page.md), let's explore Flyte's core concepts through working examples.

By the end of this section, you'll understand:

- **TaskEnvironment**: The container configuration that defines where and how your code runs
- **Tasks**: Python functions that execute remotely in containers
- **Runs and Actions**: How Flyte tracks and manages your executions
- **Apps**: Long-running services for APIs, dashboards, and inference endpoints

Each concept is introduced with a practical example you can run yourself.

## How Flyte works

When you run code with Flyte, here's what happens:

1. You define a **TaskEnvironment** that specifies the container image and resources
2. You decorate Python functions with `@env.task` to create **tasks**
3. When you execute a task, Flyte creates a **run** that tracks the execution
4. Each task execution within a run is an **action**

Let's explore each of these in detail.

## Subpages

- [TaskEnvironment](https://www.union.ai/docs/v2/union/user-guide/core-concepts/task-environment/page.md)
  - A minimal example
  - What TaskEnvironment controls
  - Configuring resources
  - Configuring container images
  - Multiple tasks, one environment
  - Multiple environments
  - Next steps
- [Tasks](https://www.union.ai/docs/v2/union/user-guide/core-concepts/tasks/page.md)
  - Defining a task
  - Type hints are required
  - Tasks calling tasks
  - The top-level task
  - Running tasks locally
  - Running tasks remotely
  - Next steps
- [Runs and actions](https://www.union.ai/docs/v2/union/user-guide/core-concepts/runs-and-actions/page.md)
  - What is a run?
  - What is an action?
  - Runs vs actions in practice
  - Viewing runs in the UI
  - Understanding the execution graph
  - Checking run status
  - Next steps
- [Apps](https://www.union.ai/docs/v2/union/user-guide/core-concepts/introducing-apps/page.md)
  - Tasks vs apps
  - AppEnvironment
  - A hello world app
  - Understanding the code
  - Serving the app
  - When to use apps vs tasks
  - Common patterns
  - Next steps
- [Key capabilities](https://www.union.ai/docs/v2/union/user-guide/core-concepts/key-capabilities/page.md)
  - Environment and resources
  - Deployment
  - Data handling
  - Parallelism and composition
  - Security and automation
  - Durability and reliability
  - Apps and serving
  - Notebooks
  - Next steps

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