A multi-agent system for parametric CAD model creation

We propose MEDA - a multi-agent system (MAS) emulating the human like planning, coding, executing and reviewing for autonomous parametric CAD model generation by harnessing the coding, reasoning and multi-modal capabilities of MLLM (Multi-modal Large Language Model) like GPT-4o. In our architecture, Design Expert plans the CAD modeling process reasoning upon the functions and methods available in the CadQuery library with appropriate positioning of features using coordinates and equations for poor spatial reasoning of the LLM. The CAD Script Writer writes the Python Script based on the plan generated by the Design Expert. This code is executed by the Executor which is powered by the local command line and provides execution logs to Script Execution Reviewer for escalating CAD Image Reviewer in case of successful execution or CAD Script Writer (or Design Expert) in cas of execution failure. The CAD Image Reviewer is powered by the MLLM through tool calling to evaluate the generated CAD based on the multimodal capability of the MLLM to analyse the image of the generated CAD.
We compare our multi-agent architecture MEDA with recent state-of-the-art CAD generation framework CADCodeVerify across three CAD evaluation metrics and compilation rate as shown in the table below.
Table: Comparison of MEDA against CadCodeVerify
| Framework | MLLM used | Point Cloud dist. ↓ | Hausdorff dist. ↓ | IoGT ↑ | Compile Rate ↑ |
|---|---|---|---|---|---|
| MEDA | GPT-4o | 0.0555 (0.095) | 0.2628 (0.401) | 0.9413 (0.0275) | 99% |
| CADCodeVerify | GPT-4 | 0.127 (0.135) | 0.419 (0.356) | 0.944 (0.028) | 96.5% |
git clone https://github.com/AnK-Accelerated-Komputing/MEDA.git
cd MEDA-
Using Conda
conda env create -f environment.yml conda activate MEDA
-
Using pip
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` pip install -r requirements.txt
-
Create a
.envfile in the root directory with the following content:GEMINI_API_KEY='your_gemini_api_key' GROQ_API_KEY='your_groq_api_key' AZURE_API_KEY='your_azure_api_key' AZURE_OPENAI_BASE='your_azure_openai_base_url' -
Alternatively, you can export them directly in your shell:
export GEMINI_API_KEY='your_gemini_api_key' export GROQ_API_KEY='your_groq_api_key' export AZURE_API_KEY='your_azure_api_key' export AZURE_OPENAI_BASE='your_azure_openai_base_url'
- For command line application:
python main.py
- For streamlit app:
streamlit run streamlitapp.py
You can insert the api key for different models with streamlit app. Then, follow the on-screen instructions to interact with MEDA.
Our paper is accepted to IDETC 2025. More details to follow.
If you use this in your work, please consider citing the following publications.
@inproceedings{MEDA2025,
author = {Nirmal Prasad Panta and Saugat Kafley and Rujal Acharya and Sashank Parajuli and Dikshya Parajuli and Prince Panta and Saroj Belbase and Sudikshya Pant and Amit Regmi and Akio Tanaka and Christopher McComb},
title = {{MEDA: A Multi-Agent System for Parametric CAD Model Creation}},
booktitle = {Proceedings of the ASME 2025 International Design Engineering Technical Conferences
and Computers and Information in Engineering Conference (IDETC/CIE 2025)},
year = {2025},
address = {Anaheim, CA, USA},
paperid = {IDETC2025-163946},
publisher = {American Society of Mechanical Engineers (ASME)},
doi = {10.1115/DETC2025-163946}
url = {https://doi.org/10.1115/DETC2025-163946}
}
