HyperAgent: Generalist Software Engineering Agents to Solve Coding Tasks at Scale

Huy Nhat Phan, Tien N. Nguyen, Phong X. Nguyen, Nghi D. Q. Bui

TL;DR

HyperAgent is a novel generalist multi-agent framework designed to tackle diverse software engineering tasks across multiple programming languages. By emulating human developer workflows and separating high-level planning from specialized execution via an asynchronous message queue, HyperAgent achieves state-of-the-art results on benchmarks like SWE-bench and Defects4J while drastically reducing inference costs.

What Problem Does This Paper Address?

While Large Language Models (LLMs) excel at isolated coding tasks, real-world software engineering (SE) is highly complex, requiring developers to navigate massive codebases, localize bugs, edit multiple files, and verify fixes. Existing LLM-based autonomous agents are typically specialized—built to solve specific benchmarks (like SWE-bench for GitHub issues) or limited to single-file generation.

The authors introduce HyperAgent to bridge this gap, creating a generalist system capable of handling the full lifecycle of diverse SE tasks across different languages without requiring task-specific adaptations.

Figure 1: Illustration of a Developer’s Workflow for Resolving a Software Engineering Task. The diagram outlines the key phases a developer typically follows when implementing a new feature, such as adding a “Dark Mode” to a web application.

Methods

HyperAgent uses a centralized multi-agent architecture that mirrors the human development workflow: Analysis & Plan, Feature Localization, Edition, and Execution.

The framework splits responsibilities across four specialized agents coordinated through an asynchronous Message Queue:

  1. Planner: The central "brain" of the system. It processes the user prompt, drafts high-level strategies, and delegates subtasks. It typically utilizes a powerful model like Claude-3 Sonnet or GPT-4o.
  2. Navigator: Specializes in codebase information retrieval. It uses lightweight LLMs paired with tools like code_search (built on the Zoekt engine) and go_to_definition to map out the repository.
  3. Code Editor: Responsible for code modification and patch generation across multiple files using an automated repair editor.
  4. Executor: Validates solutions and reproduces bugs by running tests within isolated Docker containers via an interactive bash shell.

To prevent the Planner's context window from bloating, a lightweight LLM summarizer condenses the execution logs from the child agents before sending them back to the Planner.

Figure 2: Overview of HYPERAGENT: A scalable, multi-agent system for software engineering tasks. The workflow illustrates the central Planner agent coordinating with specialized child agents (Navigator, Editor, and Executor) through an asynchronous Message Queue. This architecture en- ables parallel processing of subtasks, dynamic load balancing, and efficient handling of complex software engineering challenges.

Datasets

The authors evaluated HyperAgent across three distinct software engineering benchmarks covering different languages and tasks:

  • SWE-bench (Lite & Verified): Evaluates Python GitHub issue resolution across 12 popular repositories.
  • RepoExec: A benchmark for repository-level Python code generation emphasizing executability and correctness.
  • Defects4J (v1.2 & v2): A standard Java benchmark used for fault localization and automated program repair.

Key Insights and Ideas

  • Centralized Reasoning vs. Distributed Execution: Delegating computationally intensive but conceptually simpler tasks (like navigation and execution) to specialized child agents running lightweight LLMs optimizes both inference costs and overall performance.
  • Asynchronous Scaling: Using a distributed message queue allows multiple instances of child agents (e.g., multiple Navigators) to explore different parts of a large codebase in parallel, preventing synchronous blocking.
  • Tool Design for LLMs: Standard IDE features like go_to_definition often fail with LLMs because they require exact line and column numbers. HyperAgent addresses this by implementing a proximity-based search algorithm, boosting navigation performance from 9% to 15% in ablation studies.

Key Results

HyperAgent demonstrated state-of-the-art performance across all evaluated benchmarks:

  • SWE-bench: On the Verified dataset, HyperAgent-Full-1 achieved a 33.00% success rate, matching top-performing closed-source pipelines. On SWE-bench-Lite, it led with 26.00%. Notably, HyperAgent-Lite-1 achieved a 25.33% resolution rate on Lite at a fraction of the cost ($0.45 vs. $2.55 for SWE-Agent).
Performance comparison on SWE-Bench datasets
  • RepoExec: HyperAgent-Lite-3 achieved a 53.33% Pass@5 rate, outperforming standard RAG baselines and even models provided with the full ground-truth context.
RepoExec Results Comparison
  • Defects4J: For fault localization, HyperAgent achieved an Acc@1 of 59.70%, outperforming the next best deep learning baseline (AutoFL) by 8.7 percentage points. For program repair, it successfully fixed 82 bugs on v1.2 and 110 bugs on v2, outperforming specialized tools like RepairAgent and SelfAPR.
Comparison of Acc@1 across Different Fault Localization Methods on the Defects4J dataset

Limitations and Future Work

Despite its success, HyperAgent suffers from occasional hallucinations, where details are lost during inter-agent communication, leading the Planner to falsely believe a task is completed (early exit) or hit a timeout.

Future work will focus on integrating HyperAgent directly into real-world IDEs and version control systems, enhancing the system's explainability, and adapting it to specialized domains like security-focused code reviews and performance optimization.

Summary updated

BibTeX
@misc{phan2024hyperagent,
  author = {Huy Nhat Phan and Tien N. Nguyen and Phong X. Nguyen and Nghi D. Q. Bui},
  title = {{HyperAgent: Generalist Software Engineering Agents to Solve Coding Tasks at Scale}},
  year = {2024},
  eprint = {2409.16299},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.16299},
}
Figure