Anande Bergman

AI agents for civil engineers

11 0

Anande Bergman explores how AI agents can be used to create powerful solutions to help engineers work more efficiently but still respect their professional responsibilities


As a structural engineer, I’ve watched how AI is transforming various industries with excitement. But I’ve also noticed our field’s hesitation to adopt these technologies — and for good reason. We deal with safety-critical systems where reliability is a requirement.

In this article, I’ll show you how we can harness AI’s capabilities while maintaining the reliability we need as engineers. I’ll demonstrate this with an AI agent I created that can interpret truss drawings and run FEM analysis (code repository included), and I’ll give you resources to create your own agents.

The possibilities here have me truly excited about our profession’s future! I’ve been in this field for years, and I haven’t been this excited about a technology’s potential to transform how we work since I first discovered parametric modelling.


Find this article plus many more in the March / April 2025 Edition of AEC Magazine
👉 Subscribe FREE here 👈

What makes AI agents different?

Unlike traditional automation that follows fixed rules, AI agents can understand natural language, adapt to different situations, and even solve problems creatively. Think of them as smart assistants that can understand what you want and get it done.

For example, while a traditional Python script needs exact coordinates, boundary conditions, and forces to analyse a truss, an AI agent can look at a hand-drawn sketch or AutoCAD drawing and figure out the structure’s geometry by itself (see image below). It can even request any missing information needed for the analysis. This flexibility is powerful, but it also introduces unpredictability — something we engineers typically try to avoid.


Anande Bergman


The rise of specialised AI agents It’s 2025, and you’ve probably heard of ChatGPT, Claude, Llama, and other powerful Large Language Models (LLMs) that can do amazing things, like being incredibly useful coding assistants. However, running these large models in production is expensive, and their general-purpose nature sometimes makes them underperform in specific tasks.

Advertisement
Advertisement

This is where specialised agents come in. Instead of using one large model for everything, we can create smaller, fast, focused agents for specific tasks — like analysing drawings or checking building codes. These specialised agents are:

  • More cost-effective to run
  • Better at specific tasks
  • Easier to validate

Agents are becoming the next big thing. As Microsoft CEO Satya Nadella points out, “We’re entering an agent era where business logic will increasingly be handled by specialised AI agents that can work across multiple systems and data sources”.

For engineering firms, this means we can create agents that understand our specific workflows and seamlessly integrate with our existing tools and databases.

The engineering challenge

Here’s our core challenge: while AI offers amazing flexibility, engineering demands absolute reliability. When you’re designing a bridge or a building, you need to be certain about your calculations. You can’t tell your client “the AI was 90% sure this would work.”

On the other hand, creating a rule-based engineering automation tool that can handle all kinds of inputs and edge cases while maintaining 100% reliability is a significant challenge. But there’s a solution.

Bridging the gap: reliable AI agents

We can combine the best of both worlds by creating a system with three key components (see image below):


Anande Bergman


  1. AI agents handle the flexible parts – understanding requests, interpreting drawings, and searching for data.
  2. Validated engineering tools perform the critical calculations.
  3. Human in the loop: You, the engineer, maintain control — verifying data, checking results, and approving modifications.

Let me demonstrate this approach with a practical example I built: a truss analysis agent.

Engineering agent to analyse truss structures

Just as an example, I created a simple agent that calculates truss structures using the LLM Claude Sonnet. You give it an image of the truss, it extracts all the data it needs, runs the analysis, and gives you the results.

You can also ask the agent for any kind of information, like material and section properties, or to modify the truss geometry, loads, forces, etc. You can even give it some more challenging problems, like “Find the smallest IPE profile so the stresses are under 200 MPa”, and it does!

The first time I saw this working I couldn’t help but feel that childlike excitement engineers get when something cool actually works. Here is where you start seeing the power of AI agents in action.

It is capable of interpreting different types of drawings and creating a model, which saves a lot of time in comparison with the typical Python script where you would need to enter all the node coordinates by hand, define the elements and their properties, loads, etc.

Additionally, it solves problems using information I did not define in the code, like the section properties of IPE profiles or material properties of steel, or what is the process to choose the smallest beam to fulfil the stress requirement. It does everything by itself. N.B. You can find the source code of this agent in the resources section at the end.

In the video below, you can see the app I made using VIKTOR.AI


How does it work: an overview

Now let’s look behind the screen to understand how our AI agent works, so you can make one yourself.

In the image below you can see that in the centre you have the main AI agent, the brains of the operation. This is the agent that chats with the user and accepts text and images as input.


Anande Bergman


Additionally, it has a set of tools at its disposal, including another AI Agent, which it uses when it believes they are needed to complete the job:

  • Analyse Image: AI Agent specialised in interpreting images of truss structures and returning the data needed to build the FEM model.
  • Plot Truss: A simple Python function to display the truss structures.
  • FEM Analysis: Validated FEM analysis script programmed in Python.

The Main agent

The Main agent is powered by Claude 3.7 Sonnet, which is the latest LLM provided by Anthropic. Basically, you are using the same model you are chatting with when using Claude in the browser, but you use it in your code using their API, and you give the model clear guidelines on how to behave and provide it with a set of tools it can use to solve problems.

You can also use other models like ChatGPT, Llama 3.x, and more, as long as they support tool calling natively (using functions). Otherwise, it gets complicated to use your validated engineering scripts.

For example, here’s how we get an answer from Claude using Python (see image below).


Anande Bergman


Let’s break down these key components:

  • SYSTEM MESSAGE: This is a text that defines the agent’s role, behaviour guidelines, boundaries, etc.
  • TOOLS_DESCRIPTION: Description of what tools the agent can use, their input and output.
    messages: This is the complete conversation, including all previous user and assistant (Claude) messages, so Claude knows the context of the conversation.

Tools use

One of the most powerful features of Claude and other modern LLMs is their ability to use tools autonomously. When the agent needs to solve a problem, it can decide which tools to use and when to use them. All it needs is a description of the available tools, like in the image below.


Anande Bergman


The agent can’t directly access your computer or tools — it can only request to use them. You need a small intermediary function that listens to these requests, runs the appropriate tool, and sends the results back. So don’t worry, Claude won’t take over your laptop… yet 😉

The Analyse image agent

Here’s a fun fact: the agent that analyses truss images is actually another instance of Claude! So yes, we have Claude talking to Claude (shhh…. don’t tell him 🤫). I did this to show how agents can work together, and honestly, it was the simplest way to get the job done.

This second agent uses Claude’s ability to understand both images and text. I give it an image and ask it to return the truss data in a specific JSON format that we can use for FEM analysis. Here is the prompt I use.


Anande Bergman


I’m actually quite impressed by how well Claude can interpret truss drawings right out of the box. For complex trusses, though, it sometimes gets confused, as you can see in the test cases later.

This is where a specialised agent, trained specifically for analysing truss images, would make a difference. You could create this using machine learning or by fine-tuning an LLM. Fine-tuning means giving the model additional training on your specific type of data, making it better at that task (though potentially worse at others).

Test case: book example

The first test case is an image of a book (see image below). What’s interesting is that the measurements and forces are given with symbols, and then the values are provided below. You can also see the x and y axis with arrows and numbers, which could be distracting.


Anande Bergman


The agent did a very good job. Dimensions, forces, boundary conditions, and section properties are correct. The only issue is that element 8 is pointing in the wrong direction, which is something I ask the agent to correct, and it did.

Test case: AutoCAD drawing

This technical drawing has many more elements than the first case (see image below). You can also see many numerical annotations, which could be distracting.


Anande Bergman


Again, the agent did a great job. Dimensions and forces are perfect. Notice how the agent understands that, for example, the force 60k is 60,000 N. The only error I could spot is that, while the supports are placed at the correct location, two of them should be rolling instead of fixed, but given how small the symbols are, this is very impressive. Note that the agent gets a low-resolution (1,600 x 400 pixel) PNG image, not a real CAD file.

Test case: transmission tower

This is definitely the most challenging of the three trusses, and all data is in the text. It also requires the agent to do a lot of math. For example, the forces are at an angle, so it needs to calculate the x and y components of each force. It also needs to calculate x and y positions of nodes by adding different measurements like this: x = a + a + b + a + a.

As you can see in the image below, this was a bit too much of a challenge for our improvised truss vision agent, and for more serious jobs, we need specialist agents. Now, in defence of the agent, the image size was quite small (700 x 600 pixels), so maybe with larger images and better prompts, it would do a better job.


Anande Bergman


An open-source agent for you

I’ve created a simplified version of this agent that demonstrates the core concepts we’ve discussed. This implementation focuses on the essential components:

  • A basic terminal interface for interaction
  • Core functionality for truss analysis
  • Integration with the image analysis and FEM tools

The code is intentionally kept minimal to make it easier to understand and experiment with. You can find it in this GitHub repository. This simplified version is particularly useful for:

  • Understanding how AI agents can integrate with engineering tools
  • Learning how to structure agent-based systems
  • Experimenting with different approaches to truss analysis

While it doesn’t include all the features of the full implementation, it provides a solid foundation for learning and extending the concept. You can use it as a starting point to build your own specialised engineering agents. See video below.



Conclusions

After building and testing this truss analysis agent, here are my key takeaways:

1) AI agents are game changers for engineering workflows

  • They can handle ambiguous inputs like hand-drawn sketches
  • They adapt to different ways of describing problems
  • They can combine information from multiple sources to solve complex tasks

2) Reliability comes from smart architecture

  • Let AI handle the flexible, creative parts
  • Use validated engineering tools for critical calculations
  • Keep engineers in control of key decisions

3) The future is specialised

  • Instead of one large AI trying to do everything
  • Create focused agents for specific engineering tasks
  • Connect them into powerful workflows

4) Getting started is easier than you think

  • Modern LLMs provide a great foundation
  • Tools and APIs are readily available
  • Start small and iterate

Remember: AI agents aren’t meant to replace engineering judgment — they’re tools to help us work more efficiently while maintaining the reliability our profession demands. By combining AI’s flexibility with validated engineering tools and human oversight, we can create powerful solutions that respect our professional responsibilities.

I hope you’ll join me in exploring what’s possible!

Resources


About the author

Anande Bergman is a product strategist and startup founder who has contributed to multiple successful tech ventures, including a globally-scaled engineering automation platform.

With a background in aerospace engineering and a passion for innovation, he specialises in developing software and hardware products and bringing them to market.

Drawing on his experience in both structural engineering and technology, he writes about how emerging technologies can enhance professional practices while maintaining industry standards of reliability.

Advertisement