This paper introduces a transferable automatic tuning framework for the common two‑level decision process in machine learning: an expert first selects a method class, then manually chooses critical components. The framework leverages a multi‑agent large language model (LLM) with three roles—analyst, coder, and recorder—and includes an experiment log and a sandboxed execution environment. Unlike systems that globally optimize entire scripts or search discrete architecture spaces, our approach operates in an open yet semantically narrow space, generating code only for the specified components while keeping the overall network structure unchanged.\ \ The framework is validated on two families of tasks: classification with a correlation‑learning spiking neural network, and solving high‑order differential equations with physics‑informed neural networks (PINN). Five sub‑tasks are covered: spiking classification on MNIST and Digits, and boundary‑value problems for the generalized nonlinear Schrödinger equation (GNLSE) and the Kuramoto–Sivashinsky (KS) equation. Results show accuracy gains of $13\%$ (MNIST) and $6\%$ (Digits); error against the analytical single‑soliton solution reduced by roughly $2.5\times10^3$ times; invariant‑preservation error in a Gaussian‑perturbed GNLSE run dropped by about $325$ times and more than $100$ times on average over repeated initializations; and mass drift in the KS problem decreased $14$‑fold.\ \ In summary, the framework can automatically tune key components across tasks of different nature without altering its internal architecture.\ \ Review