do? It's unclear from documentation and src code, which seems to say it runs an Agent from inside a Flow, which might be confusing since I was under the impression that Agent runs Flows, not the other way around.
Prefect Cloud is your orchestration layer or orchestration API telling agents what to do, when, and how.Agents are part of your execution layer, they are polling the orchestration API for work, executing the work, and reporting the state of it to the orchestration API.I don't think it's helpful for you to dive deep into how a flow run gets deployed to an agent under the hood. The best way when you're getting started is to start writing your flows and deploy them.
and you shouldn't start an agent from inside the flow because the agent must already exist so that it can pick up a flow runUsually here is how it works. You start by writing your flow - yourflow.py:
from prefect import task, Flow
with Flow("hello") as flow:
hw = hello_world()