Dynamic Loading for Agent Knowledge
A tutorial presents three layers for managing an agent knowledge base: always-resident metadata, matched instructions injected on demand, and resources read only when needed. It describes a search, inspect and select routing process and provides a simple Python registry that stores metadata, bodies and resources separately. The article attributes the progressive-loading pattern in SKILL.md to Anthropic and calls it a mainstream agent-platform architecture, but the supplied report does not independently verify those claims. Its Python example uses simplified keyword matching rather than the vector retrieval and inspection process discussed in the article.
The approach is presented as a practical way to reduce context bloat and irrelevant information by keeping only a concise metadata directory resident, loading matched instructions when needed, and retrieving resources only when required.
核心结论:想让 Agent 更自动化,关键不是「给它更多知识」,而是「在对的时机只给它对的那一点知识」。做法是动态挂载(dynamic loading):把所有知识(Skill、领域文档、规则、经验)拆成「元数据常驻 + 正文按需注入 + 资源真需要才读」三层,Agent 先用一句话描述「有哪些能力」做路由,命中后才把完整内容拉进上下文。这就是 Anthropic 推行的 SKILL.md 三层渐进加载(progressive loading) 模式,也是当前 Agent 平台收敛出的主流架构。它解决的核心矛盾是:知识越多,全塞进上下文的成本越高、噪音越大、越容易选错——动态挂载让「看起来懂一万件事」和「实际只加载一件事」同时成立。