Delegent reduces language model costs by delegating easy tasks

Delegent: A Multi-Agent Harness That Reduces Cost without Sacrificing Performance

Artificial IntelligenceInformation Retrieval

Summary

Using state-of-the-art language models can be very expensive because they process every part of a task in detail. The authors show that many simple parts of these tasks can be handed off to smaller, cheaper models without losing quality. They built a system called Delegent where a large model oversees a task but lets smaller models handle easier steps like checking code or searching information. This approach cuts costs dramatically—sometimes by over half—without making the results worse.

What this means in practice

  • For software developers: Lower costs of automated coding assistance by using Delegent to delegate simple code tasks to local small models while keeping a large model in charge.
  • For enterprise search teams: Reduce expenses of complex document searches by dividing queries between a powerful model and smaller subagents handling easier subtasks efficiently.

Authors

Lingwei Gu, Jimmy Lin

Abstract

Agents built on frontier language models are expensive. At every step, the frontier model re-reads its entire context and executes every subtask regardless of its difficulty. This paper explores the simple thesis that much of this cost can be removed by delegating easy subtasks to a small language model, or SLM, that runs on hardware one already owns. To test it, we build Delegent, a simple and effective agent harness built on Claude Code, in which the frontier model stays in charge of every task but hands focused subtasks, such as investigating code, running tests, and searching a corpus, to SLM subagents. Existing approaches such as cascades and model routers usually choose which model executes the entire task, whereas in Delegent, the frontier model always leads the execution and delegates easy subtasks to the SLM. No router or model is trained, so either model can be swapped freely. With the help of a 27B FP8 SLM, Delegent reduces the frontier cost of long-horizon coding by 67% and of agentic search by 59%, with no loss in task performance, and even a 2B SLM that fits on a laptop reduces the coding cost by 66%. The savings grow with the legwork that the frontier model would otherwise do itself, and a short instruction, which leaves the main coding tasks to the frontier model, accounts for most of the saving and keeps the 2B SLM from losing tasks. Code: https://github.com/castorini/delegent