ASAP: an Agentic Solution to Auto-optimize Performance of Large-Scale LLM Training