Jehan Abduljabbar

09/13/2022, 4:07 PM
In prefect 1, when starting a local agent from a container, I pass prefect agent local start -k <api key value>. Is doing the same thing possible for prefect 2? Reading the docs, it doesn't look that passing an api key is an option for agent start.

Mason Menges

09/13/2022, 4:20 PM
Hey @Jehan Abduljabbar for prefect 2 you would set the API key and Cloud URL in your profile settings, either manually you can follow the process in this discourse article, or automatically with this command
prefect cloud login --key api_keyxxxxxxxxxxxxxxxx
from there when you're starting an agent you would just specify a workqueue the agent is tied to with this command this discourse article does a good job of explaining some of the major differences
prefect agent start -q "workqueue-name"
🙌 1