Yeah, the new Pi harness has codemode and I imagine there's many more.
Internally at my startup, I built an interpreter for a subset of Javascript where the agent can compose its tools and MCPs. The cool thing about it is that it can create durable workflows and automations from these same scripts.