The core concept is to have a frontier or very smart model run as an agent first for N times. The model get tools, skills etc and instructions. It does the job. At the end it leaves a note (like a retro) explaining what it did and what it could have done better.
As the agent runs, it also writes workflows to do the parts of the job it knows it can do in a more deterministic way (based on previous nodes and thinking traces of other runs etc). We made a dsl for this that has routing, classification, code nodes, etc to build these workflows.
For repetitive tasks (which is our focus) we find that after ~100 cases, the agent most times just runs a workflow end to end instead of looping towards a solution. Workflows are cheap, so the job ends up being way cheaper than an agent in a good model.