For Webchat the name displayed when an agent sends a message is the name on the Name field of the account, "Fred" in the example below.
This should be set to however users want the name displayed, typically for webchat a first name or nickname.
For Insights purposes the Username can be used to identify the relevant user.