Hey all - I can’t remove one of our agents (k8s) f...
# ask-community
k
Hey all - I can’t remove one of our agents (k8s) from the UI. What is the mutation to do this with the API?
a
@Klemen Strojan are you trying to stop the agent from the UI, or only remove a UI tile of an old agent that has already been stopped?
k
The later - remove the UI tile of an old agent.
cc @Anna Geller
a
Can you try the Clean up icon?
it usually takes some time to clean up
and now:
can you try that and share a screenshot? I could dig into GraphQL but with UI is way easier
k
Sure:
This is what I get with remove:
Clean-up will come in handy after 12 hours.
a
interesting! let me check it
Do you know the agent id? here is delete mutation:
Copy code
mutation DeleteAgent($agentId: UUID!) {
  delete_agent(input: { agent_id: $agentId }) {
    success
  }
}
ok, so you can get the agent ID this way:
Copy code
query Agents {
  agent {
    id
    agent_config_id
    core_version
    created
    name
    labels
    last_queried
    type
  }
}
this should work
k
This is what I get:
a
@Klemen Strojan can you share the output of “prefect diagnostics”?
I’m creating an issue for it
@Klemen Strojan if you can share your “prefect diagnostics”, I’ll update it here https://github.com/PrefectHQ/prefect/issues/5216
k
How can I share my prefect diagnostics?
a
you run this command in your terminal:
Copy code
prefect diagnostics
and share the output here
k
Copy code
{
  "config_overrides": {
    "context": {
      "secrets": false
    }
  },
  "env_vars": [
    "PREFECT__FLOWS__CHECKPOINTING"
  ],
  "system_information": {
    "platform": "macOS-10.16-x86_64-i386-64bit",
    "prefect_backend": "cloud",
    "prefect_version": "0.15.10",
    "python_version": "3.8.12"
  }
}
🙏 1
Thanks for your help! I’ll be opening a new issue for K8s soon. It’s a weird day I guess.