为本地AI代理添加运行时安全层,防止危险操作
AgentWall: A Runtime Safety Layer for Local AI Agents
- 在代理执行前拦截所有操作,按策略审查并要求人工确认
- 14项测试中策略执行准确率达92.9%,延迟低于1毫秒
- 支持多款开发工具,可一键部署,适合本地开发人员使用
自主AI代理的安全性已成为关键开放问题。随着代理从被动文本生成转向可执行命令、修改文件、调用API和浏览网页的主动行为,不当或恶意行为的后果变得即时且真实。现有安全工作主要聚焦于模型对齐和输入过滤,但未解决代理意图转化为真实机器操作时的风险。这一差距在本地环境中尤为突出,开发者在缺乏运行时控制的情况下直接操作自身文件系统、凭证和基础设施。本文提出AgentWall,一种针对本地AI代理的运行时安全与可观测性层。AgentWall在代理操作到达主机环境前进行拦截,依据显式声明式策略评估,并对敏感操作要求人工批准,同时记录完整执行日志以供审计与回放。其作为策略强制型MCP代理和原生OpenClaw插件实现,支持Claude Desktop、Cursor、Windsurf、Claude Code和OpenClaw,仅需一个安装命令。我们展示了AgentWall的设计、架构、威胁模型与策略模型,并在14项基准测试中实现92.9%的策略执行准确率,延迟低于1毫秒。AgentWall已开源:https://github.com/agentwall/Agentwall。
原文摘要 · Abstract (English)
The safety of autonomous AI agents is increasingly recognized as a critical open problem. As agents transition from passive text generators to active actors capable of executing shell commands, modifying files, calling APIs, and browsing the web, the consequences of unsafe or adversarially manipulated behavior become immediate and tangible. Existing AI safety work has focused primarily on model alignment and input filtering, but these approaches do not address what happens at the moment an agent's intent becomes a real action on a real machine. This gap is especially acute in local environments, where developers run agents against their own filesystems, credentials, and infrastructure with little runtime control. This paper introduces AgentWall, a runtime safety and observability layer for local AI agents. AgentWall intercepts every proposed agent action before it reaches the host environment, evaluates it against an explicit declarative policy, requires human approval for sensitive operations, and records a complete execution trail for audit and replay. It is implemented as a policy-enforcing MCP proxy and native OpenClaw plugin, working across Claude Desktop, Cursor, Windsurf, Claude Code, and OpenClaw with a single install command. We present the design, architecture, threat model, and policy model of AgentWall, and demonstrate 92.9% policy enforcement accuracy with sub-millisecond overhead across 14 benchmark tests. AgentWall is open-source at https://github.com/agentwall/Agentwall.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。