Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Anthropic Says Fold Your Subagents. Let's Build a Tiny Single Agent Loop in TypeScript

说明与用途

文章阐述了从层级化代理架构转向单一循环,按需加载技能和工具,减少提示长度并提升质量。

问题

Organizational agent architectures create long prompts and lose context through handoffs.

结果

Running npx tsx loop.ts demonstrates a single loop handling a refund by loading only necessary skills and tools, then stopping at a write gate.

工作流

  • Define a two‑level catalog of skills and tools.
  • Expose only the catalog (names and short descriptions) to the model at start.
  • Implement loader tools that fetch full skill or tool definitions when needed.
  • Run the agent loop with a limit on context size and a write gate.
  • Execute the loop for a refund scenario, loading only required components.
  • Terminate after the write gate is reached.
  • Measure performance and compare to org‑chart approach.

证据

using fewer subagents in favor of progressively disclosed context and tools can improve quality while reducing cost and latency.

来源

By the end, you'll run one command: npx tsx loop.ts

来源

  • 记录日期: 2026-10-25T22:11:22.881Z