Agent workflows evolve as models start splitting their own tasks
Agent automation has moved through three stages, defined by who designs the workflow. The first, Ralph, has no real structure — it just reruns the same prompt in a loop, starting with a fresh context each time and relying on rather than planning. The second, CodeMachine, has a human write the workflow once, and the agent then follows that human-authored structure step by step. The third stage is RLM (Recursive ), described in a paper by researchers Zhang and Kraska at MIT CSAIL: here the model treats its own context as an environment, breaks the task into pieces, and calls itself recursively to handle each piece.
The overall trend is that task-splitting has moved from nobody doing it, to a human doing it, to the model doing it itself. The author built a free, , JavaScript library called bareagent that implements this last stage as a function called recurse(). recurse() works in four steps: decompose the task, fan out into subtasks handled in parallel, verify the results, and synthesize a final answer. The model is given a tool called spawn_child and decides on its own whether to split a task further.
Each spawned child gets its own fresh and only sees its specific subtask, then returns either a {result, verdict} pair or an honest {incomplete} if it couldn't finish. The author is explicit that this implements the RLM pattern conceptually, not the exact Python-REPL mechanism described in the original paper.
Key points
- Ralph: no real workflow, just reruns the same prompt in a loop with a fresh context each time
- CodeMachine: a human writes the workflow once and the agent follows it
- RLM: the model itself decomposes the task and recursively calls itself (from an MIT CSAIL paper by Zhang and Kraska)
- bareagent's recurse() implements this as decompose → fan-out → verify → synthesize, as a free JS library
- The author states it only implements the RLM pattern conceptually, not the original paper's Python-REPL mechanism