You may have already found the solution, but just for everyone else, here is a solution I came up with.
First, I tried using various remote commands via ePO API (system.find for example), but there wasn't an option for Agent GUID. This option does not work for this scenario..
Secondly, the epo command for system.findGroups did not provide the full assignment path of the group. It only returns the last group (e.g., returns Windows instead of My Organization\Servers\Windows). This option also does not work for this scenario.
Finally, I logged into the ePO console and attempted to create a query that I could call via persistent query API, however, the query filter doesn't allow me to choose Agent GUID as an option - it's not even there. Still, this option doesn't work for this scenario.
In the end, I was forced to learn how to write an s-expression, which allowed me to query the ePO database using language similar to SQL. Here is what worked for me.
https://localhost:8443/remote/core.executeQuery?target=EPOLeafNode&:output=terse&select=(select EPOLeafNode.AgentGUID EPOBranchNode.NodeTextPath2)&where=(eq EPOLeafNode.AgentGUID "6172805E-CB3D-11E8-1DD0-080027ED3369")&order=(order(desc EPOLeafNode.AgentGUID))