https://prefect.io logo
v

Vipul

01/08/2021, 3:27 PM
I am trying to setup a project with Prefect and I do have setup and teardown process. I could register the flow and project during the setup and could delete the project during teardown but I am not sure how can I remove the entry for Prefect Agent from Prefect Server. Any suggestion? Thanks
n

nicholas

01/08/2021, 3:37 PM
Hi @Vipul I'm not completely sure what you mean, are you running the Agent in a container? As a Python script/from the CLI? You should be able to send an interruption signal (
Ctrl+C
/
Cmd+C
) to the Agent process at any time to stop it.
v

Vipul

01/08/2021, 4:02 PM
Yes, that is correct. I am able to stop the agent using the Supervisor but the point I am trying to make is that in Prefect Server UI, I could still see the Agent entry and it is marked as not reachable. I was wondering when I do teardown, I should not see any entry even in Prefect UI. Am I making sense to you? Thanks
n

nicholas

01/08/2021, 4:08 PM
Got it - you should be able to remove the agent either with the
Remove
or
Clean Up
buttons in the UI or with the
delete_agent
mutation in GraphQL.
v

Vipul

01/08/2021, 4:17 PM
I see, let me read about delete_agent mutation as I would like to do it as part of teardown process
Thanks Nicholas
n

nicholas

01/08/2021, 4:22 PM
Yup! Let me know if you have any questions about it