For those interested in Browser-based Autonomous AI

mark_cawley
mark_cawley Member Posts: 11 ✭

I put this project on pause because of real work to do. But I wanted to share my Codex project to help broaden the ideas of what can be done by a carefree developer like me in just a few weeks.

I gave an unbiased unpersonalized temporary chat a handoff file from my project in order to generate a summary. The project is using Codex via chrome cdp and Playwright. The project is account agnostic: Meaning, I can use the AI inside any onshape account. However, this summary is from a dedicated account that has never been used by anyone but my AI.

I have not worked on it in a few weeks, due to real-life obligations. (I don't work for PTC. lol.) But in the few weeks of training that I performed last months, I made substantial gains. One note is that, in gpt, Sol ended up spending so much time correcting itself in the Course 3 of the Learning Center, that I paused to save tokens. Then Astra came out and just blazed through it without problem. That model is great. But I have not returned to my project since then, which has been a few weeks now.

Anyway, below is the summary of some of the achievements thus far. This is only a summary. The system does a lot more; and will do a lot more. I think this is the real future. Maybe not in my way, but in somebody's way at some point.

With the new buzz about AI in the Onshape community, I thought that I would share. Sometimes our imagination is the main limitation. I hope this might inspire someone more ambitious than I am. And if you read it all, THANKS!!

AI SUMMARY

# Gypsy_Chat — Autonomous Onshape Proof of Concept


**Gypsy_Chat** is a proof-of-concept AI-driven CAD system operating through its own dedicated Onshape account.


The objective is not simply to automate mouse clicks or replay fixed workflows. The project is exploring how far an AI agent can develop toward working **inside Onshape as a complete engineering environment**: modeling, editing, writing FeatureScript, troubleshooting its own work, validating results, working through structured training, and interacting with the wider Onshape ecosystem.


It is still a proof of concept and is **not intended as a claim of universal autonomous CAD**. The system keeps explicit records of what has actually been demonstrated, repeated, reused, or still remains unproven.


## What Gypsy_Chat has demonstrated


### Native Onshape operation
* Direct operation of the normal Onshape browser interface* Persistent work across Documents and workspaces* Part Studios* Feature Studios* Assemblies* Drawings* Variable Studios* Verification that work actually persists after reload/reacquisition
The current system uses direct browser control rather than treating Onshape simply as an API endpoint.


### Sketching
A broad native Sketch foundation has been developed, including:
* Lines, rectangles, circles, arcs, polygons, ellipses, conics and splines* Trim, Extend and Split* Sketch Fillet and Chamfer* Offset* Construction geometry* Common geometric constraints* Mirror* Linear and circular patterns* Multi-entity Transform* Advanced spline editing
These capabilities have been trained with persistence and regeneration checks rather than being treated as successful merely because a tool appeared to work visually.


### Solid modeling
Demonstrated solid-feature work includes:
* Extrude* Add / Remove* Hole workflows* Revolve* Using downstream solid operations to detect problems in upstream Sketch geometry
Extrude and Remove/Hole have reusable bounded cores, while the Revolve core reached Owner-accepted reusable status.


### Autonomous troubleshooting and recovery
One of the more important developments has been moving beyond “first attempt succeeds or a human fixes it.”
Gypsy_Chat has demonstrated the ability to:
* Detect incomplete or incorrect Sketch topology* Discover problems when downstream features fail* Diagnose the likely modeling defect* Modify the geometry* Retry the downstream operation* Verify that the corrected result is actually valid
Some recovery tests reached the project's higher autonomous-recovery classifications rather than relying on step-by-step human repair.


### Production-style modeling
A completed Sketch Production Integration campaign tested whether separate learned tools could be combined into larger mechanical tasks.
Achievements include:
* Selecting appropriate modeling methods rather than replaying a fixed recipe* Combining multiple Sketch techniques* Performing downstream profile preflight* Recovering from first-pass failures* Verifying persistence and final geometry
The five-cycle campaign completed successfully, including two cases that required autonomous recovery.


## FeatureScript and custom-feature development
FeatureScript has been a substantial part of the project.
Gypsy_Chat has demonstrated:
* Native Feature Studio source editing* Native Commit* Exact persisted-source verification after changes* Static-analysis checking* Custom-feature creation and instantiation* Parameter variation* Boundary-condition testing* Regeneration testing* Runtime and geometry verification* Diagnosis of multiple FeatureScript runtime failure classes* Feature Studio-to-Feature Studio imports* Reuse of learned FeatureScript methods in different mechanical contexts


The older development records explicitly establish the complete chain of **FeatureScript transfer, analysis, commit, persisted-source verification, regeneration and independent geometry verification**.


An especially useful behavior learned during this development is the ability to work in both directions between a **custom-feature instance and its source**:


* Inspect how a user has changed the parameters of an instantiated custom feature* Return to the Feature Studio* Use those real-world user settings to revise the FeatureScript defaults* Commit the source changes* Observe and verify the resulting regeneration behavior
That type of workflow is particularly interesting because the AI is not merely generating FeatureScript from scratch; it can use the way a person actually configured a feature as feedback for further development of the feature itself.


The underlying system records also show that committed FeatureScript source changes can be followed through to the regeneration of already-existing custom-feature instances.
Several learned custom-feature methods were subsequently exercised in independent contexts and promoted through the project's maturity system. Two reached `REUSABLE` after successful retrieval and reuse across multiple mechanical scenarios.


## Assemblies
Gypsy_Chat has also progressed into Assembly work.


Demonstrated achievements include:
* Multi-part assembly construction* Mate creation* Mate correction* Maintaining intended degrees of freedom* Updating a referenced part revision without rebuilding the assembly* Preserving assembly health after source-part changes


The Pulley Support assembly was technically verified with **eight instances and seven healthy mates**. Assembly Training Cycles 1 and 2 were Owner accepted.


## Drawings, BOMs and exploded views
The system has demonstrated:
* Native BOM editing* Part Number and Description population* Saved exploded assembly states* Exploded Drawing views* BOM-linked balloons* Drawing title-block field editing
A training Drawing successfully retained seven BOM-linked balloons and an exploded Isometric view tied to the saved exploded state.


## Variable Studio
Variable Studio integration has also been trained.
The reusable bounded core includes:
* Editing Length variables* Referencing variables from Sketches* Referencing variables from simple features* Propagating upstream variable changes* Multi-variable geometry* Simple acyclic dependency evaluation


## Raster-to-Sketch reconstruction
Gypsy_Chat has completed a Raster-to-Sketch campaign covering:
* Using raster references inside Onshape* Separating reference and trace Sketches* Choosing native analytic primitives where appropriate* Using splines for irregular geometry* Reconstructing mixed mechanical profiles* Visual QA* Correcting traced geometry* Verifying persistence
The resulting bounded tracing core was Owner accepted.


## Onshape Learning Center
Gypsy_Chat has also been working through the **Onshape Learning Center as an AI student**.
So far:
* Course 001 — complete, 100%, certificate awarded* Course 002 — complete, 100%, certificate awarded* Course 003 — Introduction to Part Studios — complete, 100%, certificate awarded
Course 003 included five hands-on exercises and five self-checks. The exercises included work such as the **Reducer Coupling, Jackhammer Gear Cover, Funnel and Rocket Guidance Reflector**.
Some example Learning Center work:
* **Onshape Learning Center Training Example 1**  https://cad.onshape.com/documents/b18129c33158164553900dc0/w/8abb1ac110bec363d97107ee/e/f16e97ecb360a51d51668f29
* **Onshape Learning Center Training Example 2**  https://cad.onshape.com/documents/b881d6cceea74f8a948de56a/w/a133c62bef033728aab9c417/e/88df378869f6f42b1315a7aa

## Onshape Community Forum training


Because the project is ultimately intended to operate within the broader Onshape ecosystem, Gypsy_Chat has also undergone controlled Forum training.


It has demonstrated:
* Onshape SSO into its dedicated `gypsy_chat` Forum account* Persistent authenticated Forum access* Understanding of Question and Discussion workflows* Comment workflows* Idea/feedback workflows* Forum categories* Draft management* Bookmark, voting, quote and flag controls* Identification of the exact boundary between drafting and publishing
The system also successfully created, reopened, verified and later deleted an unpublished test draft without accidentally publishing it.


This Forum post itself is therefore connected to a larger experiment: teaching an AI agent not only how to create things in Onshape, but eventually how to participate appropriately in the community around it.


## FeatureScript production example
One example of independent FeatureScript/custom-feature development is:
**Curved Turbine Spoke Development**
https://cad.onshape.com/documents/e9f626546da41e742a0aac09/w/a781eb17815188715dcc7b51/e/490527d75e57234f74fe5469
This custom feature produced a center disc, annulus and parametrically controlled curved spoke using spline-based geometry. The feature regenerated successfully as one solid and its committed source was independently verified.


## Where the proof of concept currently stands
At this point, Gypsy_Chat has demonstrated work across:


* Sketch* Solid features* FeatureScript* Custom features* Variable Studios* Assemblies* Drawings* BOMs* Exploded views* Raster reconstruction* Onshape Learning Center* Onshape Community Forum


More importantly, it has begun demonstrating higher-level behavior:
* Choosing between modeling methods* Combining previously learned capabilities* Detecting when its own geometry is wrong* Recovering from some modeling failures* Reusing techniques learned in earlier projects* Separating code correctness from CAD/runtime correctness* Verifying that changes actually persist* Incorporating human review and corrections into subsequent work


There are still significant areas that have not been established, and successful examples are deliberately not treated as proof of universal competence.


The proof of concept is instead intended to answer a narrower question:
**Can an AI agent learn to operate Onshape as an engineering environment, rather than simply being given individual CAD API commands?**


So far, the answer appears promising enough to continue exploring.

END OF UNPERSONALIZED TEMPORARY GPT SUMMARY.

Again, if you cared enough to read all that: Thanks!








Comments

  • EvanReese
    EvanReese Member, Mentor Posts: 3,110 PRO

    Thanks for sharing. I've also been playing around with Astra and Playwright and getting some decent results, even if they take a while and use a lot of tokens.I had Astra use Playwright to manually model a configured Part Studio containing all standard SD card sizes, apply MBD data to the model, and produce a drawing with one sheet per configuration. Honestly, it nailed it. I'll probably make a quick video about that pretty soon. All in all, that process took about an hour, three prompts (but probably could have been one if I thought of everything up front), and 40 million tokens. As far as I can tell, the AI providers do a fairly good job of obfuscating the correlation between tokens and cost. Does anyone have more information on that?

    Evan Reese
    The Onsherpa | Reach peak Onshape productivity
    www.theonsherpa.com
  • mark_cawley
    mark_cawley Member Posts: 11 ✭

    I agree, tokens are a fuzzy area. It's all up to us to manage them. Keeping everything in a file system and not in the context window only goes so far when working in Onshape because it is so ui intensive. The dom and api only expose so much.

    So yeah, account usage tokens are what halted my onshape project. Sol ate my usage away due to a targeting failure when attempting to fix a constraint-based problem in a sketch. It eventually completed it successfully. (I think it was the funnel in one of the Learning Center courses.) I had it stop the course before the next campaign.

    Then Astra came out. Finished the campaign in one fell swoop. Had no problem hitting the targets. And spent far less tokens.

    I will get back to it soon. It really is amazing watching these models work.

    Thanks for the reply Evan. I am a fan. Your featurescript videos are some of the best on youtube. You have had my subscribe for a long time. With all this new tech, who knows how we will be talking about this stuff a year from now!