COSMO-Agent: Tool-Augmented Agent for Closed-loop Optimization,Simulation,and Modeling Orchestration

Liyuan Deng, Shujian Deng, Yongkang Chen, Yongkang Dai, Zhihang Zhong, Linyang Li, Xiao Sun, Yilei Shi, Huaxi Huang

TL;DR

COSMO-Agent introduces a tool-augmented reinforcement learning framework that trains Large Language Models (LLMs) to orchestrate the iterative, closed-loop process of industrial design and simulation. By bridging the semantic gap between CAD geometry and CAE physics feedback, a fine-tuned 8B model outperforms massive open-source and proprietary models in finding optimal designs while remaining highly robust to toolchain failures.

What Problem Does This Paper Address?

In modern engineering, designing a functional component is a tedious game of ping-pong between two distinct software ecosystems: Computer-Aided Design (CAD), which defines the parametric geometry of a part, and Computer-Aided Engineering (CAE), which runs physics simulations (like finite element analysis) to check if the part will break under stress.

Currently, automating this closed-loop optimization is incredibly difficult due to the CAD-CAE semantic gap. When a simulation reveals that a part deforms too much, an engineer must manually translate that high-dimensional physics feedback into low-dimensional, structured edits to the original CAD parameters. Furthermore, real-world engineering toolchains are notoriously brittle—meshing errors, regeneration breakdowns, and solver non-convergence happen stochastically. Standard optimization algorithms struggle with these discrete, long-horizon decision-making problems and tool failures, while vanilla LLM agents quickly break down when a tool returns an error.

Methods

The authors propose COSMO-Agent (Closed-loop Optimization, Simulation, and Modeling Orchestration), casting the entire CAD-CAE iteration process as an interactive reinforcement learning (RL) environment.

COSMO-Agent Framework

Key methodological innovations include:

  1. MCP Tool Integration: Using the Model Context Protocol (MCP), they expose a unified toolset to the agent: a CAD Generator (via CadQuery), a CAE Solver (via FreeCAD/CalculiX), a Result Extractor (to parse field outputs into scalar metrics like max stress and displacement), and a Cost Calculator.
  2. GRPO Training: They fine-tune a Qwen3-8B backbone using Generalized Reinforcement Policy Optimization (GRPO), allowing the model to learn optimal parameter-tuning strategies through multi-round trial and error.
  3. Multi-Constraint Reward Design: To prevent the model from "reward hacking" (e.g., outputting un-executable but numerically favorable designs), the reward function evaluates the entire rollout trajectory log. It rewards constraint satisfaction ($R_{cons}$), penalizes redundant tool calls after a valid design is found ($R_{stop}$), and enforces structured JSON output validity ($R_{fmt}$).

Datasets

Because no comprehensive benchmark existed for this specific task, the authors created a new, industry-aligned dataset:

  • Scale & Variety: ~20,000 executable CAD-CAE tasks covering 25 common industrial component categories (e.g., flat plate flanges, triangular brackets, I-beam cantilever beams).
  • Splits: 20 categories are used for training and testing, while 5 categories are completely held out to evaluate generalization performance on unseen geometric templates.
  • Target Generation: Constraints (stiffness, strength, and cost) were synthetically generated using randomized reductions (5% to 30%) from ground-truth simulations to ensure realistic difficulty.

Key Insights and Ideas

  • Rollout Logs Prevent "Cheating": A major insight from their ablation studies was the importance of the rollout-log-based reward. When the authors tried rewarding the model based only on a final verification step, the model learned to stop calling tools entirely and simply "guessed" plausible-looking JSON answers. Basing the reward on the actual tool-interaction history forced the model to learn the actual "call tools $\rightarrow$ read feedback $\rightarrow$ iterate" loop.
  • Small Models Can Beat Giants: By using targeted RL, the 8B COSMO-Agent significantly outperformed massive models like the 236B Intern-S1 and state-of-the-art commercial models like Gemini-3-Flash. This proves that task-specific interaction logic is often more valuable than raw parameter scale for engineering automation.
  • True Process Generalization: COSMO-Agent didn't just memorize the shapes it was trained on. Because it learned the strategy of engineering optimization, its performance held steady when tested on completely unseen component categories.

Key Results

COSMO-Agent achieved state-of-the-art performance across the board on the evaluation benchmark:

  • Full Success Rate (FSR): Achieved 74.5% on the test set, vastly outperforming the strongest open-source baseline (Intern-S1 at 32.0%) and beating the best closed-source model (Gemini-3-Flash at 67.5%).
  • Generalization: On the unseen-category set, COSMO-Agent maintained a 75.0% FSR, proving its adaptability to new engineering tasks.
  • Efficiency: It required an Average Tool Call (ATC) rate of just 6.72 per instance, making it far more interaction-efficient than Gemini (9.32) or Claude-Sonnet-4.5 (11.25).
  • Formatting Stability: Achieved a 100% Model Extract Output (MEO) rate, meaning it never failed to produce a valid, parsable JSON structure.
Visualized Inference Case

Limitations and Future Work

While COSMO-Agent marks a major step forward, the authors note several areas for expansion:

  • Single-Component Focus: The current framework optimizes individual parts. Future work will need to address multi-part assemblies, contact mechanics, and joint constraints.
  • Simplified Physics: The current dataset relies on linear static solving. Real-world applications will require extending the agent's capabilities to non-linear materials and coupled multi-physics (e.g., thermal-structural analysis).
  • Action Space Scaling: The agent currently operates on relatively low-dimensional parametric edits; scaling to larger action spaces and tighter iteration budgets remains an open challenge.

Summary updated

BibTeX
@misc{deng2026cosmo,
  author = {Liyuan Deng and Shujian Deng and Yongkang Chen and Yongkang Dai and Zhihang Zhong and Linyang Li and Xiao Sun and Yilei Shi and Huaxi Huang},
  title = {{COSMO-Agent: Tool-Augmented Agent for Closed-loop Optimization,Simulation,and Modeling Orchestration}},
  year = {2026},
  eprint = {2604.05547},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.05547},
}
Figure