Flexcompute Simulation Blog

Agentic RF Design: Building Design Expertise Faster with Flex-RF

Written by Ming Zhou, PhD | July 1, 2026 at 8:42 PM

Trial and error is the typical process through which expertise accumulates in the design of RF devices, and the rate of that accumulation is governed by the speed of the loop. This article describes how an engineer can set up an AI agent to run the loop on Flex-RF, and what the agent then learns, using the design of a D-band antenna array as a worked example. 

The premise

How RF expertise is built, and why it is slow

An engineer designs an RF device by repeating a single loop: propose a geometry, simulate it, examine the result, and revise. The product of each pass is not only an improved geometry but understanding of the device's working principle. Over many iterations this understanding accumulates into expertise: a quantitative model of the device that renders each subsequent decision informed rather than exploratory.[1] The loop is slow, however, because the solver is slow, and a full-wave run becomes sharply more costly as the structure grows electrically large.[2]

 

The solver

flex-rf: a fast solver the agent can drive with high throughput

An AI agent can run the same loop without the fatigue and context-switching that limit a human expert. It can do so, however, only on a solver it can drive programmatically and that returns each result fast enough for many iterations to be practical.

Flex-RF is built for exactly this. It is Flexcompute's full-wave electromagnetic solver for RF and microwave design: it runs FDTD on a massively parallel GPU back end in the cloud, returning 3D full-wave results in minutes rather than hours. And it is driven entirely from Python, allowing programmatic control of geometry, materials, ports, mesh, and monitors. To help the agent drive it correctly, we provide the Flex RF plugin, an expert RF assistant with access to the official API documentation, so the agent retrieves the validated way to define a wave port or radiation monitor rather than inferring a call that would silently break the run.

Speed and this plugin let an engineer run the loop with an agent. What remains is to make the agent reason like one.

 

The configuration

Passing the engineer's workflow to the agent

Without a method to follow, an agent running an RF design loop on its own produces several characteristic errors: it trusts its first result, infers an API call instead of checking it, declares convergence the moment a number looks good, and optimizes a number it cannot explain physically. To prevent these, the engineer needs to give the agent the same method an expert applies: how to build a trustworthy simulation, which result to believe, when a dead end is real, when to stop. We hand that method to the agent as configuration, in three parts: roles that keep it honest, rules that govern how each result and its reasoning are produced, and a pipeline the workflow moves through.

Writing the rules and pipeline is itself trial and error. The first draft typically does not work as intended; the engineer refines it across several agent runs, by watching where the agent goes wrong, naming the failure mode behind each error, and tightening the rules and pipeline until the agent's runs stop producing those failures. The configuration is reusable: the same one carries to the next project, so the cost is paid once. The rules and pipeline below are the version we used for the worked example that follows.

Roles:

An executor derives, simulates, and writes; an independent reviewer tries to refute the executor's reasoning rather than confirm it. Reproducing the executor's number does not count as a test.

Rules:

  • Every claim earns its place. A claim is supported only by a test that could have shown it wrong.

  • Simplest sufficient physics first. Use approximate models wherever they resolve the question; reserve full-wave for deliberate runs.

  • Cross-check approximate and full-wave. Confirm each approximate-model prediction with the full-wave, and explain each full-wave result with an approximate model.

  • Screen before simulating. Reject any infeasible or unmanufacturable geometry before it reaches the solver.

  • A failed search is not a fundamental limit. Before claiming a limit, list the variables held constant and run the simplest test that would disprove it.

  • Live report; rejected-candidate log. Record every hypothesis, decision, and uncertainty as the work happens, and log every rejected candidate with the reason it failed.

Pipeline:

  1. Intake. Confirm the device and FoMs, check each FoM's feasibility from first principles, build the geometry and validated setup, and stop for one approval covering the plan and the first cloud run.

  2. Understand. Simulate the reference design as the first cloud run to validate the setup. This baseline is the starting point the design departs from.

  3. Characterize. With the simplest models that resolve them, derive what the FoMs demand of the physics and which architectures can supply it.

  4. Loop. Propose, simulate, characterize, amend. Each pass refines the model of how the device works; the geometry follows from that understanding. Stop when converged, at a mechanism-justified limit, or when the target is shown infeasible.

  5. Verify and report. Confirm every metric against the specification at full resolution.

With these in place, the agent can run the loop without supervision at each step. The rest of this article applies the configuration to a concrete design problem.

 

Worked example

A worked example: a D-band slot array

We applied this configuration to one demanding problem. The device is a 2×2 substrate-integrated-waveguide (SIW) fed slot array in six-layer LTCC (ε_r = 5.9, tan δ = 0.002), following Xiao et al. (IEEE Access, 2019): an SIW feed couples through one slot into a TE₃₄₀-mode cavity that acts as a four-way power divider, and four radiating slots are loaded from above by open-ended TE₂₁₀ cavities, within a 3.0 × 3.5 mm footprint.

Fig. 1 Exploded schematic of the six-layer LTCC stack (rendered in Blender), dimensioned from the Xiao 2019 Table-1 geometry: the SIW feed (TE₁₀), the M3 coupling slot, the TE₃₄₀ divider cavity, the four M2 radiating slots, the TE₂₁₀ loaders, and the M1 apertures, with the plated-via fences that form the cavity walls. Vertical scale exaggerated for clarity.


We set a target tighter than the published reference: across the full 130–148 GHz band, |S₁₁| ≤ −10 dB at every frequency, a broadside beam, mean gain ≥ 10 dBi, and (the binding requirement) gain flat to a standard deviation ≤ 0.1 dB. Flatness is the hard part: a fixed aperture's gain rises as (a +1.13 dB ramp across this band), so 0.1 dB of variation must actively cancel a known trend.

To anchor the loop, the agent sets up and runs a baseline simulation with parameters similar to the paper's. The model keeps |S₁₁| below −10 dB across the band and peaks at 10.98 dBi near 136 GHz, with a gain swing of about 3 dB, close to the published ≈10.93 dBi, thereby validating the setup.

Fig. 2 Our flex-rf baseline (the element arrangement) with the target marked. |S₁₁| (left) and broadside gain (right): the baseline keeps |S₁₁| below −10 dB across the band and peaks near 11 dBi at ~136 GHz, and its several-dB gain swing sets the starting point the agent must flatten to the ≤ 0.1 dB target.

 

The loop

The agent reasons through the loop

Framing the target. The agent works out that the broadside gain is the product of three factors: the radiation efficiency, the aperture efficiency, and the directivity of a fully illuminated footprint, 4πA/λ². Reading these off the baseline, it finds that the radiation efficiency is nearly flat (≈0.84) and that the footprint directivity increases as , adding 1.13 dB across the band, whose standard deviation alone (0.33 dB) already exceeds the 0.1 dB target. Because the radiation efficiency is flat, a flat gain is possible only if the aperture efficiency cancels that 1.13 dB offset from the f² scaling. The agent then checks the baseline gain spectrum and finds its variation is mainly a single low-Q resonance it can widen into the falling efficiency the target needs. It concludes the target is reachable, and that this radiating resonance is the lever.

What the agent learned

Because the radiation efficiency is flat, a flat gain needs the aperture efficiency to cancel the 1.13 dB that the f² scaling adds across the band; the baseline gain's variation is mainly one low-Q resonance, broad enough to widen into that falling efficiency, so the target is reachable.

 

Fig. 3 The baseline broadside gain (left, dark) peaks near 136 GHz, riding the footprint directivity ceiling 4πA/λ² (dashed) that increases monotonically as f². The radiation efficiency (right) is flat at ≈0.84. With the radiation efficiency flat, a flat gain requires the aperture efficiency to roll off and cancel that f² increase, which the agent achieves by enlarging the radiating system to push the resonance below the band.

Locating the resonance. To find what controls that radiating resonance, the agent sweeps the geometry one dimension at a time. Varying the radiating-slot and aperture dimensions moves the resonant frequency by no more than ~3 GHz, so the agent turns to the two cavities, enlarging each in turn. Enlarging the TE₃₄₀ feed cavity drives the four radiating slots out of phase and tilts the beam off broadside, which rules it out; enlarging the TE₂₁₀ radiating cavity (and the apertures above it) instead pushes the resonance below the 130–148 GHz band, where the aperture efficiency falls steadily through the band and cancels the f² offset, flattening the directivity to a standard deviation of 0.075 dB with the beam held broadside. The agent concludes that the TE₂₁₀ radiating cavity, not the feed, is the flattening lever.

What the agent learned

The resonance that shapes the gain lives in the TE₂₁₀ radiating cavity, not the TE₃₄₀ feed cavity: enlarging the radiating cavity pushes it below the band and flattens the directivity, while enlarging the feed cavity only tilts the beam off broadside.

The cost of flattening. The flattened directivity comes with two problems. The first is the impedance match. By standard coupled-resonator reasoning the radiating cavity loads the feed, and the enlarged cavity loads it too heavily, so the coupling slot alone can bring the reflection only to |S₁₁| = −9.35 dB, short of −10. The second is that the gain is still flat only to a standard deviation of 0.14 dB, above the 0.1 dB target. To find out why, the agent splits the gain into its pattern and its efficiency. The pattern, the directivity, is now flat to 0.075 dB; the radiation efficiency, by contrast, falls 0.40 dB across the band as the LTCC's dielectric and conductor loss rises with frequency. The 0.14 dB floor on the gain is therefore the material loss, not the pattern.

What the agent learned

The enlarged radiating cavity overloads the feed, so the coupling slot alone cannot reach −10 dB; and with the pattern flat to 0.075 dB, the gain's residual 0.14 dB variation is the LTCC's radiation-efficiency loss, which falls 0.40 dB across the band.

Recovering the impedance match. Because the flatness and the reflection both follow from how heavily the radiating cavities load the feed, the agent cannot move one without moving the other. It treats the enlargement of the radiating cavities and apertures as a single knob, the interpolation fraction α, and steps it from the impedance-matched baseline (α = 0) toward the flattest design. As α increases the gain flattens while the reflection rises toward −10 dB, and the largest α still holding −10 dB, about 85% of the way, gives a directivity flat to 0.07 dB, a reflection just under −10 dB, and a gain standard deviation of 0.14 dB. The agent also checks the reverse and finds that a smaller α adds no useful up-tilt; it only brings the resonance back into the band. It concludes that this α ≈ 0.85 design is the flattest the −10 dB reflection allows.

What the agent learned

Flatness and the reflection both follow from how hard the aperture loads the feed, so the best design is the largest enlargement (α ≈ 0.85) that still holds −10 dB, which leaves the gain at the 0.14 dB loss floor, just above target.

 

Fig. 4The aperture-interpolation family, sweeping the radiating aperture from the impedance-matched baseline (black, α = 0) toward the flattest aperture (lime, α = 0.85). Right, broadside gain: the variation falls monotonically as α increases. Left, |S₁₁|: the same change raises the reflection toward the −10 dB line. The largest α that still holds |S₁₁| below −10 dB across the band (≈0.85) is the flattest impedance-matched design, though its gain standard deviation, 0.14 dB, still rests on the loss-tilt floor.

Testing whether the floor is fundamental. The 0.14 dB floor sits just above the target, so the agent asks whether any remaining parameter can push it below 0.1 dB, and tests them in turn. Widening the element spacing, meant to raise the directivity at the top of the band, instead lowers it (in a cavity-fed slot array the directivity is set by the aperture, not the element spacing), and breaks the impedance match. Shortening the radiating slot lifts the efficiency at the top of the band and flattens the gain to 0.12 dB, but raises the reflection to −7.8 dB, which no value of α recovers. The tuning posts, the coupling-slot length and width, and the slot position each fail the same way: the flattest result, 0.08 dB, occurs only at a reflection of −4.5 dB, and every design holding −10 dB stays near 0.14 dB. From this pattern the agent identifies a single cause: a flat gain needs a radiating aperture with no in-band resonance, while a reflection held below −10 dB across the band needs an in-band resonance to swing the input impedance through the −10 dB region, so flattening removes the very resonance the impedance match depends on. It concludes that, with a single coupling resonance, the two cannot be met together, and that getting past it takes a feed with a second coupling resonance, which it documents rather than builds.

What the agent learned

on this footprint, with a single coupling resonance, a gain flat to 0.1 dB and a reflection below −10 dB cannot be met together: a flat, resonance-free aperture cannot supply the resonance the impedance match needs. The limit is real, established by exhausting every lever; the way past it is a second coupling resonance in the feed.

 

Fig. 5 The campaign's design space: in-band gain standard deviation (flatness) versus |S₁₁| (impedance match), each candidate coloured by phase: exploration, the spread-and-restore design loop, and the verification phase that tested whether the trade-off is fundamental. The baseline (black square) sits at a low |S₁₁| but far from flat; the corner with both a standard deviation ≤ 0.1 dB and |S₁₁| ≤ −10 dB stays empty; the flattest point reached (0.08 dB) sits at |S₁₁| = −4.5 dB, and the delivered design sits at the knee.

 

The result

The result

The delivered design was verified at full frequency resolution: |S₁₁| ≤ −10 dB across the band (in-band maximum −10.54 dB), the main beam at broadside (within 2° at every frequency), mean gain 10.53 dBi, and radiation efficiency near 0.83. The gain standard deviation is 0.140 dB, so it meets three of the four binding requirements. The shortfall is the radiation-efficiency variation that the flat directivity, 0.07 dB, cannot reach. The design took about 64 full-wave simulations over ten rounds; each returns in minutes on flex-rf's GPU cloud rather than the hours a conventional solver needs, so a campaign of this size runs in hours instead of the weeks it would otherwise demand. That speed is what makes an iterative agentic loop practical at all.

Fig. 6 The delivered design (teal) verified at full frequency resolution, with the baseline (grey, dashed) overlaid. Left, |S₁₁|: below −10 dB across the band (in-band maximum −10.54 dB). Right, broadside gain: mean 10.53 dBi at a standard deviation of 0.140 dB, visibly flatter than the baseline, whose peak-and-roll-off it replaces.

 

Takeaway

Summary

The engineer chose an AI-native solver, validated the model, and encoded a working method into the agent's configuration; the agent then ran the loop far faster than a person could, and wrote down what it learned: a set of reusable mechanisms (the radiating cavity governs flatness; cavity loading couples flatness to the impedance match; element spacing cannot cancel an efficiency loss), a converged design, and a clear account of the one target it could not meet and why.

The agent's reasoning will not always be right, and some of its conclusions will not survive scrutiny. Because the agent writes everything down and the loop is fast, the engineer can review that record cheaply, correct the documentation where it is wrong, and tighten the rules and pipeline against the failure modes that produced the errors. None of this means re-running the design: the corrected record and the tightened configuration simply become what the next agent inherits when it takes on the next problem. So the workflow compounds, and the agentic loop comes to design a little more like the expert who shaped it. The device here was a D-band slot array, but that division of labor, the engineer setting the stage and encoding the method while the agent runs the loop and surfaces the physics, is independent of the device.

Built with Flex-RF.

 

References

[1] "Versatile unsupervised design of antennas using flexible parameterization and computational intelligence methods", Scientific Reports 14, 29753 (2024); "Design of rectangular patch antennas through machine learning", Scientific Reports 15, 33605 (2025)

[2] "Machine-learning-based global optimization of microwave passives with variable-fidelity EM models and response features", Scientific Reports 14, 29753 (2024); "Design of rectangular patch antennas through machine learning", Scientific Reports 15, 33605 (2025)