Is there anyway when opening a ticket from an agent the ticket details will automatically get the agent information instead of user on behalf form?
No. Agents do not own tickets, Users do.