# SWE-AGILE：高效管理动态推理上下文的软件智能体框架

- 来源：HuggingFace Daily Papers（社区热门论文）
- 发布时间：2026-04-13 08:00
- AIHOT 链接：https://aihot.virxact.com/items/cmnygovrl003dsl13uomyr9sd
- 原文链接：https://arxiv.org/abs/2604.11716

## AI 摘要

SWE-AGILE框架通过动态推理上下文策略解决了多轮软件工程任务中扩展思维链面临的上下文爆炸与重复推理困境。该框架采用"滑动窗口"机制保持近期详细推理以确保连续性，同时将历史推理压缩为精简的Reasoning Digests。实验表明，该方法在SWE-Bench-Verified基准上为7B-8B参数模型创下新纪录，仅使用2.2k条轨迹和896个任务即达到当前最佳性能。

## 正文

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.
