HI Jakkapan,
What is your starting point? What do you have already?
If you have already done Find User Action with an email address, or some other method to create an agent variable, you can then just to Task.VariableName.AgentId

If you don't already have an agent object but you have the conversationID the agent was involved in
Then you should be able to get the agent ID from the Conversation Detail API
If you don't have a ConversationId
You can get all users with
/api/v2/users
So really depends on your use case here, and where you are starting from.------------------------------
Anton Vroon
------------------------------