This release is a pre-release and may not be stable for production use.
AgentFEM
AgentFEM is an open-source platform for AI-native finite-element computing. It turns finite-element simulation from backend-oriented solver code into readable, reusable scientific workflows that humans and AI agents can build, inspect, run, and improve together.
AgentFEM was initiated by Haoming Luo and open-sourced on GitHub in July 2026.
Its immediate goal is practical: become a dependable and unusually usable open-source FEM tool for selected engineering analyses. Its longer-term proposition is that humans and increasingly capable AI agents will need a shared, inspectable way to build, check, communicate, and accumulate finite-element knowledge.
Why AgentFEM
-
AI-Native FEM — finite-element software designed from the start for agents to construct, operate, and automate naturally, without replacing deterministic mechanics and numerical computation with AI.
-
Humans and Agents, Together — people and AI agents work through the same readable materials, regions, loads, solution steps, and results. AI work remains understandable, editable, and reusable by humans.
-
Results You Can Check — convergence, failures, required outputs, benchmark comparisons, and applicability limits remain attached to the result instead of being separated from the simulation that produced it.
-
One Run or Thousands — the same model can support an individual analysis, parameter campaigns, parallel execution, restartable studies, and reproducible data generation.
-
Simulation to Learning — results can flow into scientific datasets, PyTorch, surrogate models, and high-fidelity fallback without rebuilding the workflow around separate glue scripts.
-
Open at Every Layer — users can begin with a clear engineering workflow and still reach operators, UFL, DOLFINx, PETSc, and custom constitutive models whenever needed.
Our conviction: AI will make code abundant, but trustworthy scientific structure will remain scarce. AgentFEM is being built so that finite-element knowledge can be created, checked, communicated, and accumulated by humans and AI agents together.
AI-native does not mean replacing finite-element computation with AI. It means making the complete FEM workflow naturally operable by agents while keeping it clear, inspectable, and controllable for humans.
What Works Today
| Area | Implemented path |
|---|---|
| Engineering workflow | Study, model, regions, fields, materials, loads, constraints, steps, results, and concise model summaries |
| FEM procedures | Linear and thermoelastic statics, implicit heat transfer, Newmark/generalized-alpha dynamics, and central-difference explicit dynamics |
| Nonlinear solids | Compressible Neo-Hookean finite strain and a 3D small-strain J2 path with quadrature state, consistent tangent, cyclic loading, cutback, energy histories, and serial restart |
| Meshes and constraints | Structured and XDMF meshes, optional Gmsh and meshio routes, Abaqus C3D10 import, equation constraints, and distributed periodic workflows |
| Results and trust | Unified fields, quantities, histories, artifacts, progress events, checkpoints, Golden benchmarks, and exploratory/engineering/release quality policies |
| Simulation and learning | Reproducible campaigns, scientific datasets, PyTorch adapters, transparent surrogate baselines, validation thresholds, applicability guards, and FEM fallback |
Power-law, Arrhenius, Kachanov--Rabotnov, and Sinh creep relations are currently verified material-point tools. Modified theta is a curve-projection tool, and stress-life fatigue is a postprocessor. AgentFEM keeps these maturity levels explicit rather than presenting formulas as complete global solvers.
The public workflow remains recognizable to a finite-element user:
Study -> Model -> Mesh/Regions -> Fields -> Materials -> Loads/Constraints
-> Operators -> Step -> Solve -> Results/Verification
Architecture
AgentFEM uses three visible layers:
- Engineering workflow — studies, models, regions, materials, loads, steps, campaigns, and results.
- Finite-element extension layer — reusable operators, weak forms, constitutive laws, constraints, and custom scientific components.
- Numerical kernel — the current FEniCSx/DOLFINx, PETSc, and MPI foundation for assembly, solution, and distributed computation.
The implementation is deliberately FEniCSx-first. Advanced users can descend through every layer, while a narrow adapter boundary and experimental AF-IR records preserve room for future evolution. AF-IR is not presented as a universal simulation language or a neural-network compiler IR.
Install
AgentFEM expects a compatible FEniCSx environment. The recommended route is to create the numerical stack with conda-forge and then install AgentFEM from PyPI:
mamba create -n agentfem-env -c conda-forge \
python=3.11 fenics-dolfinx=0.11 mpich mpi4py petsc4py h5py
mamba activate agentfem-env
python -m pip install --pre agentfem
The 0.2 series is currently a public alpha. --pre opts into this preview;
ordinary pip install agentfem continues to select the latest non-prerelease.
AgentFEM is not yet distributed as a conda-forge package.
Optional integrations remain separate from the Apache-2.0 core:
python -m pip install --pre 'agentfem[mesh-formats]' # Abaqus/NASTRAN/etc.
python -m pip install --pre 'agentfem[gmsh]' # Gmsh model/.msh import
python -m pip install --pre 'agentfem[visualization]'
python -m pip install --pre 'agentfem[ml]' # PyTorch adapters
Gmsh is a separately distributed GPL-licensed optional package and is not
bundled with AgentFEM. Windows users should currently use WSL2. See
INSTALL.md for platform details and development installation.
Quick Start
from mpi4py import MPI
import numpy as np
from agentfem import fields, mesh, models, studies
from agentfem.constitutive import elasticity
study = studies.linear_static(
physics="solid_mechanics",
dimension=2,
assumption="plane_strain",
)
domain = mesh.rectangle(
(0.0, 0.0),
(1.0, 0.2),
(40, 8),
comm=MPI.COMM_WORLD,
cell_type="quadrilateral",
)
model = models.create(study=study, mesh=domain, name="cantilever")
u = model.field(fields.displacement(domain, degree=1))
model.material(
elasticity.isotropic_elastic(
young=210e9,
poisson=0.3,
density=7800,
)
)
left = mesh.boundary(
domain,
lambda x: np.isclose(x[0], 0.0),
name="left",
tag=1,
)
right = mesh.boundary(
domain,
lambda x: np.isclose(x[0], 1.0),
name="right",
tag=2,
)
model.fix(u, on=left, value=0.0)
model.traction(value=(0.0, -1.0e6), on=right)
step = model.linear_static_step(target=u)
result = step.solve_result()
result.verify("engineering").require()
print(model.tree())
print(result)
Run the complete example with:
python examples/static_elasticity_2d.py
Models can be inspected before execution with model.validate(),
model.tree(), and model.manifest(). Experimental AF-IR records can be
written with model.write_ir(...) when a JSON-safe scientific record is
useful.
Release Workflows
static_elasticity_2d.py— the readable beginner FEM path.transient_heat_2d.py— implicit heat transfer with structured progress and XDMF output.wave_packet_inclusion_2d.py— wave propagation with an inclusion, source amplitude, and boundary models.abaqus_c3d10_periodic_cell/— imported quadratic tetrahedra, Abaqus equations, distributed periodicity, Neo-Hookean large deformation, and homogenized output.creep_hot_wall_assessment.py— thermoelastic FEM followed by an explicitly local creep assessment.static_elasticity_surrogate_campaign.py— campaign, accepted dataset, surrogate validation, and FEM fallback.
These examples are executable release assets with numerical contracts; they are not only syntax demonstrations.
Documentation
WORKFLOW.md— the standard modeling sequence.CONCEPTS.md— shared engineering and agent vocabulary.AGENT_GUIDE.md— the entry point for AI agents working with the repository.docs/product_roadmap.md— capability priorities and release gates.docs/nonlinear_solid_architecture.md— the nonlinear-solid platform and quadrature-state contract.docs/results_and_campaigns.md— results, campaigns, datasets, and learning handoff.docs/scientific_verification.md— trust levels, quality policies, convergence studies, and evidence boundaries.
The complete design reference is under docs/, and the generated
static site can be rebuilt with python build_docs.py.
Direction and Scope
AgentFEM is an alpha-stage research and engineering platform, not yet a general-purpose CAE replacement. The near-term priority is depth rather than an inflated feature list: dependable nonlinear solids, thermal and dynamic procedures, practical mesh interoperability, consistent output, and a smooth path from simulation to trustworthy learning data.
The current release does not claim global adaptive creep/damage, portable MPI restart for quadrature material state, general UMAT/UHYPER binary compatibility, arbitrary-mesh automatic neural-operator training, industrial code compliance, or a fully tested native-Windows solver stack. These are visible engineering boundaries and roadmap gates, not hidden fine print.
Citation
If AgentFEM helps your research or engineering work, please cite the project
metadata in CITATION.cff.
title: "AgentFEM: AI-assisted finite-element simulation and agent-readable CAE workflows"
authors:
- family-names: Luo
given-names: Haoming
affiliation: "Materials Department, Xi'an Thermal Power Research Institute (TPRI)"
date-released: 2026-08-03
Author
Haoming Luo is the initiator and maintainer of AgentFEM. His interests include computational mechanics, materials engineering, finite-element simulation, and AI-assisted scientific computing, with education and research experience associated with NWPU, INSA Lyon and Ecole Polytechnique.
The project is also motivated by engineering needs in materials evaluation, defect inspection, and simulation analysis for power-generation equipment.
License
AgentFEM is licensed under the Apache License, Version 2.0. The open-source core can be used in research, education, and commercial settings under that license. Commercial services, validated industrial workflows, hosted products, and proprietary extensions may be developed separately.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentfem-0.2.0a1.tar.gz.
File metadata
- Download URL: agentfem-0.2.0a1.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b99f31913810a0eba9c2d5dc6afe00595838d86bc972b6c790f006e70ff34c6
|
|
| MD5 |
b39f479749d503b5498bf6b134ff4e64
|
|
| BLAKE2b-256 |
d91f47b40349cac3cba80805a69f6a52796804fa6f827e2d3785fdce1c565988
|
Provenance
The following attestation bundles were made for agentfem-0.2.0a1.tar.gz:
Publisher:
publish-pypi.yml on haoming-luo/agentfem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentfem-0.2.0a1.tar.gz -
Subject digest:
0b99f31913810a0eba9c2d5dc6afe00595838d86bc972b6c790f006e70ff34c6 - Sigstore transparency entry: 2334045738
- Sigstore integration time:
-
Permalink:
haoming-luo/agentfem@1a2fd4c65bd2d8f5f1e8a922d2531f23f934a0bf -
Branch / Tag:
refs/tags/v0.2.0a1 - Owner: https://github.com/haoming-luo
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@1a2fd4c65bd2d8f5f1e8a922d2531f23f934a0bf -
Trigger Event:
push
-
Statement type:
File details
Details for the file agentfem-0.2.0a1-py3-none-any.whl.
File metadata
- Download URL: agentfem-0.2.0a1-py3-none-any.whl
- Upload date:
- Size: 304.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23804568b9119be2fff524a8bf67f4b2a8496e999ac82ad1386a7109581db393
|
|
| MD5 |
df9b4d471c6c658a15408a573407ef6b
|
|
| BLAKE2b-256 |
f4226aa7439f6afebdfd21354fadd281b9d40c7e61383249ca0a51dcf121ec62
|
Provenance
The following attestation bundles were made for agentfem-0.2.0a1-py3-none-any.whl:
Publisher:
publish-pypi.yml on haoming-luo/agentfem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentfem-0.2.0a1-py3-none-any.whl -
Subject digest:
23804568b9119be2fff524a8bf67f4b2a8496e999ac82ad1386a7109581db393 - Sigstore transparency entry: 2334045745
- Sigstore integration time:
-
Permalink:
haoming-luo/agentfem@1a2fd4c65bd2d8f5f1e8a922d2531f23f934a0bf -
Branch / Tag:
refs/tags/v0.2.0a1 - Owner: https://github.com/haoming-luo
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@1a2fd4c65bd2d8f5f1e8a922d2531f23f934a0bf -
Trigger Event:
push
-
Statement type: