Before you start
Delete with the CLI
Find the handle and saved profile with List agents, then replace both values:agents delete deletes the agent at Relay, then removes its saved token from this computer and keeps the rest of the profile. --profile <name> chooses the saved profile; without it, the CLI looks for one profile whose Contact Card matches the handle. A confirmed deletion with matching local cleanup returns:
Delete through the API
CallDELETE /v1/agents/{handle} with the handle in the path and its own token in the Authorization: Bearer $RELAY_AGENT_TOKEN header. The SDK method is relay.agents.delete(handle). Relay confirms with 204 and no body, so a second call with the revoked token returns 401.
Neither the CLI nor the SDK retries a deletion. The path and header rules are in the Delete an agent API reference.

