Is there a way to get the agent to only run flows ...
# ask-community
j
Is there a way to get the agent to only run flows from a particular project?
m
one way is to make use of labels when registering your flow and deploying the agent https://docs.prefect.io/orchestration/execution/overview.html#labels
j
Is there a way to do it directly based on the project?
m
I don’t think so, labels are at the flow-level as far as I know - maybe someone on the prefect team can shed more light about this
k
Yes label is the only mechanism for this.
j
What exactly are projects for?
k
I see them used as a separator for staging and prod flows (dev project, project). I’ve also seen them used as logical groupings of flows. When you go to the UI and look at the health of your flows, you can do it on a per project view.
j
But they can't be used for that. The reason I've had to resort to labels is because my prod agent would otherwise run staging flow-runs on my prod Dask cluster.
k
Yeah that is exactly what labels are provided for. Projects are a logical grouping for the UI (and also to query flows)