# flyteorg/flyte architecture

> Architecture diagram of the GitHub repository flyteorg/flyte, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/flyteorg/flyte
- Repository: https://github.com/flyteorg/flyte
- Video tour (about a minute): https://gitdiagram.com/flyteorg/flyte/video

## Overview

Flyte 2 is presented as an ML workflow and model-serving platform; this repository is its emerging Kubernetes-native backend, not the Python SDK. The principal visible runtime path is a Kubernetes TaskAction being reconciled and dispatched to a task plugin, whose state and result are reflected in the action status. Separate backend services expose cache, data proxy, app, action, event, and auth capabilities. The README says the open-source backend is still coming; the graph therefore shows documented subsystems but only asserts links supported by sampled source or explicit documentation.

Main entry points: [`executor/pkg/controller/taskaction_controller.go`](https://github.com/flyteorg/flyte/blob/main/executor/pkg/controller/taskaction_controller.go) (Action reconciler), [`dataproxy/service/dataproxy_service.go`](https://github.com/flyteorg/flyte/blob/main/dataproxy/service/dataproxy_service.go) (Data proxy), [`executor/pkg/plugin/k8s/plugin_manager.go`](https://github.com/flyteorg/flyte/blob/main/executor/pkg/plugin/k8s/plugin_manager.go) (Kubernetes plugin manager), [`executor/api/v1/taskaction_types.go`](https://github.com/flyteorg/flyte/blob/main/executor/api/v1/taskaction_types.go) (TaskAction API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Task execution"]
  node_task_action["TaskAction API"]
  node_reconciler["Action reconciler"]
  node_plugin_registry["Plugin registry<br/>[registry.go]"]
  node_plugin_manager["Kubernetes plugin manager<br/>[plugin_manager.go]"]
  node_task_plugins["Task plugins"]
  node_plugin_state["Plugin state<br/>[state_manager.go]"]
end

subgraph group_data["Data services"]
  node_cache_api["Cache service<br/>[service.go]"]
  node_cache_manager["Cache manager<br/>[manager.go]"]
  node_cache_repos["Cache repositories<br/>[repository.go]"]
  node_cache_db[("Cache metadata<br/>[cached_output.go]")]
  node_dataproxy["Data proxy"]
  node_data_translation["Literal translation<br/>[translator.go]"]
  node_copilot["Copilot transfer<br/>[upload.go]"]
end

subgraph group_platform["Platform APIs"]
  node_events_api["Events proxy"]
  node_auth_api["Auth metadata"]
end

subgraph group_serving["Apps and actions"]
  node_app_api["App service<br/>[app_service.go]"]
  node_app_logs["App logs"]
  node_actions_api["Actions service<br/>[actions_service.go]"]
end

node_task_client(("Task client"))
node_kubernetes["Kubernetes API"]
node_blob_storage[("Blob storage")]
node_backend_client(("Backend client"))
node_external_auth["External auth server"]

node_task_client -->|"creates"| node_task_action
node_task_action -->|"reconciles"| node_reconciler
node_reconciler -->|"dispatches via"| node_plugin_registry
node_reconciler -->|"persists state"| node_plugin_state
node_reconciler -->|"reads and updates"| node_kubernetes
node_plugin_manager -->|"manages resources"| node_kubernetes
node_plugin_manager -->|"checks plugin phase"| node_task_plugins
node_backend_client -->|"requests cache"| node_cache_api
node_cache_api -->|"handles requests"| node_cache_manager
node_cache_manager -->|"reads and writes"| node_cache_repos
node_cache_repos -->|"stores metadata"| node_cache_db
node_backend_client -->|"requests data"| node_dataproxy
node_dataproxy -->|"translates literals"| node_data_translation
node_dataproxy -->|"accesses data"| node_blob_storage
node_copilot -->|"uploads data"| node_blob_storage
node_backend_client -->|"manages apps"| node_app_api
node_backend_client -->|"requests logs"| node_app_logs
node_backend_client -->|"invokes actions"| node_actions_api
node_backend_client -->|"sends events"| node_events_api
node_backend_client -->|"requests metadata"| node_auth_api
node_auth_api -.->|"fetches metadata"| node_external_auth

click node_task_action "https://github.com/flyteorg/flyte/blob/main/executor/api/v1/taskaction_types.go"
click node_reconciler "https://github.com/flyteorg/flyte/blob/main/executor/pkg/controller/taskaction_controller.go"
click node_plugin_registry "https://github.com/flyteorg/flyte/blob/main/executor/pkg/plugin/registry.go"
click node_plugin_manager "https://github.com/flyteorg/flyte/blob/main/executor/pkg/plugin/k8s/plugin_manager.go"
click node_task_plugins "https://github.com/flyteorg/flyte/tree/main/flyteplugins/go/tasks/plugins"
click node_plugin_state "https://github.com/flyteorg/flyte/blob/main/executor/pkg/plugin/state_manager.go"
click node_cache_api "https://github.com/flyteorg/flyte/blob/main/cache_service/service/service.go"
click node_cache_manager "https://github.com/flyteorg/flyte/blob/main/cache_service/manager/manager.go"
click node_cache_repos "https://github.com/flyteorg/flyte/blob/main/cache_service/repository/repository.go"
click node_cache_db "https://github.com/flyteorg/flyte/blob/main/cache_service/repository/impl/cached_output.go"
click node_dataproxy "https://github.com/flyteorg/flyte/blob/main/dataproxy/service/dataproxy_service.go"
click node_data_translation "https://github.com/flyteorg/flyte/blob/main/dataproxy/translator.go"
click node_copilot "https://github.com/flyteorg/flyte/blob/main/flytecopilot/data/upload.go"
click node_app_api "https://github.com/flyteorg/flyte/blob/main/app/service/app_service.go"
click node_app_logs "https://github.com/flyteorg/flyte/blob/main/app/service/app_logs_service.go"
click node_actions_api "https://github.com/flyteorg/flyte/blob/main/actions/service/actions_service.go"
click node_events_api "https://github.com/flyteorg/flyte/blob/main/events/service/events_proxy_service.go"
click node_auth_api "https://github.com/flyteorg/flyte/blob/main/runs/service/auth_metadata_service.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_task_action,node_reconciler,node_plugin_registry,node_plugin_manager,node_task_plugins,node_plugin_state,node_backend_client toneBlue
class node_cache_api,node_cache_manager,node_cache_repos,node_cache_db,node_dataproxy,node_data_translation,node_copilot,node_blob_storage toneAmber
class node_events_api,node_auth_api,node_kubernetes,node_external_auth toneMint
class node_app_api,node_app_logs,node_actions_api,node_task_client toneRose
```

## Components

### Task execution

- [TaskAction API](https://github.com/flyteorg/flyte/blob/main/executor/api/v1/taskaction_types.go): `executor/api/v1/taskaction_types.go`
- [Action reconciler](https://github.com/flyteorg/flyte/blob/main/executor/pkg/controller/taskaction_controller.go): `executor/pkg/controller/taskaction_controller.go`
- [Plugin registry](https://github.com/flyteorg/flyte/blob/main/executor/pkg/plugin/registry.go): `executor/pkg/plugin/registry.go`
- [Kubernetes plugin manager](https://github.com/flyteorg/flyte/blob/main/executor/pkg/plugin/k8s/plugin_manager.go): `executor/pkg/plugin/k8s/plugin_manager.go`
- [Task plugins](https://github.com/flyteorg/flyte/tree/main/flyteplugins/go/tasks/plugins): `flyteplugins/go/tasks/plugins`
- [Plugin state](https://github.com/flyteorg/flyte/blob/main/executor/pkg/plugin/state_manager.go): `executor/pkg/plugin/state_manager.go`

### Data services

- [Cache service](https://github.com/flyteorg/flyte/blob/main/cache_service/service/service.go): `cache_service/service/service.go`
- [Cache manager](https://github.com/flyteorg/flyte/blob/main/cache_service/manager/manager.go): `cache_service/manager/manager.go`
- [Cache repositories](https://github.com/flyteorg/flyte/blob/main/cache_service/repository/repository.go): `cache_service/repository/repository.go`
- [Cache metadata](https://github.com/flyteorg/flyte/blob/main/cache_service/repository/impl/cached_output.go): `cache_service/repository/impl/cached_output.go`
- [Data proxy](https://github.com/flyteorg/flyte/blob/main/dataproxy/service/dataproxy_service.go): `dataproxy/service/dataproxy_service.go`
- [Literal translation](https://github.com/flyteorg/flyte/blob/main/dataproxy/translator.go): `dataproxy/translator.go`
- [Copilot transfer](https://github.com/flyteorg/flyte/blob/main/flytecopilot/data/upload.go): `flytecopilot/data/upload.go`

### Platform APIs

- [Events proxy](https://github.com/flyteorg/flyte/blob/main/events/service/events_proxy_service.go): `events/service/events_proxy_service.go`
- [Auth metadata](https://github.com/flyteorg/flyte/blob/main/runs/service/auth_metadata_service.go): `runs/service/auth_metadata_service.go`

### Apps and actions

- [App service](https://github.com/flyteorg/flyte/blob/main/app/service/app_service.go): `app/service/app_service.go`
- [App logs](https://github.com/flyteorg/flyte/blob/main/app/service/app_logs_service.go): `app/service/app_logs_service.go`
- [Actions service](https://github.com/flyteorg/flyte/blob/main/actions/service/actions_service.go): `actions/service/actions_service.go`

### Other components

- **Task client**
- **Kubernetes API**
- **Blob storage**
- **Backend client**
- **External auth server**

## Connections

- Task client → TaskAction API: creates
- TaskAction API → Action reconciler: reconciles
- Action reconciler → Plugin registry: dispatches via
- Action reconciler → Plugin state: persists state
- Action reconciler → Kubernetes API: reads and updates
- Kubernetes plugin manager → Kubernetes API: manages resources
- Kubernetes plugin manager → Task plugins: checks plugin phase
- Backend client → Cache service: requests cache
- Cache service → Cache manager: handles requests
- Cache manager → Cache repositories: reads and writes
- Cache repositories → Cache metadata: stores metadata
- Backend client → Data proxy: requests data
- Data proxy → Literal translation: translates literals
- Data proxy → Blob storage: accesses data
- Copilot transfer → Blob storage: uploads data
- Backend client → App service: manages apps
- Backend client → App logs: requests logs
- Backend client → Actions service: invokes actions
- Backend client → Events proxy: sends events
- Backend client → Auth metadata: requests metadata
- Auth metadata → External auth server: fetches metadata
