Skip to main content
Back

SEW Builds and Rewrites Multi-Agent Coding Pipelines Automatically, Beating Hand-Tuned Systems

A new framework automatically designs multi-agent coding workflows and evolves agent prompts, delivering up to 12% gains on LiveCodeBench without hand-crafted pipelines.

Paper, Full Access
  • SEW automatically generates and evolves multi-agent code workflows without hand-crafted topologies or prompts. Paper
  • Delivers up to 12% pass@1 improvement on LiveCodeBench over the backbone LLM alone.
  • Two operators drive prompt mutation: Direct Evolution for peak performance, Hyper Evolution for robustness.
  • Compares five workflow serialization formats; CoRE wins with 80.5% executable output rate.
  • Tested on HumanEval+, MBPP, and LiveCodeBench with Claude Opus 4.6 and GPT-5.3 backbones.
  • Beats AFlow, ADAS, PromptBreeder, and CoT baselines across all three benchmarks.

Multi-agent systems have become a popular way to squeeze more performance out of LLMs on hard coding tasks: split the job into planning, generation, review, and rewriting, then hand each piece to a specialized agent. The catch is that someone still has to sit down and design the whole pipeline by hand, from the topology of who talks to whom down to the exact wording of each agent's prompt. A team from Glasgow, Aberdeen, Cambridge, and MBZUAI is pushing back on that assumption with SEW (Self-Evolving Workflow), a framework that builds and rewrites those pipelines automatically.

The paper's core argument is that current multi-agent systems rely heavily on hand-crafted topologies and prompts, and a pipeline optimised for a machine learning task looks very different from one tailored for software development. That makes them brittle across problem types and hard to scale. SEW instead treats the workflow itself as something an LLM can mutate, evaluate, and improve, the same way you'd evolve a prompt.

Diagram comparing an initial multi-agent workflow with naive prompts to an evolved workflow with a refined structure and enhanced prompts

Inside the evolution loop

SEW is split into three modules: workflow generation, workflow evolution, and agent evolution. It starts by asking an LLM to produce a default workflow from the task description plus a template. A Direct Evolution operator then mutates that workflow by applying a mutation prompt to rewrite the topology. Every agent inside the evolved workflow also gets its prompt rewritten, using ideas borrowed from