Anthropic 官方指南:随着模型能力的提升,很多子 Agent 其实可以换成技能和工具
把业务流程整理成技能,把业务接口接成工具,让同一个 Agent 持续处理请求;哪些子 Agent 值得保留,用实际任务来判断。

一个 AI 助手要查订单、问物流、处理退换货,是不是每多一项业务,就得再加一个子 Agent?
Anthropic 的一篇官方指南建议重新检查这种做法:随着模型更能自己安排步骤、选择工具并检查结果,很多原本交给子 Agent 的工作,可以收回同一个主 Agent。
原先写在子 Agent 提示词里的业务流程,可以整理成需要时才读的技能;查订单、查物流等操作,则通过工具完成。主 Agent 持续拿着用户的原始请求和工具返回的结果,决定下一步该读哪份规则、查哪项数据。
这样能减少中间的调度和信息交接,同时让各业务团队继续维护自己的专业流程。哪些子 Agent 可以合并、哪些值得保留,需要用实际任务来验证。
模型更强了,为什么可以少造一些子 Agent?
子 Agent 有自己的上下文窗口,也就是它处理任务时能读取的一组信息,还配有自己的工具和指令。负责分发的协调器把任务交给它,再收回处理结果。
主循环指同一个模型反复决定下一步、调用工具、读回结果,再继续行动,直到给出答案或触及预算限制。
过去,团队会在模型外面加上路由、规划和检查步骤,替它安排工作。较新的模型更能自己安排步骤、说明进度,并边做边检查,一部分外部安排便显得重复。Anthropic 在帮助客户迁移时发现,固定的多 Agent 结构有时反而限制了新模型发挥能力。升级模型时,也值得重新检查旧流程还需不需要。
模型更强了,轮数和费用预算、写入权限、结果校验仍然需要保留。是否保留某个子 Agent,也要看具体任务的表现。
Anthropic 应用 AI 团队对比过几家企业的部署:让一个 Agent 按需使用技能,回答质量经常优于“所有内容塞进一个提示词”或“分给多个子 Agent”的方案,单次任务的成本和等待时间也往往更低。
在一个客户的对比中,将多 Agent 框架重构为单循环后,运行速度快了约两倍。
从层层分发,到同一个主循环
一种常见提案会层层分发;主循环让同一个模型根据工具结果决定下一步。
层层分发的结构
- 多 Agent 编排器协调下面的处理分支
- 意图分类先判断请求属于哪一类
- 固定推理步骤沿事先规定的流程推进
- 用户分群按用户类别选择路径
- 推荐分支生成并汇总答案
同一个主循环
原图以 4–5 个精简数据工具举例,数量由任务决定。这是结构示意,不表示所有多 Agent 系统都必须经过五层,也不表示单循环一定更快。
原始英文动图:层级架构与主循环
左侧示意通过分类器、固定流水线与分群路由层层包裹;右侧推荐以单一主循环为核心,仅保留清晰系统提示词、4–5 个精简数据工具与输出护栏。
Agent 拆得太细,会多出哪些麻烦?
订单团队做一个 Agent,物流团队再做一个,上面加一个负责分发的“总管”。团队越多,系统也跟着越拆越细,最后长得像公司的组织架构图。这就是康威定律(Conway's Law:系统结构往往映射组织沟通结构)在 Agent 系统里的表现。
拆得太细,通常会多出五类麻烦:
- 交接时漏掉细节:系统需要在不同 Agent 之间决定传递哪些上下文,在来回转述中容易漏掉关键细节。
- Agent 越造越多,却没人持续维护:各团队各自发布子 Agent,企业内部容易积累大量功能重叠、缺乏统一标准且无人持续维护的实例。
- 规则越加越乱:每个团队为了保护自身业务规则,都在全局提示词中追加要求,容易导致规则相互冲突,难以维持一致的语气与标准。
- 各自测试都高分,整件事却没做好:每个业务组只测试自己的那一段,分数可能很高,却没人检查用户的整件事有没有完成。
- 一层层调用,等得更久:一次请求要经过多轮独立的模型调用和交接,用户就得等得更久。
交接为什么容易漏信息?负责分发的 Agent 通常先挑出一部分信息,交给子 Agent;子 Agent 在自己的上下文里处理,再把摘要或结果交回来。双方能用同样的工具,并不代表双方都看到了完整的处理过程。
Anthropic 将这种按问题类型切分、层层转述信息的过程形象地比喻为“传话游戏”(Telephone Game):当交接依赖选择性摘要时,摘要容易漏掉后续步骤所需的细节背景。
写代码时,编写功能和编写测试经常依赖同一份设计背景。
如果按问题类型切分,先由功能 Agent 编写代码,交接给测试 Agent 编写测试,再交接给审查 Agent。编写测试的 Agent 拿到的是初步实现与摘要说明,并不知道前一个 Agent 为什么做出特定的设计取舍,容易在编写测试时遗漏关键的边界条件。
如果让同一个 Agent 编写功能和测试,它就能沿用做实现时的设计背景。后续的验证器(Verifier)只负责运行测试、报告结果,不需要了解编写代码时的全部推导,可以独立处理。
写功能与测试,共用设计背景
按问题类型逐个交接
- Agent A:编写功能掌握为什么这样实现
- Agent B:编写测试接收代码与交接材料
- Agent C:审查代码再接收一轮材料
如果交接只给摘要,写测试的人可能不知道前面为何做出设计取舍。
按上下文需求划界
运行测试不需要全部实现推导,适合成为独立环节。
关键是后续工作需要哪些背景。独立验证有价值;需要反复交换设计理由的步骤,更值得放在同一个上下文中。
原始英文图:按上下文划界
上图按角色切分导致编写测试的 Agent 丢失了实现决策的背景;下图由持有完整上下文的主体同时编写功能与测试,验证器仅负责运行测试并报告结果。
在客服场景中也是同样的道理。比如用户提出:“这次订单演出急用,请务必帮我发特快专递;另外包装禁用塑料插扣。”如果系统按问题类型拆分成订单 Agent 与物流 Agent,订单模块在生成工单摘要交接给物流模块时,可能只提炼了“特快专递”,而在交接中遗漏了“演出急用、包装禁用塑料插扣”的限制条件。
让同一个 Agent 保留原始请求和工具结果,可以减少这类交接遗漏。长对话中仍可能漏看信息,共享上下文也有容量上限,但至少少了一次“先挑选、再转述”。
同一条请求,下一步还能看到什么?
假设用户提出三个要求。改变交接清单,观察物流子 Agent 能收到哪些信息;右侧保留同一条原始请求作为参照。
“演出急用,请改特快,包装不要用塑料插扣。”
交给物流子 Agent
主 Agent 选择交接内容
- 演出急用
- 改成特快
- 未传入:禁用塑料插扣
交接清单包含 2 / 3 项要求
留在同一主循环
在同一上下文里加载物流技能、调用工具
未传入的要求:禁用塑料插扣。将它们加入交接清单,可以补回这些信息。
这里只按勾选项展示信息传递,不运行模型,也不测准确率或耗时。子 Agent 可以收到完整材料;主循环保留了要求,也仍可能漏用,需用任务评估检查。
同一个 Agent,怎样按需使用技能、工具和知识库?
把工作交回同一个 Agent,也要避免一开始就塞入所有业务规则和工具说明。提示词太长,会增加 Token 消耗、分散模型注意力,也可能让它选错工具。
可以先给它一份简短的“目录”,需要哪项能力时,再读对应的完整内容。这就是渐进式披露(Progressive Disclosure)。用户已经说过的要求、已经查到的结果继续保留;暂时用不到的业务规则、工具参数和参考资料,先不展开。
技能告诉 Agent 该怎样做。 比如退换货的步骤、规则和判断方法,可以从子 Agent 的提示词整理成技能。主 Agent 平时只看简短摘要,任务用到时才读完整说明。
工具负责查数据、执行操作或返回固定格式的结果。 比如查订单、查物流。主 Agent 判断需要哪个操作后,再通过工具搜索加载具体参数定义。
设计工具时,可以按用户想完成的事来组织相关数据,不必让每个后端 API 都对应一个暴露给模型的工具。这样再配合按需搜索,模型就不用面对一长串底层接口逐个挑选。
知识库存放偶尔才要查的资料。 比如业务政策、指标定义、产品规格,可以通过搜索或查询工具读取,也可以作为技能的参考文件。需要时再查,避免由外部代码把大段背景资料一次性拼进提示词。
同一个 Agent,什么时候才读详细规则?
沿着同一条请求,观察技能、工具和上下文记录怎样变化。这里展示预设步骤,不调用模型,也不查询真实订单。
- 1只看摘要
- 2加载规则
- 3找到工具
- 4读回结果
- 5继续回答
当前只读到技能摘要;完整流程和工具参数尚未加载。
查询订单运单与预计交付日期
处理退换货条件与申请步骤
处理发票信息与开票申请
这次任务按需读到的材料
尚未加载。目录里的摘要足以先判断需要哪项能力。
尚未加载。当前不需要把所有接口说明都放进上下文。
始终是同一个主循环
- 原始请求
订单 R1024,周五之前能送到吗?
按需加载的是详细说明;任务已经积累的原始信息继续留在同一上下文中。
示例中的订单、运单与交付日期均为虚构;流程用来解释信息路径,不代表模型每次都会照此执行。已加载的规则在后续步骤中保留,未用到的技能继续只有摘要。
Anthropic 的经验是,直接放进系统提示词的工具定义超过 30–50 个后,模型更容易选错。这提醒团队控制同时加载的定义数量,并不意味着整个工具库只能有这么多工具。Claude Code 针对更高阶模型精简系统提示词时,缩减了 80% 以上,其中一部分来自技能和工具的按需加载。原始架构图里给出的 4–5 个数据工具,也是特定场景的示意,实际数量要按业务需要决定。
如果处理一个任务需要同时查询基础数据、核对库存并计算运费,且这三项调用彼此独立、没有先后依赖关系,完全不需要启动三个子 Agent。模型在单次推理中即可同时发出这组工具调用;运行 Agent 的程序同时执行这些操作,并将原始返回结果一次性交回给同一模型。
模型拿到原始结果后,可以继续决定下一步动作:是提出追问、给出最终答案,还是根据新返回的数据调整后续计划。只有在调用之间没有依赖时才能并行执行,这种方式既获得了并发执行的速度,又让所有原始信息保留在同一上下文内。
运行 Agent 的程序负责限制最大轮数、费用预算和写入权限。模型给出最终回答,或用完预算,循环就停止。
共享上下文仍有容量限制。面对超长任务,依然需要结合记忆、笔记记录和主动的上下文管理手段,才能避免注意力稀释。
哪些工作仍适合交给子 Agent?
Anthropic 提出三种值得保留子 Agent 的情况:
第一,上下文太长,实际效果已经下降。 要看实际测试:任务运行太久、资料越积越多,模型开始漏掉早期要求,任务完成得更差。这时可以把相对独立的探查或整理工作交给子 Agent,减轻主循环的负担。
第二,任务适合并行、独立处理,做完就能丢弃那段上下文。 例如同时尝试几条代码修改路径、独立调研不同方向,或者配置专门的验证器(Verifier)。验证器只需独立执行测试并返回结果详情与报错信息,不需要加载全部的实现过程,完成后即可关闭该会话,避免中间试错过程污染主上下文。
第三,同一个 Agent 仍然选不对工具,或指令确实难以共存。 如果不同业务的规则确实冲突,或者用上工具搜索后模型仍然选不对工具,可以用专门的子 Agent 分开处理。需要注意,前文提到的 30–50 个工具属于经验性警戒线,不能简单等同于达到此数量就必须拆分子 Agent。
优先看哪些步骤需要共享上下文,再决定子 Agent 的边界。 如果决定保留子 Agent,应给它分配与系统其余部分依赖较少、只需返回紧凑结果的独立任务。如果两个步骤需要频繁互换中间推导过程、深度共享同一批底层数据,就更适合留在同一个主循环中。
已有系统怎样一点点改,怎样判断改得对不对?
已有系统可以逐步调整。先有一套能比较改前改后表现的测试,再每次改变一处。
可以由中央团队先准备约 10 个黄金样例(Golden Examples:有明确期望结果的典型任务),从用户提出请求一直测到任务结束。按标准检查最终回答质量可以作为起点,比较架构时,更要看任务是否真正完成。
还保留分发器时,检查它有没有选对子 Agent;合并以后,检查主 Agent 有没有读对技能、调用正确工具。这些记录能帮助定位失败原因。
三种方式,一次迁移一部分
三种方式可以组合使用,不要求每个系统按同一顺序全部走完。
每次改一处,用相同任务对比结果。若折入后表现变差,就保留有效的子 Agent 方案。
原始英文动图:三种迁移方式
左列合并强共享上下文的子模块;中列将子 Agent 作为工具由主循环调用并保持主控对话;右列将提示词转化为技能、API 转换为工具。
下面三种方式可以组合使用,不必按固定顺序走完:
-
合并经常一起工作的子 Agent: 先找使用频率高、常常前后接着调用、读取相同数据的子 Agent。比如真实请求里,经常找完一个专员就得接着找另一个,可以先合并这两个,减少交接。
-
将子 Agent 作为工具调用: 如果不打算立即重写子 Agent 内部逻辑,可以让主 Agent 维持与用户的直接对话,把子 Agent 包装成工具来按需调用。这种方式允许统一规范子 Agent 的返回结构,并在主循环中核验数据。 包成工具以后,每个子 Agent 仍有自己的提示词、上下文、维护团队与局部评测;每次调用仍要启动一轮模型处理,增加耗时;交回的摘要也仍可能漏信息。因此,只有在子 Agent 确实需要直接与用户展开多轮对话时,才建议由子 Agent 接管与用户的对话,也就是完整的对话交接(Full Handoff);其他大多数情况,更适合收敛为主循环内的技能与工具。
-
将子 Agent 折叠为技能与工具: 将各个子 Agent 提示词中的业务流程、排查步骤与规则整理成技能,将其调用的后端接口转换为 MCP 数据工具。迁移时建议每次只折叠一个子 Agent,并在评测集上对比有无子 Agent 的任务表现,效果持平或更好,再考虑移除原来的子 Agent。
更快之后,也要检查原来能做对的事有没有做错。
在对比架构表现时,不仅要看最终评测的总分,更要逐项检查具体用例是由通过变失败,还是由失败变通过。
Anthropic 测试一个示例客服 Agent 时,把一个子 Agent 合进另一个 Agent,响应变快了,但原来能通过的一项任务失败了:主 Agent 拿着订单查询工具就直接回答了用户,跳过了向物流专员确认交付日期的步骤。
这个错误在两次运行中只出现了一次。所以,常一起执行的业务流程、不能违反的规则,都要有对应测试;同一个任务也要多跑几次,才更容易发现偶发错误。
多个业务团队以后分别维护什么?
各团队继续维护自己的专业流程,分工从“各养一个 Agent”调整到下面两部分:
- 中央小团队:负责维护全局统一的系统提示词与端到端评测基准,负责整体回答风格和质量,审核准备上线的新技能、工具与评测。中央团队保持小规模,可以减少协调成本,加快迭代。
- 各业务团队:将其业务经验转化为技能文件与 MCP 工具,并提供随技能附带的局部评测集。团队内的技能直接责任人(DRI)负责维护技能的质量与独特性,定期检查、清理重复或没人使用的技能,用
/skill-creator检查、精简和去重技能,用/skill-doctor查看技能的成本与使用情况、清理闲置内容,避免技能也越堆越多。
业务约束和权限检查,可以由工具及运行 Agent 的程序负责:
- 工具的前置依赖检查:假设工具 B 的执行依赖工具 A 的返回结果,可以在工具 B 内部进行检查。若发现缺少前置结果,工具 B 返回一条明确说明缺少的提示;模型读取该提示后,便能据此决定是否补调工具 A。需要注意的是,工具校验只在工具被调用时触发,无法阻止模型跳过工具直接输出文字;端到端评测可以提前发现这类漏洞。实际运行时,还可以在回答发出前做输出检查:例如任务要求必须先确认交付日期,就检查必要的确认步骤是否完成;缺了这一步,先不放行回答,让 Agent 补做或说明尚无法确认。
- 基于用户的动态权限:系统不需要为不同权限角色各造一个专属 Agent。工具可以直接检查发起请求的用户权限,当遇到未授权操作时返回清晰的纯文本拒绝原因,由主循环直接向用户解释,使同一循环能够安全服务不同权限级别的用户。
Anthropic 还提供了迁移套件(Migration Kit),可以先在模拟系统上试用,再用于自己的 Agent。它串联了四项辅助技能:
/claude-api build-eval:协助构建由中央团队拥有的端到端评测集,或生成业务团队随技能附带的局部评测;/claude-api prompt-audit:排查提示词、技能和工具描述中针对旧模型撰写的陈旧规则,并以 修改对照的形式提供精简与修改建议;/claude-api hillclimb:针对现有评测进行迭代调优,可用于对比折叠为技能工具前后与保留子 Agent 的表现差异;/claude-api cost-optimize:分析调用的 Token 分布与开销去向,提供利用 Prompt 缓存、裁剪冗余输入输出或优化模型选型的建议。
模型能力提高后,过去由子 Agent 承担的一部分工作,可以交回主 Agent。哪些能合并,哪些值得保留,就用实际任务来判断:先建立一套小规模端到端评测,每次只改变一处,留下完成任务更好的方案。
Anthropic 官方指南:随着模型能力的提升,很多子 Agent 其实可以换成技能和工具
查订单、问物流、处理退换货,每多一项业务,就得再造一个子 Agent 吗?Anthropic 应用 AI 团队对比过几家企业的部署,建议重新检查这种拆分:让一个 Agent 按需使用技能,回答质量经常优于“全部塞入提示词”或“分给多个子 Agent”,单次任务的成本与等待时间也往往更低。
过去,团队用路由、规划和检查步骤替模型安排工作。较新的模型更能自己安排步骤、汇报进度并边做边检查;一些固定流程可能重复,也可能限制新模型发挥。
主 Agent 持续拿着用户的原始请求和工具返回的结果,决定下一步该读哪份规则、查哪项数据。各业务团队继续维护专业流程,主循环减少中间调度。模型给出回答或用完预算时,循环停止。
拆得太细,为何会沦为“传话游戏”?
订单组做一个 Agent,物流组做一个 Agent,上方再加上协调总管——系统结构最终会映射为企业的组织架构图(康威定律)。这种按业务类型切分的方式,可能在交接中丢掉信息。各团队各造一套,还容易积累重复且无人维护的 Agent、互相冲突的全局规则;各自局部测试高分,也未必代表用户的整件事做完。
假设客服示例:用户强调“这次订单演出急用,请务必帮我发特快专递;另外包装禁用塑料插扣”。若拆分为订单与物流两个子 Agent,订单模块在生成工单交接给物流模块时,可能只提炼了“特快专递”,而在转述摘要中漏掉了“演出急用、包装禁用塑料插扣”的隐性约束。
按需加载:三种材料各有用途
把工作收拢进主 Agent,绝不等于将所有业务规则一次性塞进初始提示词。提示词过长会增加 Token 消耗、分散注意力,也可能让模型选错工具。应当利用渐进式披露(Progressive Disclosure)按需要读取三类材料:
宿主程序负责设置最大轮数、开销预算与敏感操作的写入权限。模型回答或用完预算时,循环停止。共享上下文仍有容量限制,长任务需要管理记忆与资料。
哪些工作仍适合保留子 Agent?
收敛并非消灭一切子 Agent。划定边界的核心逻辑是:优先看哪些步骤需要共享背景,再决定是否保留子 Agent。Anthropic 提出三种值得保留子 Agent 的情况:
01超长上下文导致效果下降:如果实际测试发现,任务运行太久、资料积累太多,模型开始漏掉早期要求、完成得更差,可考虑把相对独立的调研或整理工作交给子 Agent。
02高度独立、做完即扔的并行任务:例如独立探索几条代码修改路径,或配置专门的验证器(Verifier)。运行测试不需要了解全部实现推导,验证器返回结果与报错后,就可以关闭这段上下文。
03指令冲突或工具选择困难:当不同业务体系的系统提示词发生逻辑冲突,或工具库在引入搜索后依然引发模型误判时,采用独立子 Agent 进行逻辑隔离。
先做基线,再每次改变一处
已有系统的改造不应一蹴而就,而需基于约 10 个有明确期望结果的典型任务(黄金样例)建立基线。下面三种方式可以组合使用,不必按固定顺序走完:
A合并高频连带 Agent:先合并日常工单中经常前后连续调用、深度依赖同一批业务数据的子模块,减少中间交接。
B将子 Agent 包装为工具:保留原有子 Agent 逻辑与独立测试,但让主 Agent 始终维持与用户的直接对话,仅在需要时像调工具一样调用子 Agent 并核验返回数据。独立模型循环、摘要交接与维护成本仍在。
C把规则转成技能,接口转成工具:将提示词转写为按需技能文档,底层接口转为标准化 MCP 工具。每次折叠一个,比对评测结果持平或更优后再行下线。
更快也可能漏步骤。迁移前检查有没有选对子 Agent;折入后检查有没有读对技能、调用正确工具,再定位失败原因。比较时要看每个任务是从通过变失败,还是从失败变通过。Anthropic的示例客服合并后更快,却出现主Agent直接用订单查询回答、跳过向物流专员确认交付日期的错误;两次运行中只出现一次。常一起执行的流程与不能违反的规则,都要有测试,同一任务要多跑几次。
分工架构亦随之演进:中央小团队统管主系统提示词与端到端评测基准,把控整体回答品质;各业务团队设技能直接责任人(DRI),借助专用工具精简维护自身技能与局部评测集。用真实任务结果说话,小步重构,留下更能完成任务的方案。
Building agents: When to fold subagents into your main agent loop
When to consider using fewer subagents and how to migrate the into your main loop.
If you’ve built an agent in Claude Platform that includes multiple subagents, see which may make sense to fold into the main agent loop using our migration kit. It runs a guided workflow to identify your patterns, evaluate alternatives, and verify the best approach. It includes a demo that you can try on a mock system before running on your agent.
Subagents – agents with their own context window, tools, and instructions, orchestrated by a coordinator – are a core component of agent design. They are effective at verification, parallel work, and modular permissioning. We use them in many of our own agents that we build using Claude Platform, for example our multi-agent research system.
However, recently the Applied AI team has found a pattern of enterprise agent deployments that have benefited from folding routers, planners, and domain subagents into the main agent loop. In our comparisons across several enterprise deployments, a single agent with skills frequently outperformed both the one-prompt-for-everything design and the subagent design on quality, and often at a lower cost and latency per task.
For example, one company found the dozen of specialist subagents within its customer-facing agent made a consistent on-brand experience difficult to maintain and added latency that hurt the user experience.
We also often see proposed agent designs that follow a familiar progression: an intent classifier, a fixed multi-step reasoning pipeline, user-segment buckets, separate recommendation branches, and a multi-agent orchestrator on top.
In these cases feedback is often that most of this structure was doing work the model no longer needed done for it, and that one clear system prompt, 4-5 thin data tools, and firm output guardrails would cover most of the use case.

To be clear, subagents still have their place, including at the research frontier. Use them when:
- A single agent loop hits measurable performance degradation from context bloat, or
- Multiple tasks need to be tackled in parallel with fresh context windows that can be discarded once the task is done, or
- A single agent struggles to select appropriate tools or there are conflicting instructions in the system prompt.
But too often we see enterprises give each team or problem type its own subagent, with the agent architecture becoming a copy of their org chart (Conway’s law at work).
This post explains when to consider folding subagents into your main agent loop with best practices we’ve learned from building agents in large organizations.
Agent building failure modes for large organizations
Companies often want to build an agent that unites multiple products and capabilities into a single customer interface.
Typically, each capability is owned by a separate team, so companies start by letting each individual team build their own agent, then a central platform team builds an orchestrator on top. This can take on several structures including orchestrator-subagent or a single agent with specific agents exposed as MCP tools.
This looks like the simplest solution but introduces immediate complexity around:
- Context management: You need to decide what context is exchanged between agents and often lose details in the back and forth.
- Subagent sprawl: Every team ships its own subagent, so companies end up with hundreds of overlapping subagents with no enforced standards and no specific owner.
- The Frankenprompt: Every team adds a sentence to the system prompt, resulting in conflicting rules and no consistent voice.
- Unvetted, overly localized evals: Everyone adds their own evals that are overly optimized for their subtask. No one owns or maintains the whole set, and leadership makes decisions based on watered-down, overly localized scores.
- Latency: Multi-agent architectural complexity adds latency. One customer that evaluated their multi-agent harness against a single agent loop saw a roughly 2x faster runtime with the latter.
Using an agent loop with progressive disclosure
The orchestrator-subagent design described above is a reasonable approach to coordinating specialists built across teams, but often a more effective approach can be progressively disclosing context via skills and progressively disclosing tools via tool search. In other words, the agent sees short descriptions of the skills and tools, which are fully loaded only when needed.
There are three reasons why this approach can make sense:
- Shared context produces better answers: for longer-running agents, we want the context from several different tasks to sit in the main context window. An agent that has seen the result of each earlier step can connect them, which leads to richer outputs and better insights than a set of summaries handed back by subagents. It also means fewer context windows and fewer lossy handoffs.
- Progressive disclosure prevents context bloat: this technique allows teams to build single agents that can accomplish a wide variety of tasks without requiring all of the context to be immediately loaded into one long system prompt. This removes the main reason teams previously split work across subagents. In fact, we reduced Claude Code’s system prompt for more advanced models by over 80% which included cuts related to progressively disclosing skills and tools.
- Models are more capable: starting with Opus 4.5, models became capable of managing far more in a single loop than most teams expected. You cannot turn off thinking on Opus 5.5, and Fable 5.1, and recent models increasingly narrate their progress and check their work as they go, which makes some harness elements redundant. Each new model lets you move more of the decision-making out of the harness and into the model itself. A simpler loop is also easier to move to the next model; in migrations we have helped customers with, rigid multi-agent structures were often what stopped the new model from doing more of the work.
The single agent loop design requires discipline: a carefully managed system prompt, skill and tool descriptions that trigger at the right times, and deliberate handling of context windows, memory, and note-taking. This article goes deeper into migration and design considerations in subsequent sections.
One central team should own end-to-end quality and the system prompt, vetting every new tool and eval before it ships. Keeping that central team small helps iteration move quickly and lowers coordination cost across a large org.
If you go the multi-agent route, start with the simplest pattern (generator-verifier, orchestrator-subagent, or other) that could work. Decompose boundaries effectively by dividing by context: give each subagent a piece of work that needs little from the rest of the system and have it hand back a compact result (good candidates are independent research paths, separate components with clean interfaces, or black-box verification). When agents are split by problem type, they engage in a "telephone game," passing information back and forth with each handoff degrading fidelity.

How to fold subagents into the main agent loop
Many teams already have an orchestrator and a set of specialist agents in production. The following is the single loop design we'd suggest working toward:
- One model and one context window running an open-ended tool loop, with limits (turn and cost budgets, write gates) set in the harness.
- Each turn, the model emits a batch of tool calls. The harness runs them in parallel and returns raw results to the same model, which decides the next step: another batch, a question to the user, or an answer.
- The loop stops when the model answers or hits a budget. A goal or verifier check can optionally run after the answer.
- The model writes its plan in context on the first turn and revises it as results arrive. This is the main change from the orchestrator and specialist agents setup: the model that writes the plan is also the one carrying it out, so it can change the plan mid-turn.
- Context still gets loaded, and is managed by the agent itself:A code step that rewrites the plan from a catalog of rules is no longer needed, since the model decides each step.Ordering and domain procedure move into skills.Hard limits (validation, approval gates) and anything else that comes up mid-conversation (e.g. memory lookup) move into the tools.Code can still be used to load anything cheap and almost always relevant (e.g. an entity resolution step), and to handle any mechanical parts (payload construction, stream parsing, resuming a clarification) inside tools the loop calls.
This single loop design also helps with the end state many teams are working toward (an agent that understands a user's high-level goals and acts on their behalf), since it keeps everything the agent has learned in one context.
The suggestions below are how a team could get from a multi-agent system to a single agent loop in stages, and how several teams can keep contributing to that agent along the way.
Task-completion evals
The first step is to create an eval set that can help you determine whether you should fold a subagent into the main agent loop. The eval structure we’ve seen work is one shared end-to-end set owned by a central team with smaller eval sets shipped with each skill by the team that owns it. Even a set of 10 golden examples is enough to start.
Grading the agent's final message against a rubric is a good starting point for tracking answer quality. While you still have an orchestrator, you should also track routing accuracy (did it pick the right subagent?). Once a subagent is folded in, check instead whether the agent loaded the right skill or called the right tool. Working toward task-completion evals over time is helpful as this matters most when comparing architectures.
This can be complex in environments where internal systems are difficult to replay and user engagement is difficult to simulate. One approach that has worked for us internally is to record timestamps on important events, so they can be replayed later to run as targeted evals.
Reducing subagents over time
Evolving toward a single agent loop involves folding the subagents into tools and skills. This can be done by merging domain subagents, calling them as tools, or replacing them with skills and tools.

Combining domain agents
Build a small end-to-end eval before the first merge. Then fold in by shared context starting with subagents that have the most use.
Merge specialists that chain on each other's output, touch the same data, or are often called together. For example, if a significant share of production traffic is one specialist followed by a second, that is a tightly coupled pair, which makes it a candidate to merge into one domain agent.
Subagents called as tools
When one of the three conditions above applies and you keep a subagent, it can be effective to have the main agent call subagents as tools so it can continue holding the conversation with the user.
We’d only recommend a full handoff, where the subagent takes over the conversation, when it needs to talk to the user directly. Everything else can be a skill plus tools in the main loop.
This will allow you to define a shared response schema for subagents, verify the conclusion against real data with the main agent, and trim the input to any final synthesis step. This is a good first step, as you don’t need to rewrite the subagents. It also gives you a baseline on the task-completion eval before deciding to fold any subagents into the main agent.
However, some failure modes will remain:
- Each specialist has its own prompt, context, owner team, and evals
- Each call still hands back a lossy summary
- Every call is a nested model loop that adds latency
Folding subagents into the main agent via skills and tools
Fold subagents into the main agent one at a time by turning each one’s prompts into skills and API calls into MCP tools. Compare eval performance with and without the subagent. Then decide which to keep.
When you compare, don’t just examine the final score, take a look at which tasks flipped. When we tested this on a sample support agent, folding one subagent into another lowered latency, but also broke a process that had been passing. The main agent was holding the order lookup tool and answering on its own, without asking the shipping specialist for the delivery date.
Before each change, make sure your eval has a task for every chain of agents that runs together in production and for every rule the agent must not break, and run each task more than once, since a break like this one only showed up in one run out of two.
How several teams can contribute to a single agent
Domain reasoning can be retrieved from knowledge bases, skills, and MCP tools. Individual teams can shift their ownership from agents to skills and tools, with one small central team keeping ownership of the system prompt and end-to-end quality. This involves vetting new skills, tools, and evals before they ship.
MCP tools
Tools are the right fit when the agent needs to take an action, read live data from a system, or return a result in a fixed shape. You can also use tools as a way to keep calling subagents while you migrate. We recommend tools grouped by user intent (not one tool per API) because once you exceed 30-50 tool definitions in the system prompt, tool choice tends to degrade.
Use tool search with deferred loading, limit hard preconditions, and move any needed ones into the tools. For example, if Y needs X's output, Y's tool checks for it and returns an instruction the model can act on. Per-user permissions work the same way. Each tool checks what the calling user may see or do and returns a plain refusal the model can read, so one loop can serve users with different access without a separate agent per permission level.
Skills
Skills are the right fit when the agent needs to know how a team does work, like the steps, rules, and judgment calls a specialist subagent's prompt used to hold.
Our approach to growing skill libraries is to give the maintenance work back to the people writing the skills. Claude can do the heavy lifting with skills that can build, test, and prune other skills.
To prevent skill sprawl, you can have DRIs per team own their skills and make sure they are well crafted, distinct, and shipped with appropriate evals.
- /skill-creator allows you to author new skills that start well-formed, and audit existing ones to trim, deduplicate, and restructure them.
- /skill-doctor allows you to see what each skill in your library costs and how often it’s actually used, and delete dead weight.
Knowledge bases
Knowledge bases are the right fit for reference material the agent only needs some of the time. Facts and reference material (policies, metric definitions, product specs) can sit behind a search or lookup tool the model calls, or ship as reference files inside a skill. Avoid having code retrieve and paste this context into prompts.
Tools to accelerate this work
We recently released a set of Claude API skills that can help with most of the work mentioned above. Our migration kit chains these skills together in one guided workflow for assessing and moving multi-agent systems to a single agent loop. It includes a demo you can try before running it on the real thing:
- /claude-api build-eval: can help create a first end-to-end set owned by the central team or small evals each team ships with its skill
- /claude-api prompt-audit: can flag instructions written for older models in your prompts, skills, and tool descriptions and propose fixes as a diff. This can be run on your system prompts to find any rules that were added for an earlier model and are now making the agent slower or more rigid. Each team's DRI can also run it on their own skills and tool descriptions.
- /claude-api hillclimb: can iteratively improve an app against an existing eval. This can be used for the "folded in vs kept" comparison (after folding one subagent into a skill plus tools, let it iterate on the skill and tool descriptions and see if the folded version matches or beats the subagent), as well as your system prompt.
- /claude-api cost-optimize: profiles where your calls go and proposes savings from options such as prompt caching, trimming unneeded input and output tokens, effort, and model choice, one change at a time. This can help bring cost and latency down on a given design.
As models evolve, our understanding of how to best use them and guidance around best practice evolve as well. That makes any one architecture less important than the principle behind it: measure, change one thing at a time, and keep what holds up.
This is one of those cases. As models get more capable and agents get longer running, more of your subagents can be skills and tools. You don’t have to make that move in one step, though. Build a small end-to-end eval, fold in one subagent, and keep it as a subagent only if the folded version scores worse, then rinse and repeat.
