arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.03515cs.SEcs.AIcs.ET
收藏

在框架内:基于源代码的编码代理架构分类

Inside the Scaffold: A Source-Code Taxonomy of Coding Agent Architectures

Benjamin Rombaut

AI总结:

本文通过分析13个开源编码代理框架的源代码,提出了一种基于架构的分类方法,揭示了控制策略、工具使用和资源管理的多样性,为研究代理行为和设计新框架提供了可复用的参考。

摘要:

基于大型语言模型的编码代理能够局部化bug、生成补丁并运行测试,但围绕语言模型的框架代码(控制循环、工具定义、状态管理、上下文策略)仍缺乏理解。现有调研按抽象能力(工具使用、规划、反思)分类,无法区分架构不同的系统,轨迹研究仅观察代理行为而不分析决定原因的框架代码。本文基于13个开源编码代理框架在固定提交哈希下的源代码分析,提出一种架构分类方法,将每个代理在12个维度上分为三个层次:控制架构、工具和环境接口、资源管理。分析显示,框架架构难以离散分类:控制策略从固定管道到蒙特卡洛树搜索,工具数量从0到37,上下文压缩策略有七种不同方法。五个循环原语(ReAct、生成-测试-修复、计划-执行、多尝试重试、树搜索)作为可组合的构建块,代理以不同组合方式叠加;11个代理组合多个原语而非依赖单一控制结构。维度在外部约束主导时收敛(工具能力类别、编辑格式、执行隔离),在开放设计问题时发散(上下文压缩、状态管理、多模型路由)。所有分类主张均基于文件路径和行号,为研究代理行为和设计新框架提供了可复用的参考。

英文摘要:

LLM-based coding agents can localize bugs, generate patches, and run tests with diminishing human oversight, yet the scaffolding code that surrounds the language model (the control loop, tool definitions, state management, and context strategy) remains poorly understood. Existing surveys classify agents by abstract capabilities (tool use, planning, reflection) that cannot distinguish between architecturally distinct systems, and trajectory studies observe what agents do without examining the scaffold code that determines why. This paper presents a source-code-level architectural taxonomy derived from analysis of 13 open-source coding agent scaffolds at pinned commit hashes. Each agent is characterized across 12 dimensions organized into three layers: control architecture, tool and environment interface, and resource management. The analysis reveals that scaffold architectures resist discrete classification: control strategies range from fixed pipelines to Monte Carlo Tree Search, tool counts range from 0 to 37, and context compaction spans seven distinct strategies. Five loop primitives (ReAct, generate-test-repair, plan-execute, multi-attempt retry, tree search) function as composable building blocks that agents layer in different combinations; 11 of 13 agents compose multiple primitives rather than relying on a single control structure. Dimensions converge where external constraints dominate (tool capability categories, edit formats, execution isolation) and diverge where open design questions remain (context compaction, state management, multi-model routing). All taxonomic claims are grounded in file paths and line numbers, providing a reusable reference for researchers studying agent behavior and practitioners designing new scaffolds.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑