Log in to the Dialogflow CX console by going to https://dialogflow.cloud.google.com/cx/.
Select the project of the desired agent and go to the agents page.
You can enter the agents page by selecting the agent and by clicking the top button Agents > View all agents.
Click the options menu for the desired agent in click Copy name.
More details at https://cloud.google.com/dialogflow/cx/docs/quick/api#detect-intent-drest.