def METHOD_NAME(agent_name: Optional[str] = None,
                      modernize_project_name: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      subscription_id: Optional[str] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetMigrateAgentResult:
    """
    Gets the details of the modernizeProject agent.
    :param str agent_name: MigrateAgent name.
    :param str modernize_project_name: ModernizeProject name.
    :param str resource_group_name: Name of the Azure Resource Group that project is part of.
    :param str subscription_id: Azure Subscription Id in which project was created.
    """
    __args__ = dict()
    __args__['agentName'] = agent_name
    __args__['modernizeProjectName'] = modernize_project_name
    __args__['resourceGroupName'] = resource_group_name
    __args__['subscriptionId'] = subscription_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('azure-native:migrate/v20220501preview:getMigrateAgent', __args__, opts=opts, typ=GetMigrateAgentResult).value
    return AwaitableGetMigrateAgentResult(
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        properties=pulumi.get(__ret__, 'properties'),
        system_data=pulumi.get(__ret__, 'system_data'),
        tags=pulumi.get(__ret__, 'tags'),
        type=pulumi.get(__ret__, 'type'))