Agent First Generative Design

Agent prompt to optimized partRunning locally

Start from text, a sketch, or a CAD design, then let your agent work through the loads and constraints and run a generative design on your own computer.

001 / Bicycle HeadtubeFinal print model · 17-4PH steel
The final bicycle head lug: clean organic struts join the two headset collars and carbon-tube sockets.

Loading the final print model…

Drag to rotate · buttons to zoom

Get started

Install topopt

macOS on Apple silicon · Linux x86_64

Codex

git clone https://github.com/chartergroup/topopt
cd topopt
sh scripts/topopt-env.sh sync

Start Codex in the checkout and trust the project. Ask it to use the start-here skill.

Codex CLI setup ↗

Cursor

git clone https://github.com/chartergroup/topopt
cd topopt
sh scripts/topopt-env.sh sync

Add topopt to ~/.cursor/mcp.json with the full path of the checkout. Ask it to use the start-here skill.

Cursor setup ↗

Workflow

Bring your ideas.
Let your agent handle the complexity.

Describe the part, how it attaches, and what it needs to carry.

Example Brief↗
“I’m building a carbon and steel all-road bike with 3D-printed lugs. It would be dope if the headtube lug were topology optimized.”
The early allroad bicycle frame drawing supplied for this project, showing frame dimensions, angles, and the headtube position.
Open the frame drawing at full size ↗
  1. 01

    Describe your part

    Share a sketch, a description, or existing geometry. Define the loads, interfaces, keep-outs, and material.

  2. 02

    Run your design locally

    Review the time and memory estimates, choose a mesh, and start the optimization.

  3. 03

    Watch it form. Get the files.

    Follow along with the design, inspect the results, and get a print-ready STL file.

Example Project: Bicycle Headtube

We built a custom bicycle headtube.

We wanted to build a custom bicycle with topology-optimized lugs and carbon tubes. Here’s how we built the headtube.

We designed the headtube on an M1 MacBook Air.

Our repo allowed us to define the loads and keep-outs, preserve the headset and tube interfaces, and optimize the headtube’s weight on a laptop.

We inspected the resulting geometry and prepared the manufacturing files for the steel headtube.

Brief
A custom head lug joining carbon tubes
Material
17-4PH stainless steel · LPBF
Machine
Apple M1 · 16 GB RAM
Side view of the final head-lug design, with smooth open struts, precise headset collars, and carbon-tube sockets.
FINAL HEAD-LUG DESIGN / SIDE VIEW

Examples

Sample parts

The repo comes with several simple, reproducible samples so you can try generative design for yourself.

BEFORE85.6 g
AFTER26.5 g

The optimized hook uses 69% less mass than the starting design.

Browse sample files on GitHub ↗

A few practical things

Common questions

Do I need to write CAD or solver code?

You can begin with a description and work with your agent to create the setup. Review the dimensions, loads, supports, and assumptions before running it. Existing STL regions and YAML inputs are another route.

What does “local” mean?

The numerical optimization and browser dashboard run on your computer. The AI agent is separate and may send prompts or tool results to its model provider.

Can I use it for metal printing?

The workflow accepts material properties and exports STL geometry. Select the properties and allowables for your material and process, then inspect walls, supports, powder access, interfaces, and finishing requirements with your manufacturing provider.

What comes with the result?

You receive a smooth STL, run metrics, and printability findings. Optional tools check the finished mesh’s stress and other constraints. Manufacturing readiness depends on the checks completed for the particular part.