SWE-AGILE:一种高效管理动态推理上下文的软件智能体框架
SWE-AGILE: A Software Agent Framework for Efficiently Managing Dynamic Reasoning Context
April 13, 2026
作者: Shuquan Lian, Juncheng Liu, Yazhe Chen, Yuhong Chen, Hui Li
cs.AI
摘要
先前在自主软件工程(SWE)领域具有代表性的ReAct式方法通常缺乏进行深度分析和处理复杂边缘情况所需的显式系统2推理能力。尽管近期推理模型展现了扩展思维链(CoT)的潜力,但将其应用于多轮次SWE任务时会产生根本性矛盾:保留完整推理历史会导致上下文爆炸和"中间迷失"效应,而丢弃历史则会迫使智能体在每个步骤进行冗余重推理。为解决这些挑战,我们提出SWE-AGILE——一种新型软件智能体框架,旨在弥合推理深度、效率与上下文约束之间的鸿沟。该框架引入动态推理上下文策略,通过维护详细推理的"滑动窗口"确保即时连续性以避免冗余分析,同时将历史推理内容压缩为精炼的推理摘要。实证表明,SWE-AGILE仅使用2.2千条轨迹和896项任务,就在SWE-Bench-Verified上为7B-8B参数模型设立了新标杆。代码已开源:https://github.com/KDEGroup/SWE-AGILE。
English
Prior representative ReAct-style approaches in autonomous Software Engineering (SWE) typically lack the explicit System-2 reasoning required for deep analysis and handling complex edge cases. While recent reasoning models demonstrate the potential of extended Chain-of-Thought (CoT), applying them to the multi-turn SWE task creates a fundamental dilemma: retaining full reasoning history leads to context explosion and ``Lost-in-the-Middle'' degradation, while discarding it would force the agent to redundantly re-reason at every step. To address these challenges, we propose SWE-AGILE, a novel software agent framework designed to bridge the gap between reasoning depth, efficiency, and context constraints. SWE-AGILE introduces a Dynamic Reasoning Context strategy, maintaining a ``sliding window'' of detailed reasoning for immediate continuity to prevent redundant re-analyzing, while compressing historical reasoning content into concise Reasoning Digests. Empirically, SWE-AGILE sets a new standard for 7B-8B models on SWE-Bench-Verified using only 2.2k trajectories and 896 tasks. Code is available at https://github.com/KDEGroup/SWE-AGILE.