用编程语言类型系统管住智能体行为,让自动生成代码更安全
Language-Based Agent Control
- 要求智能体生成的代码通过类型检查,从源头杜绝危险操作
- 在文件系统沙箱、数据溯源和信息流控制中验证了效果
- 适合关注AI安全、可信赖智能体开发的研究者与工程师
本文提出语言基于代理控制(LBAC),一种新型智能体应用编程模型,将编程语言与语言级安全技术引入代理控制问题。传统编程中,静态类型与运行时强制机制长期用于确保良类型程序满足用户指定策略,包括访问控制、信息流、数据溯源等。LBAC的核心思想是将这些保障扩展至智能体应用:要求代理生成的代码在上下文支撑代码环境中自身也满足类型规范。不安全代码在执行前被类型检查器拒绝,使策略在整个应用中统一适用,涵盖代理生成行为与开发者编写的框架代码。同时,LBAC保持强表达能力:代理可执行任意无副作用计算,并递归调用子代理,后者仍享有完整工具访问权,但受相同或更严格策略约束。文中通过三个案例验证:基于文件系统能力的I/O沙箱、数据溯源与信息流控制。
原文摘要 · Abstract (English)
This paper introduces language-based agent control (LBAC), a new programming model for agentic applications that brings techniques from programming languages and language-based security to the problem of agent control. In conventional programming, combinations of static typing and runtime enforcement have long been used to guarantee that well-typed programs satisfy user-specified policies, including policies for access control, information flow, data provenance, and more. The key idea behind LBAC is to extend these guarantees to agentic applications by requiring agents to generate programs that are themselves well typed in the context of the surrounding scaffolding code. Unsafe programs are rejected by the type-checker before execution, allowing policies to apply uniformly across the entire application, including both agent-generated behavior and developer-written scaffolding. At the same time, LBAC preserves substantial expressiveness: agents may perform arbitrary side-effect-free computation and recursively invoke subagents, which retain full tool access subject to the same -- or potentially more restrictive -- policies. We demonstrate LBAC with three case studies: I/O sandboxing via filesystem capabilities, data provenance, and information-flow control.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。