Skip to main content

Research toolkit for LLM-enabled antenna modeling with CST and HFSS

Project description

LEAM

LEAM is an open-source research toolkit for LLM-enabled antenna modeling. It is the public codebase accompanying the paper Large Language Model-Based Intelligent Antenna Design System and focuses on the workflow layer between antenna intent and simulator-facing artifacts for CST and HFSS.

LEAM provides:

  • CST-oriented prompt and VBA generation tools
  • HFSS-oriented prompt and PyAEDT script generation tools
  • A Windows desktop workflow UI for step-by-step, human-in-the-loop modeling

LEAM is designed for research demonstration, transparent workflow inspection, and practical antenna engineering support. It does not bundle CST, HFSS, or AEDT, and it does not replace simulator validation or engineering review.

Quick Start

LEAM Desktop currently targets Windows with Python 3.11.

You need:

  • Windows
  • Python 3.11
  • an OpenAI API key
  • at least one local simulator install:
    • CST Studio Suite for CST workflows
    • Ansys Electronics Desktop for HFSS workflows

Normal desktop path:

  • no virtual environment
  • no separate leam-configure step
  • no manual CST/HFSS path setup unless auto-detection fails

Open PowerShell and run:

pip install leam
$env:OPENAI_API_KEY = "your_api_key_here"
leam-desktop

pip install leam now includes the desktop UI and the HFSS Python dependency in the base package.

If you prefer the shortest mental model, the setup is:

  1. Install leam
  2. Set OPENAI_API_KEY
  3. Start leam-desktop

If your machine has multiple Python versions installed, use:

py -3.11 -m pip install leam

If leam-desktop is not on your PATH yet, use:

py -3.11 -m leam.desktop

If you add OPENAI_API_KEY through the Windows "Environment Variables" settings instead, close and reopen PowerShell and LEAM Desktop so the new value is picked up.

What LEAM Checks On Startup

When leam-desktop starts, LEAM:

  • reads configuration from LEAM_CONFIG, if set, otherwise from the default user config file, typically ~/.leam/config.json
  • auto-detects local CST and HFSS installs and saves detected paths when needed
  • does not create an empty config file when no local simulator install is detected
  • bootstraps the CST Python libraries automatically from the resolved local CST install
  • checks whether HFSS Python support is available through ansys.aedt.core
  • keeps local simulator execution disabled by default through allow_unsafe_execution: false

You do not need to run leam-configure before the first desktop launch.

If Launch Is Blocked

LEAM Desktop requires at least one usable local backend before you can create or open a workspace.

If startup is blocked:

  1. Confirm that CST Studio Suite or Ansys Electronics Desktop is installed locally.

  2. If HFSS is installed but Python support is missing, rerun:

    pip install leam
    
  3. Restart LEAM Desktop.

  4. If your simulator is installed in a non-standard location, pin the exact CST/HFSS path in ~/.leam/config.json or use leam-configure as an advanced fallback.

Desktop Workflow

LEAM Desktop is a workspace-based tool:

  • workspaces are stored under the user LEAM workspace root, typically ~/.leam/workspaces
  • recent-workspace metadata is stored under the user LEAM data directory, typically ~/.leam
  • missing backends are disabled in the UI
  • if neither backend is available, the launchpad blocks entry into the workspace flow
  • new workspaces and built-in examples include the execution branch by default, but actual CST/HFSS execution stays blocked unless you explicitly enable unsafe execution

Runtime execution remains intentionally separate from generation. LEAM can generate CST VBA or HFSS Python artifacts without running them locally.

To enable local execution for one PowerShell session:

$env:LEAM_ALLOW_UNSAFE_EXECUTION=1

Keep execution enabled only when you trust the prompts, attachments, and generated artifacts involved in the run.

Advanced Setup

Most users can skip this section.

leam-configure is still available for advanced and troubleshooting workflows. Use it only when normal desktop startup still cannot detect the simulator you already installed, or when you want to manage multiple config files explicitly.

Helpful commands:

leam-configure --dry-run
leam-configure --print-example

For pinned-version workflows, manual config editing, and multi-config setups, see the advanced setup sections in Getting Started.

Documentation

Python API

If you want to use LEAM as a Python library instead of the desktop app, start with the Python API documentation.

Built-in Examples

LEAM Desktop ships built-in example presets, but not every preset is available in every installation.

  • presets that only need text remain available in wheel installs
  • presets that depend on repository-only assets are shown as unavailable unless those assets exist locally

If you want every example, including asset-backed ones such as the monopole demo, use the source repository checkout.

Links

License

MIT. See LICENSE.

Citation

@inproceedings{wu2025large,
  title={Large Language Model-Based Intelligent Antenna Design System},
  author={Wu, Tao and Fu, Kexue and Hua, Qiang and Liu, Xinxin and Liu, Bo},
  booktitle={20th European Conference on Antennas and Propagation},
  year={2025},
  organization={IEEE}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

leam-0.3.0.tar.gz (164.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

leam-0.3.0-py3-none-any.whl (170.4 kB view details)

Uploaded Python 3

File details

Details for the file leam-0.3.0.tar.gz.

File metadata

  • Download URL: leam-0.3.0.tar.gz
  • Upload date:
  • Size: 164.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for leam-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f12fe42c0a67087ada262ce37d582c1556d091e8ca728eb412c6f7531bfced61
MD5 7ac313d69ddbf4ff9f9f87c9cf74df13
BLAKE2b-256 9086be3974dc8dcd2b654ab7500cae2a01cc398c5514a7d6ad46720498c34141

See more details on using hashes here.

Provenance

The following attestation bundles were made for leam-0.3.0.tar.gz:

Publisher: pypi-publish.yml on TaoWu974/LEAM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file leam-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: leam-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 170.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for leam-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 438e44a61e746a1cec86ac0d4393419f8cb91c0843caa1db09349448b966cfad
MD5 851b4944a3e8b89e97b0e37bc68ddcb6
BLAKE2b-256 f015a6abd9d9c18cbbd4dde83831e4e33e4c06a5a87b2c1ea0b95eaa9d658751

See more details on using hashes here.

Provenance

The following attestation bundles were made for leam-0.3.0-py3-none-any.whl:

Publisher: pypi-publish.yml on TaoWu974/LEAM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page