Skip to content

AgentFEM

AgentFEM is an open-source platform for AI-native finite-element computing. It provides a readable engineering workflow for defining, solving, inspecting, and reusing finite-element models while keeping the numerical formulation and result evidence accessible.

Start here

I want to... Go to...
See what I can build or try a browser demo Explore AgentFEM
Install AgentFEM Getting started
Build a solid, thermal, dynamic, or creep analysis User guide
Reproduce an executable capability Examples
Connect Codex or another compatible agent AgentFEM MCP
Look up an equation, output variable, or function Theory and reference

The public workflow follows the concepts used in an engineering analysis:

Study → Model → Mesh/Regions → Fields → Materials → Loads/Constraints
      → Solution Step → Results/Verification

Quick installation

Windows? Ask your agent to follow the short Windows route, optionally adding “走镜像通道 / use the mirror channel”. It reuses existing WSL, does permitted work, and gives one manual action if blocked. No repository clone is needed. The same copyable agent prompt also works for Linux/macOS; it selects the appropriate platform path.

The recommended conda-forge installation provides AgentFEM and its compatible FEniCSx/PETSc/MPI foundation together:

mamba create -n agentfem-env --override-channels -c conda-forge \
  python=3.11 fenics-dolfinx=0.11 c-compiler cxx-compiler \
  scipy matplotlib-base gmsh python-gmsh agentfem
mamba activate agentfem-env
agentfem doctor

This command includes SciPy, Matplotlib and Gmsh. Additional visualization and machine-learning integrations are described in the installation and platform guide. When the canonical source is slow, ask an agent to "use the mirror channel"; the documented route does not change global conda configuration. On WSL, run agentfem workspace --protect once; the same safe project layout is used by both Mamba installations and the Complete Runtime.

Installation is complete when the environment is ready. A first model is an optional next step: your agent should ask before creating or running it.

First finite-element model

Run the installed cantilever template from your project directory:

agentfem init beam --template static-solid
cd beam
agentfem check
agentfem run --name baseline
agentfem show latest
agentfem verify

Edit case.py to change the model. Results appear under outputs/001-baseline/; open the reported XDMF in ParaView, keeping its HDF5 companion alongside it. The same project runs with or without an AI agent.

The first-project guide explains the files and next steps. For Python modeling details, use the static elasticity example.

Browse by task

Topic Start here
Create and run an installed project Getting started
Linear, nonlinear, and thermoelastic solids Solid mechanics
Steady and transient temperature problems Heat transfer
Structural dynamics, modes, harmonic response, and waves Dynamics and waves
Plasticity, creep, state, and cutback Creep and inelasticity
Meshes, regions, loads, and constraints Model definition
Fields, histories, output, and post-processing Results
Campaigns, datasets, user models, and surrogates Simulation to learning

Current scope

Area Available workflow
Solid mechanics Linear elasticity, thermoelasticity, Neo-Hookean and Mooney--Rivlin finite strain, mixed displacement-pressure hyperelasticity, stateful small-strain J2, and experimental finite-strain J2 with 3D strong/displacement-only affine-MPC plus serial 3D P2/DG0 and 2D plane-strain Q2/DPC1 mixed providers
Heat transfer Steady conduction and implicit transient heat transfer
Dynamics and vibration Newmark/generalized-\(\alpha\) implicit dynamics, central-difference explicit wave propagation, and engineering linear modal and provider-neutral direct harmonic procedures
Time-dependent materials Global isothermal/Arrhenius power-law creep, engineering generalized-Maxwell transient equilibrium, and reviewed material-point creep/damage tools; generalized-Maxwell harmonic coupling remains experimental
Mesh and constraints Structured/XDMF meshes, optional Gmsh and meshio routes, direct Abaqus C3D10H import, equation constraints, and distributed periodic workflows
Results and verification Standard fields, histories, resultants, progress, checkpoints, Golden benchmarks, and explicit quality policies
Simulation and learning Parameter campaigns, scientific datasets, user-model execution, NumPy/PyTorch adapters, surrogate baselines, applicability guards, and FEM fallback

Capabilities with different maturity levels are identified in the relevant guide and example instead of being presented as equally complete.

Theory and reference

Engineering definitions are part of the documentation contract. The theory and conventions page collects the governing equations, kinematic conventions, analysis-procedure distinctions, and links to the detailed material and output definitions. The scientific function reference is generated from reviewed knowledge cards and records formulas, assumptions, tests, benchmarks, consumers, and known limitations.

Use the reference according to the question being asked:

Humans and agents

AI-native does not mean replacing finite-element computation with AI. Humans, scripts, IDEs, future GUIs, and AI agents operate the same public model and structured result contract. Advanced users can still reach UFL, DOLFINx, PETSc, MPI, and custom constitutive implementations when a problem requires a lower layer.

AgentFEM was initiated by Haoming Luo and open-sourced on GitHub in July 2026.