ETAS让智能体系统编程更安全可控,把动作和权限变成可验证的代码元素。
ETAS: An Effect-Typed Language for Agent Systems
- 将智能体动作、权限、记忆等抽象为语言原生类型,支持静态检查
- 通过行为索引追踪请求与执行轨迹,防止越权或遗漏
- 适合开发需审计、授权和恢复的高可靠性智能体系统
ETAS 是一种面向智能体系统的编程语言,将模型驱动的智能体、工具调用、提示词、类型化内存、人工审批、策略及执行轨迹视为语义程序元素,而非库函数。它分离确定性计算与智能体非确定性行为及外部可见动作,保持直接编程风格。其静态语义通过规范一致性分配普通类型,并为每项计算追踪两个行为指标:逃逸效应行和可能请求的类型化动作轨迹持久抽象。规范构成终止的编译时约束逻辑:类型规范提供多态与资源证据,可调用规范约束函数与阶段结构,轨迹规范表达允许、禁止及时间约束。类型检查会对比请求轨迹与编译后的监控器,当动态资源不足时生成残留义务。动态语义区分请求、处理、拒绝与提交事件;处理器在解释类型化动作时不隐藏其请求,以保障授权与审计。我们形式化了核心演算,并证明了保持性、进展性、类型/效应安全性、处理器轨迹透明性与策略安全性。我们还用 Rust 实现了 ETAS,包含命令行接口、类型化中间表示检查、效应与策略诊断、处理器检查及轨迹感知执行钩子。ETAS 为智能体执行前与执行中对授权、非确定性、恢复与审计证据的推理提供了编程语言基础。
原文摘要 · Abstract (English)
ETAS is a programming language for agent systems that treats model-backed agents, tool calls, prompts, typed memory, human approvals, policies, and execution traces as semantic program elements rather than library conventions. It separates deterministic computation from agentic nondeterminism and externally visible actions while preserving a direct programming style. We present the core design of ETAS. Its static semantics assigns ordinary types through spec conformance and tracks each computation with two behavioral indices: an escaping effect row and a persistent abstraction of the typed action trace it may request. Specs form a terminating compile-time constraint calculus: type specs provide evidence for polymorphism and resource facts, callable specs constrain function and stage shapes, and trace specs express allow, deny, and temporal constraints. Typing checks requested traces against compiled monitors and emits residual obligations when dynamic resources preclude a complete static proof. The dynamic semantics distinguish requested, handled, denied, and committed events; handlers interpret typed actions without making their requests invisible to authorization or audit. We formalize a core calculus and state preservation, progress, type/effect soundness, handler trace-transparency, and policy safety. We also implement ETAS in Rust with a command-line interface, typed HIR checks, effect and policy diagnostics, handler checks, and trace-aware execution hooks. ETAS provides a programming-language foundation for reasoning about authorization, nondeterminism, recovery, and audit evidence before and during agent execution.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。