August 05, 2025

Optimize Your Structural Models with an OpenSees AI Agent

Alejandro Duarte Vendries

by Alejandro Duarte Vendries

Building and optimizing structural models can take a lot of time, especially when using traditional FEA software. Most tools are not built for quick geometry changes or running multiple iterations easily. You often need to manage several files, scripts, and results just to test a few options. In this blog, I’ll show you how to speed up model creation and optimization using an AI agent connected to OpenSees and VIKTOR AI, using the optimization of a steel platform as our practical example.
illustration of start now

Start building apps for free

Start now

Challenges structural engineers face optimizing structures

Throughout my career, I have worked on multiple optimization workflows, such as calibrating models with sensor data and reducing cost, weight, and carbon footprint from structural designs. A recurring issue was that traditional software like SAP2000, ETABS, and STAAD.Pro made this process slow and difficult to automate. Especially when you want to modify the structure geometry and change many parameters quickly, it is slow, and these tools do not provide easy ways to store, visualize, or compare optimization outputs, forcing you to do it manually.

Another common pain point is the user interface. These workflows need numerous inputs to manage parametric geometry, analysis options, and optimization settings. The interface quickly becomes cluttered, difficult to use, and hard to scale. Teaching engineers how to get started is time-consuming, and without the correct guidance, mistakes are inevitable.

These limitations make even basic optimization tasks unnecessarily slow. To address them, we break the ideal workflow into five components:

  1. Create and change geometry easily.

  2. Modify cross sections quickly.

  3. Run analyses and post-processing.

  4. Optimize the structure efficiently.

  5. Turn results into clear, actionable recommendations.

To implement this workflow properly, we can integrate four tools.

First, OpenSees, an open-source structural engineering program from UC Berkeley, is fast and works with Python through OpenSeesPy. It lets us build and analyze models quickly, and its speed is ideal for many optimization runs.

Second, the geometry is created parametrically in Python by defining the relevant dimensions, such as length, width, height, number of joists, spacing, truss depth, and member orientation. Once these parameters are set, the model is automatically generated and sent to OpenSees for analysis

Third, we add an AI agent powered by a large language model (LLM). The agent uses tools to create the geometry, build the OpenSees model, run analyses, and manage results. We wrap the parametric geometry and the OpenSees analysis as tools, so the agent calls them based on the user request. Users do not face complex UI inputs, they can just "talk" to the agent in plain English.

Finally, we integrate everything in a web application using VIKTOR. VIKTOR is a low-code platform that allows users to create web applications with simple Python. It offers a complete set of components that make it easy to build, publish, and share custom tools with others.

Keep reading to see how to safely integrate AI into your engineering workflow and how all parts of the workflow fit together.

Optimizing your structural model with an OpenSees agent

Since we are integrating an AI agent into our engineering workflow, it is important to clarify how it will interact with our tools and responsibilities. The agent should support engineering tasks—not replace them. This section explains how to keep the integration safe, practical, and under full control.

Think of the AI agent as a junior engineer: we give it approved tools, teach the method, and keep it within clear limits. It does not make decisions on its own, it follows our rules and reports back. We keep the human in the loop at all times, the engineer defines what the agent can do, reviews the tools, checks the outputs, and approves results before anything affects the design.

In this blog, we give the agent multiple tools, grouped into three families: model creation, analysis, and optimization. Let's see how the agent turns the optimization process into an easy task.

Create and easily change geometry.

Our application does not need complex inputs to generate the model geometry, just a simple chat box where you can "talk" directly to the agent. I used the VIKTOR LLM Chat component to connect the app to an LLM provider. When you say hello, the message goes to the agent, and it replies with a short greeting and a few tips to begin with the model creation.

We can create a platform with the following prompt:

1 2Let's create a platform. Set the length to 9,000 mm, width to 6,000 mm, and height to 4,000 mm. Use a distributed load of 4 kPa. Add 6 joists, set the truss direction along X, and give it a depth of 500 mm. 3

It is also possible to modify the structure by interacting with the agent as if speaking to a colleague. For example, to increase the height, try a prompt like this:

1 2Now, some mobile equipment needs to pass through the Y direction of the structure. We need a clearance of 10,000 mm in width and 6,000 mm in height. Update the model to reflect that. 3

After receiving the prompt, the agent generates a 3D model of the structure, allowing the user to verify the result visually. This is done by connecting the agent's output with VIKTOR's PlotlyView. Every time a new model is created, the view automatically updates with the latest geometry.

The agent also allows modifying the structural typology, making it suitable for different kinds of steel platform structures. For example, a truss can be replaced with an open-section beam using a prompt like:

1 2The client asked me to simplify the structure because the truss bearer required many connections, so let us replace the truss with a bearing beam instead. 3

Quickly modify cross sections.

One important feature of this workflow is the ability to assign and change the cross-section of members to test alternatives. The application includes a small cross-section library, like a database, and the agent can retrieve sections from it and assign them to the structural elements.

To access the available cross sections, simply use the following prompt:

1 2Could you list all available cross sections from your database? 3

The agent can then assign the cross sections to the model using a prompt like:

1 2For the truss, use SHS 40x40x3 for the diagonals, and SHS 75x75x3 for both the top and bottom chords. Assign PFC200 for the joists, and UB256 for the beams, and reduce the number of joists to 5. 3

The best part is that you can even ask for recommendations using the following prompt:

1 2I want to use a smaller cross-section for the joists and increase the truss depth a bit recommend some changes. 3

Run analyses and post-processing automatically.

When the geometry and cross sections are set, the next step is to run the analysis. The agent builds the OpenSees model, runs the analysis, and returns displacements, reactions, and member forces. Results appear in a PlotlyView, which updates after each change, so you can review the deformed shape and numeric values in seconds.

Getting results right away makes it easier to try different design options. You can change one part of the model, like a size or a cross section, ask the agent to run it again, and see how that affects stiffness, weight, and cost.

1 2Run the analysis with the current configuration and show the deformed shape and maximum displacement. 3
1 2Add four more joists, use UB300 for the joists, run the analysis, and show the displacements. 3

Optimize the structure efficiently.

We can take advantage of how fast OpenSees analyzes these models and then launch an optimization workflow. By simply providing the allowable deformation limit, the agent can optimize the current structure typology. The following prompt can be used to start the optimization process:

1 2Optimize the current model to achieve an allowable deformation of 20 mm. 3

After finishing with one structural typology, you can switch to another. For example, if you do not want to use trusses in your platform, you can prompt the agent to optimize the structure with open sections like this:

1 2Let us replace the typology: use open beam sections instead of trusses, with UB300 for both the beams and the joists. 3

At the end, you can visualize all the analyzed models that satisfy the allowable deformation in a vkt.TableView. Note that this table only appears after the optimization results are available, so the user will not see an error or get confused by an empty view. I love this new feature, and it is possible thanks to VIKTOR's hidden view documentation which makes the view visible only when needed!

Turn results into clear, actionable recommendations.

Finally, you can make an informed engineering decision. After running the optimization under different geometries and typologies, you get a clear picture of what works best for you in terms of real-world constraints and structural performance. You can prompt the following to the agent to get the cost and weight of the optimal structural model:

1 2What are the current cost and weight of the model? 3

You can also compare multiple models, since cost and weight are stored in the conversation history.

1 2Based on these two models, which is the most efficient in terms of weight and cost? 3

Try the app (open source on GitHub)

Want to include AI in your workflow? This app is open source on GitHub, so you can adjust it for your projects. You can modify the current tools or create your own, depending on the type of structure you want to optimize.

It works like any other VIKTOR app. You add or change tools through code, and you only need an OpenAI API key to get started.

Bring AI into your structural workflows

In this blog, we covered the essential steps to build and control a structural app with an AI agent. As shown, there is no magic behind the AI integration, just solid engineering knowledge, OpenSees, Python, and LLMs!

If you want to kick off your route to optimizing models with AI agents, you can check this article on how to optimize truss structures and this blog that outlines the basic concept on how to create agents and tools for engineering applications.

Developing AI-powered web apps for structural engineering has never been simpler. Join the growing community of engineers automating their tasks—create your own VIKTOR account now and enhance your engineering projects.

illustration of start now

Start building apps for free

Start now
Share

Related Blog Posts

September 22, 2025

From Boreholes to Apps: BoreDM + VIKTOR to Streamline Geotechnical Engineering

Read more

September 17, 2025

How to Simplify BIM Workflows with Autodesk Platform Services and VIKTOR

Read more

September 16, 2025

How Engineers Can Build Web Apps in Minutes Using AI

Read more