AI agent helps prepare synchrotron X-ray experimental measurements, paving the way for autonomous operation