Hello,
Currently, unfortunately, there's a problem with this task via network, but we are going to fix it in the version 1.5.3 update.
It should work in the following way:
path = '//STORAGE/datasets/processing/test.psx'
root = '//STORAGE/datasets/'
paths = ['//STORAGE/datasets/training/DSC00580.JPG', '//STORAGE/datasets/training/DSC00581.JPG', '//STORAGE/datasets/training/DSC00584.JPG']
doc = Metashape.Document()
doc.open(path) #loading existing project
chunk = doc.chunk #accessing existing empty chunk
network_tasks = list()
task = Metashape.Tasks.AddPhotos()
paths2 = [p.replace(root, "/") for p in paths] #switching to relative paths
task.filenames = ";".join(paths2) #modifying the list with semi-column delimiter
n_task = Metashape.NetworkTask()
n_task.name = task.name
n_task.params = task.encode()
n_task.frames.append((chunk.key, 0))
network_tasks.append(n_task)
client = Metashape.NetworkClient()
client.connect("192.168.0.2") #server ip
batch_id = client.createBatch(path[len(root):], network_tasks)
client.resumeBatch(batch_id)