arXiv:2608.17007cs.AI2026-08

让智能体工具执行时自动控制内存,防止爆内存

SkillEffect: Checked Lowering for Memory-Bounded Agent Tools

  • 用可验证的降低机制,在执行前检查代码是否超内存
  • 六类操作中峰值内存降低,固定内存上限下完成率提升
  • 支持多种计算模式,新功能只需写一个插件即可

智能体技能可定义工具使用的程序化和资源要求,语言模型将其转化为具体程序。但即使语义正确,程序也可能加载全部输入而超出单次调用的内存限制。我们提出 SkillEffect,一种基于可恢复源关系、经审计的有界实现和注册输出后置条件的受控降低运行时。独立检查器在授权执行前,从提交的程序和不可变输入重建每个提议的降低过程。每个关系插件提供源识别器、输入事实提取器、有界中间表示构造器、内存受限函数和后置条件;通用运行时则提供受控选择、有界虚拟机执行、原子容量租赁和分阶段发布。SkillEffect 的泛化是架构性的而非自动的:每种支持的计算需编写经审计的关系插件,但调度、资源控制、执行和发布机制可在插件间共享。在六类算子上,有界访问显著降低峰值内存,并在外部固定内存上限下提高完成率。六个插件在五种执行模式(从流式归约到有界堆Top-k)中实现相同合约。XLSX上手研究与Top-k扩展表明,新关系与新保留状态模式可复用同一信任边界,检查器接受所有合法配置,拒绝所有恶意提案。这些结果表明,单一受控降低架构可在智能体工具调度中强制执行异构注册内存关系。

原文摘要 · Abstract (English)

Agent Skills can specify procedural and resource obligations for tool use, and language models instantiate them as concrete programs. However, when models turn this guidance into code for existing tool interfaces, even a semantically correct program may load an entire input and exceed the memory available to one tool call. We present SkillEffect, a checked-lowering runtime for computations with a recoverable source relation, an audited bounded implementation, and a registered output postcondition. Before granting execution authority, an independent checker rebuilds each proposed lowering from the submitted program and immutable input. Every relation plugin supplies a source recognizer, input-fact extractor, bounded-IR constructor, arena-bound function, and postcondition; one common runtime provides checked selection, bounded-VM execution, atomic capacity leasing, and staged publication. Generality in SkillEffect is architectural rather than automatic: each supported computation requires an audited relation plugin, while the dispatch, resource-control, execution, and publication mechanisms are shared across plugins. Across six operator families, bounded access substantially reduces peak memory and improves completion under externally fixed caps. Six plugins instantiate the same contract across five execution patterns, from streaming reduction to bounded-heap Top-k. The XLSX onboarding study and Top-k extension show that a new relation and a new retained-state pattern reuse the same trust boundary, while the checker accepts all evaluated legal configurations and rejects all adversarial proposals. Together, these results show that one checked-lowering architecture can enforce heterogeneous registered memory relations at Agent tool dispatch.

内存控制智能体工具运行时安全

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。