Hi everyone. I have a question and was wondering i...
# prefect-community
n
Hi everyone. I have a question and was wondering if anyone has advice on the best way to approach programmatically starting a prefect agent when we want to execute a job vs having the agent permanently running?... Thanks so much 🙌
👍 1
m
Hi Nabeel! You can start agent this way(example for ECS):
Copy code
from prefect.agent.ecs.agent import ECSAgent
    
AGENT = ECSAgent(
        cluster="",
        task_role_arn="",
        ...
    )
AGENT.start()
This is API reference for agent.
n
Hi @Mariia Kerimova... Thanks so much! Really appreciate the help 🙂