5. 执行与沙箱
10 模块知识库第 5 篇——讲 agent 在执行不可逆操作前如何被约束:Permission mode 详解、Sandbox 隔离、Trust layer、危险操作的 hook 拦截。
本文覆盖 3 种 sandbox 模型 + Trust Layer,以及怎么配:
- 3 种 sandbox 模型 process 沙箱 / container / microVM,各自的隔离粒度与性能
- Trust Layer 5 项 network 限制 / FS 限制 / syscall 过滤 / 资源配额 / 时间上限
- Code Execution 隔离 为什么 agent 跑用户代码必须 sandbox,跟 04-tool 沙箱的区别
- Network / FS 边界 allowlist vs denylist,scope(working dir / tmp / 只读)的设计
选型快查 (TL;DR)
| 场景 | 推荐子能力 | 代表 agent |
|---|---|---|
| 个人 coding / 改文件 | Default + OS sandbox | Claude Code macOS Seatbelt / Cursor |
| CI / ETL 自动跑 | Auto mode + MicroVM | Claude Code Auto / Manus sandbox |
| 高敏数据(医疗 / 金融) | VPC + CMEK + 私有化 | Antigravity VPC-SC / Qwen-Agent 专属版 2.0 |
| 企业级多租户 | Hyperforce + Trust layer | Agentforce / WorkBuddy 企业版 |
| 多 agent 协作 | Agent Workspace + 审计 | Copilot Studio / Devin sandbox |
| 合规审计 + Zero Retention | Audit log + ZDR | Claude Code / Cursor 2 / ChatGPT Agent ZDR |
1. 这是什么 + 为什么重要
执行与沙箱回答的是 agent 最底层的一组问题:它跑在哪?权限多大?被隔离到什么程度?
无论 agent 表面上是 IDE 插件(Claude Code、Cursor)、云端 IDE(Devin、Manus、Coze)、还是企业平台(Salesforce Agentforce、Microsoft Copilot Studio),每次 tool 调用都必须在某个执行环境中发生 — 这个环境就是"沙箱"(sandbox)。沙箱与权限共同决定三件事:
- 能不能做(permission):agent 调 tool 前是否需要用户批准?是否有 classifier 自动评估?
- 在哪做(isolation):代码在 host、Docker、VM 还是 serverless 容器里跑?
- 做了什么被记住(trust layer):用户数据是否保留?是否做毒性检测?是否做动态接地?
为什么重要:agent 能调的工具越强(写代码、改文件、发邮件、扣款),误操作的爆炸半径就越大。permission + sandbox + trust layer 三层共同构成"agent 信任栈"。任何一层缺失,都不能在企业生产环境使用 — 模块 10 治理合规的所有认证(SOC 2 / ISO 27001 / HIPAA / GDPR)都依赖这一层的实现质量。
来源:Claude Code 官方 doc https://code.claude.com/docs/en/sandboxing ✅;Salesforce Agentforce 官方 https://www.salesforce.com/agentforce/ ✅。
2. 子模块分解
2.1 Permission model(重点)
是什么:permission model 决定 agent 调 tool 前是否需要用户批准、以及按什么粒度批准。Claude Code 把这一机制做到行业最细,把"什么时候需要问用户"提炼成 6 种可切换的 mode,成为其他 agent 的事实参考模型。来源:Claude Code 官方 https://code.claude.com/docs/en/permission-modes ✅。
Claude Code 6 种 permission mode(标准定义)
| Mode | 默认行为 | 典型用途 | 限制 / 兜底 |
|---|---|---|---|
| Default mode | 每个 tool 首次使用都 prompt 用户批准 | 探索学习阶段,新用户 | 首次批准后可 allow / deny 持久化规则 |
| Plan mode | Claude 只读 explore,生成详细 plan 文档 → 等用户批准才能进入 Edit(4 阶段 Explore→Plan→Implement→Commit) | 大型重构、跨文件改动 | 触发方式:Shift+Tab 循环 / claude --permission-mode plan / /plan 单次 / defaultMode: "plan" settings.json 锁默认 |
| Accept Edits mode | 自动批准 file edit(Edit / Write)+ 常见 fs 命令(mkdir/touch/mv/cp/sed),但 Bash 命令仍需审批 | 日常 coding,平衡效率与安全 | Bash 命令仍逐条 prompt |
| Auto mode(Sonnet 4.6+ / Opus 4.6+) | 独立 classifier model 评估每条 command 风险,自动通过 routine 操作;block scope escalation / unknown infrastructure / hostile-content-driven actions | 长任务、CI、routine dev | 连续 3 次 block 或累计 20 次 block → fallback 到 default mode |
| Bypass Permissions mode | 全部跳过所有 permission prompt | 完全无人值守 | 仅限 sandboxed container / VM;root + 此 flag 在 host 上被拒 |
| DontAsk mode | 只允许 pre-approved tool 工作;其它一律拒绝 | 高敏感环境,防止任何 prompt | 不在白名单的全部 deny,无回退 |
来源:Claude Code 官方 https://code.claude.com/docs/en/permission-modes ✅ + Anthropic 工程博客 https://www.anthropic.com/engineering/claude-code-auto-mode ✅。
Hybrid 用法:Shift+Tab 在 session 中循环切换 mode;--permission-mode plan 启动时锁,后续 /plan 单次触发不锁。来源同上。
跨 agent 差异表(permission mode 视角)
| Agent | Permission mode 设计 | 官方 doc |
|---|---|---|
| Claude Code | 6 mode(Default/Plan/AcceptEdits/Auto/Bypass/DontAsk) + 规则文件(allow/deny/ask)+ wildcard 粒度 | https://code.claude.com/docs/en/permission-modes ✅ |
| Devin | Default(autonomous,自主执行)+ Take over(Interactive Browser 随时接管) | https://docs.devin.ai/ ✅(基于"Default + Take over"为唯一公开模式) |
| ChatGPT Agent | Tool approval(MCP require_approval: "never"/"always" + per-tool 白名单) + Guardrail 节点 "Require approval"(webhook 异步通知,approval_timeout: 600 默认 2 min) | https://platform.openai.com/docs/guides/agents/guardrails-approvals ✅ |
| WorkBuddy | 默认同意 + 危险操作确认(具体 mode 数量未公开) | https://workbuddy.tencent.com/ |
| Qwen-Agent | Default + 工具级 allow/deny(类 Claude Code 规则文件) | https://qwenlm.github.io/Qwen-Agent/ |
| Antigravity | Default + JSON Hooks(Antigravity 2.0,Pre-execution Guard:hook 中拒/改/记 agent 即将执行的动作) + ADK Action confirmations | https://antigravity.google/docs/enterprises + https://google.github.io/adk-docs/tools-custom/confirmation/ ✅ |
| Agentforce | Atlas hybrid reasoning(LLM 概率思维 + Agent Script 业务规则确定性,共存的"双轨制") + Agent Guardrails(企业自定义防护栏) | https://www.salesforce.com/agentforce/ + https://engineering.salesforce.com/inside-the-brain-of-agentforce-revealing-the-atlas-reasoning-engine/ ✅ |
| Sierra | Default(autonomous) + Plan approve | https://sierra.ai/product/trust-and-reliability ✅ |
| Manus | Default + Take over | https://manus.im/ |
| Cursor 2 | Default + Plan Mode(Shift+Tab)+ 企业版 Auto-run / browser / network 全局策略(白/黑名单命令) | https://cursor.com/security ✅ |
| Coze 3 | Default + Bot 配置(每个 Bot 可单独配工具调用权限) | https://www.coze.com/ |
| Copilot Studio | Default + Power Automate Approval(暂停 → 发 Outlook/Teams 审批 → 等回复 → 续) + Trigger 默认使用 maker 凭据(注意权限继承) | https://learn.microsoft.com/en-us/microsoft-copilot-studio/admin-authentication + https://learn.microsoft.com/en-us/microsoft-copilot-studio/authoring-triggers-events ✅ |
| Trae Solo | Default + Builder 2.0 触发器 | https://trae.ai/ |
| AutoGPT | Default(autonomous 自主规划) + Docker 隔离 | https://github.com/Significant-Gravitas/AutoGPT |
| Accio Work | Default |
2.2 Sandbox 隔离
是什么:sandbox 是 agent 跑代码的隔离边界。隔离级别从弱到强:host 进程 → Docker container → Linux user namespace → Firecracker MicroVM → 完整 VM(VMWare/KVM/Hyperforce)→ 安全 enclave(SEV/TEE)。隔离越强,误操作爆炸半径越小,但冷启动越慢、并发密度越低。
4 种典型隔离技术(通用知识)
| 技术 | 隔离强度 | 冷启动 | 典型场景 |
|---|---|---|---|
| Docker container | 中(共享 host kernel) | 秒级 | Qwen-Agent 本地、ChatGPT Agent 默认 hosted container、AutoGPT、WorkBuddy |
| Linux user namespace + seccomp(bubblewrap) | 中-高(unprivileged) | 秒级 | Claude Code Linux 本地 sandbox |
macOS Seatbelt(sandbox-exec) | 高(macOS 内核级) | 毫秒级 | Claude Code macOS 本地 sandbox |
| Firecracker MicroVM | 高(独立 guest kernel) | 毫秒级 | Coze 3 HiAgent 2.0 企业版(并发 200+)、AWS Lambda 同源 |
| 完整 VM(KVM / VMWare / Hyperforce) | 最高(独立 OS) | 数十秒-分钟 | Devin Cognition cloud、Manus、Agentforce Hyperforce、ChatGPT Agent Codex Cloud VM |
来源:Qwen-Agent https://github.com/QwenLM/Qwen-Agent ✅;ChatGPT Agent https://platform.openai.com/docs/guides/agents/sandboxes ✅;Claude Code sandboxing https://code.claude.com/docs/en/sandboxing ✅;HiAgent 2.0 字节跳动 https://www.coze.cn/(基于公开材料)。
Claude Code 三层 sandbox 模型(行业参考)
- 本地 Bash sandbox:macOS Seatbelt / Linux bubblewrap(WSL2 也支持)+ Seccomp filter;默认 write 仅 working dir + session temp,默认 read 整 computer(除 denied)。配置项:
sandbox.filesystem.allowWrite/denyWrite/allowRead/denyRead+sandbox.network.allowedDomains/deniedDomains+sandbox.allowUnixSockets+sandbox.failIfUnavailable。来源:Claude Code 官方 https://code.claude.com/docs/en/sandboxing ✅ - claude.ai/code 云端 VM:每个 session 独立 Anthropic VM,network default-deny + allowlist;所有 Git 操作通过 secure proxy(用 sandbox 内 scoped credential 翻译为用户的实际 GitHub token)。来源:Claude Code 官方 https://claude.ai/code + https://code.claude.com/docs/en/security ✅
- Desktop app:Claude 在实际桌面跑 computer use(不是隔离环境),per-app permission prompt(macOS TCC)。来源:Claude Code 官方 https://code.claude.com/docs/en/desktop ✅
跨 agent sandbox 对比
| Agent | Sandbox 类型 | 网络策略 | 隔离强度 |
|---|---|---|---|
| Claude Code | Seatbelt / bubblewrap / Anthropic VM / cloud VM | default-deny + allowlist | 中-高 |
| Devin | Cognition cloud ephemeral sandbox,每 session 独立 + machine image 自定义 | 企业 per-org network policy | 高 |
| ChatGPT Agent | Hosted Docker container(默认) + Codex Cloud VM(独立)+ 用户配 sandbox agents(client.sandboxes.create({name, snapshot, mounts})) | default deny + domain allowlist | 中-高 |
| WorkBuddy | Docker 沙箱 | 未公开 | 中 |
| Qwen-Agent | 本地 Docker container | 未公开 | 中 |
| Antigravity | Agent Sandbox 企业版 + Managed Agents(隔离 Linux 环境,持久保存) | 未公开 | 中-高 |
| Agentforce | Hyperforce(AWS 编排)+ Asymmetric Multi-tenancy | 强认证/授权/容器管理 | 最高 |
| Sierra | Sierra cloud + Ghostwriter sandboxed environment(改动验证) | 未公开 | 高 |
| Manus | 完整 sandboxed VM + 持久 filesystem | internet access | 高 |
| Cursor 2 | 本地 IDE + Sandbox rules(企业白/黑名单命令)+ Composer 训练用 hundreds of thousands of concurrent sandboxed coding environments | 企业可配 | 中 |
| Coze 3 | Coze 云 + HiAgent 2.0 Firecracker MicroVM(企业版) | 未公开 | 中-高 |
| Copilot Studio | Agent Workspace 隔离环境(Computer Use 专用,与用户 Windows 桌面分离)+ VNet(VPC 集成) | Azure VNet | 高 |
| Trae Solo | Cloud | 未公开 | 中 |
| AutoGPT | Docker Compose(docker compose up -d 起 PostgreSQL/Redis/RabbitMQ/Backend/Frontend/Executor) | 未公开 | 中 |
| Accio Work | 未公开 | 未公开 | ❓ |
来源:Devin https://trust.cognition.ai/ + app.devin.ai/admin/network ✅;ChatGPT Agent https://platform.openai.com/docs/guides/agents/sandboxes + https://platform.openai.com/codex/concepts/sandboxing ✅;Agentforce Hyperforce https://engineering.salesforce.com/hyperforce-behind-the-scenes-ushering-in-a-new-age-of-ai-driven-cloud-scalability/ ✅;Sierra https://sierra.ai/product/trust-and-reliability ✅;Manus https://manus.im/ ✅;Copilot Studio Agent Workspace https://learn.microsoft.com/en-us/microsoft-copilot-studio/authoring-computer-use + https://learn.microsoft.com/en-us/microsoft-copilot-studio/admin-vnet ✅;AutoGPT https://github.com/Significant-Gravitas/AutoGPT ✅。
2.3 Trust layer
是什么:Trust layer 是企业级数据保护层,典型 3 件套:零数据保留(ZDR)+ 毒性检测(Toxicity Detection)+ 动态接地(Dynamic Grounding)。Salesforce 把这 3 件套打包成 "Einstein Trust Layer" 成为行业命名范式。来源:Salesforce 官方 https://www.salesforce.com/agentforce/ ✅。
3 件套标准定义
| 组件 | 定义 | 价值 |
|---|---|---|
| Zero Data Retention(ZDR) | Provider 不保留用户 prompt/response,可配置 enterprise API tier | 满足 GDPR/CCPA"数据最小化" |
| Toxicity Detection | 输入/输出双向过滤毒性内容(hate / harassment / self-harm / sexual / violence) | 防止 agent 输出合规风险 |
| Dynamic Grounding | 用企业自有数据(dataverse / KB / Salesforce records)实时接地 agent 响应,带 inline citation | 降低幻觉,增强 RAG |
来源:Salesforce 官方 https://www.salesforce.com/agentforce/ ✅ + https://www.salesforce.com/agentforce/how-it-works/ ✅。
跨 agent Trust layer 对比
| Agent | ZDR | Toxicity | Dynamic Grounding | 额外能力 |
|---|---|---|---|---|
| Claude Code | ✅(API 默认) | Anthropic 内置 | Knowledge file + RAG | audit hook 写 SIEM(permissions.audit-log) |
| Devin | ✅ | 内置 | Knowledge base(2000 char/entry) | Cognition Trust Center https://trust.cognition.ai/ |
| ChatGPT Agent | ✅ | 内置 | Connector Registry OAuth + scope + SIEM | Workload Identity Federation(OIDC trust, 短 TTL token,无 static API key) |
| WorkBuddy | ✅ | 内置 | ima 知识库 + 腾讯乐享 | 5 大可信能力 + 审计事件(细粒度,90 天保留)⚠️ 来源.cursor.com SOC 2 Type II |
| Coze 3 | ✅ | 内置 | Bot 知识库 | 开源版可私有部署 |
| Copilot Studio | ✅ | 内置 | SharePoint / OneDrive / Dataverse KB(Entra ID 权限继承) | Sensitivity labels 自动展示 |
| Trae Solo | ✅ | 内置 | Knowledge | ❌ |
| AutoGPT | ✅(自托管) | 内置 | Vector store | 完全自托管,无 provider 数据流出 |
| Accio Work | ❓ | ❓ | ❓ | ❓ |
来源:Claude Code https://www.anthropic.com/engineering/claude-code-best-practices + permissions.audit-log 配置 ✅;Devin https://trust.cognition.ai/ ✅;ChatGPT Agent https://trust.openai.com/ + https://openai.com/index/chatgpt-agent/ ✅;Agentforce https://www.salesforce.com/agentforce/ ✅;Sierra https://sierra.ai/product/trust-and-reliability ✅;Cursor https://trust.cursor.com/ ✅;Copilot Studio https://learn.microsoft.com/en-us/microsoft-copilot-studio/authoring-knowledge ✅;WorkBuddy https://blog.csdn.net/Aaronfaty/article/details/160103742 ⚠️;其余。
2.4 Network access
是什么:agent 是否能联网、调哪些域名。多数企业级 sandbox 默认 network default-deny + allowlist,再按业务域逐个开放(npm / PyPI / GitHub / 公司 API 等)。
跨 agent network access 模式
| Agent | 默认策略 | 配 allowlist 的方式 |
|---|---|---|
| Claude Code | 本地 sandbox:default-deny(除非显式 allow)/ 云 VM:default-deny + allowlist | sandbox.network.allowedDomains/deniedDomains + sandbox.network.allowManagedDomainsOnly(managed 锁域名) |
| Devin | per-org network policy | app.devin.ai/admin/network |
| ChatGPT Agent | default deny + domain allowlist | sandbox 配置 + Codex 配置 |
| Agentforce | Hyperforce 容器内,需配 data policy | Salesforce data policy |
| Cursor 2 | 企业版 Auto-run / browser / network controls 全局策略 | admin console |
| Copilot Studio | VNet 集成,数据驻留在客户私有网络 | admin-vnet |
来源:Claude Code https://code.claude.com/docs/en/sandboxing + sandbox.network.allowManagedDomainsOnly ✅;Devin app.devin.ai/admin/network ✅;ChatGPT Agent https://platform.openai.com/docs/guides/agents/sandboxes ✅;Copilot Studio https://learn.microsoft.com/en-us/microsoft-copilot-studio/admin-vnet ✅;Cursor 2 https://cursor.com/security + https://cursor.com/pricing ✅。
2.5 File system access
是什么:agent 能读/写哪些文件/文件夹。最小化原则:working dir + session temp 是默认 read/write 白名单;ssh key、~/.aws/credentials、~/.ssh/、/etc/ 必须 deny。
跨 agent file system access
| Agent | 默认 read | 默认 write | 关键配置 |
|---|---|---|---|
| Claude Code | 整 computer(除 denied) | working dir + session temp | sandbox.filesystem.allowWrite/denyWrite/allowRead/denyRead + sandbox.filesystem.allowManagedReadPathsOnly(managed 锁 read) |
| Devin | session 独立 ephemeral FS | ephemeral FS(session 结束 destroy) | machine image customization |
| ChatGPT Agent | sandbox FS | sandbox FS | mounts 配置 |
| Agentforce | Hyperforce 容器 FS | Hyperforce 容器 FS | Data 360 数据源 |
| Sierra | Sierra cloud FS | Sierra cloud FS | per-customer 隔离 |
| Manus | 持久 FS(任务结束保留) | 持久 FS | session "续杯"能力 |
| Cursor 2 | 本地 IDE 打开的文件 | 本地 IDE 打开的文件 | .cursorrules + Admin sandbox rules |
| Copilot Studio | Dataverse / SharePoint / OneDrive(Entra 权限继承) | KB 写入需 admin 权限 | Data policies for agents(DLP) |
| AutoGPT | 自托管 FS | 自托管 FS | Vector store 路径 |
来源:Claude Code https://code.claude.com/docs/en/sandboxing ✅;Devin ephemeral sandbox app.devin.ai ✅;Manus 持久 FS https://manus.im/ ✅;Copilot Studio https://learn.microsoft.com/en-us/microsoft-copilot-studio/authoring-knowledge + https://learn.microsoft.com/en-us/microsoft-copilot-studio/admin-data-policies ✅。
2.6 Auth / Authz
是什么:用户怎么登录 agent(认证)+ 用户能做什么(授权)。Authn(Authentication):OAuth / API key / SAML SSO / LDAP / Entra ID / Workload Identity;Authz(Authorization):RBAC / scope / permission inheritance。
跨 agent Auth/Authz 对比
| Agent | Authn 选项 | Authz 模型 | 官方 doc |
|---|---|---|---|
| Claude Code | MCP OAuth(Dynamic Client Registration / Pre-configured client_id / CIMD)+ headersHelper token 刷新 + headersHelper 动态生成 auth headers | Permission rules(allow/deny/ask)+ managed policy | https://code.claude.com/docs/en/mcp ✅ |
| Devin | SAML/OIDC SSO + Enterprise accounts 多组织 | per-org RBAC + knowledge per-repo | Devin Enterprise ✅ |
| ChatGPT Agent | Connector Registry OAuth + scope + Workload Identity Federation(OIDC trust, 短 TTL) + static API key | scope + SIEM 审计 | https://trust.openai.com/ + https://platform.openai.com/codex/concepts/sandboxing ✅ |
| WorkBuddy | AD 域控 / SAML SSO / LDAP(configure_ldap / configure_saml)⚠️ 来源.csdn.net/Aaronfaty/article/details/160103742 ⚠️ | Qwen-Agent | OAuth + API key |
| ISO 42001/27001 + RBAC | https://qwenlm.github.io/Qwen-Agent/ | Antigravity | ADK Tool authentication + Gemini Enterprise 1,400+ connectors |
| Project 取代 workspace + Global/Workspace Rules 双层 | https://google.github.io/adk-docs/tools-custom/authentication/ ✅ | Agentforce | OAuth 2.0 + SAML SSO(Okta / Azure AD / Ping Identity)+ RBAC(继承 Salesforce 原生) |
| Salesforce 共享模型 + 细粒度权限 | https://www.salesforce.com/agentforce/ ✅ | Sierra | Auth |
| Auth | Manus | Auth | Granular sharing permissions(企业) |
| https://manus.im/ ✅ | Cursor 2 | API key + OAuth + SAML/OIDC SSO(Teams/Enterprise) | Repository / model / MCP access controls + Team privacy mode |
| https://cursor.com/pricing ✅ | Coze 3 | Bot 权限 | Bot 配置 |
| https://www.coze.com/ | Copilot Studio | Microsoft Entra ID SSO + Generic OAuth 2.0 + API Key + No auth + Manual authentication(per-user consent) | Entra ID RBAC + Adaptive card state |
| https://learn.microsoft.com/en-us/microsoft-copilot-studio/admin-authentication ✅ | Trae Solo | Auth | Auth |
| AutoGPT | API Key management(backend/services/auth_service.py)+ 自托管 | RBAC | https://github.com/Significant-Gravitas/AutoGPT ✅ |
| Accio Work | ❓ | ❓ | ❓ |
2.7 Cost control
是什么:单 session 消耗上限、token 预算、按 conversation / 按 action / 按 token 计费的预算上限。Cost control 的最小实现:per-session token 预算 + 超限自动停。高级实现:per-tenant / per-user / per-conversation 三层 budget + 实时 dashboard。
跨 agent cost control 对比
| Agent | 计费单位 | 配额管控 | 监控 dashboard |
|---|---|---|---|
| Claude Code | Subscription(Free/Pro $17/Max $100)+ API token 计费 | Max plan 高用量 + claude.ai Memory(Settings 配) | Claude dashboard |
| Devin | $20/座/月(Core/Team/Enterprise) | Custom pricing | Devin admin |
| ChatGPT Agent | Subscription(Plus $20 + Agent add-on)+ per-image cost(image gen)+ Codex per-run pricing | Add-on 配额 | OpenAI dashboard |
| WorkBuddy | 个人免费 + 专业版 58 元/月 + 企业部署 | 企业管理后台 | WorkBuddy console |
| Qwen-Agent | Token Plan 标准坐席 198 元 + API 按 token | 专属版配额 | Qwen dashboard |
| Antigravity | Subscription(Free/Pro $20/Ultra $250)+ Composer 训练推理 token 单独计费 + 8 model judging = 8x token + Cloud agents per run/hour | 设置面板可看每 5 小时重置额度 | Antigravity settings → model |
| Agentforce | Flex Credits $500/100k Credits + Conversation $2/次(行业首创) + Action 20 credits / Voice 30 credits + Agentforce add-on $125/用户/月 + 1 Editions $550 含 2.5M Flex Credits/org/年 | Flex Credits 统一额度池 | Salesforce Flex Credits console |
| Sierra | Subscription(custom pricing) | Custom | Sierra admin |
| Manus | Subscription(Free/Pro $39/Team) | Subscription 配额 | Manus dashboard |
| Cursor 2 | Hobby Free / Pro $20 / Pro+ / Ultra / Teams $40 / Enterprise custom + Composer token + Cloud agents per run/hour + Bugbot per PR review | Pooled usage(Enterprise) + Usage analytics(Teams) | Cursor admin |
| Coze 3 | 开源免费 + Coze Pro 商业版 | Bot 配置 | Coze console |
| Copilot Studio | $0.01/message + Subscription + Copilot Credits | per-agent consumption tracking(可见每 agent 消耗,但 NOT tenant 级) | Copilot Studio admin licensing |
| Trae Solo | Free / SOLO | Subscription | Trae console |
| AutoGPT | 开源免费 + 云服务 | 自托管配额 | 自托管 |
| Accio Work | Subscription | Subscription | ❓ |
来源:Agentforce Flex Credits / Conversation / Action https://www.salesforce.com/agentforce/pricing/ ✅;Cursor Teams/Enterprise https://cursor.com/pricing ✅;Copilot Studio per-agent consumption https://learn.microsoft.com/en-us/microsoft-copilot-studio/admin-licensing ✅;Antigravity 5 小时配额 https://watcha.cn/products/963/forum/2703 ⚠️;其余 官方文档提取。
3. 横向对比总表(执行与沙箱 × 15 agent)
| Agent | Permission mode | Sandbox | Trust layer | Network default | Auth | Cost unit |
|---|---|---|---|---|---|---|
| Claude Code | 6 mode(Default/Plan/AcceptEdits/Auto/Bypass/DontAsk) | Seatbelt/bubblewrap + Anthropic VM | ✅ ZDR + audit hook | default-deny + allowlist | MCP OAuth + SAML | Subscription + token |
| Devin | Default + Take over | Cognition cloud ephemeral VM | ✅ ZDR + Trust Center | per-org policy | SAML/OIDC SSO + Enterprise accounts | $20/座/月 |
| ChatGPT Agent | Tool approval + Guardrail "Require approval" | Hosted Docker + Codex Cloud VM | ✅ ZDR + Workload Identity Fed | default-deny + allowlist | OAuth + WIF + API key | Subscription + per-image + per-run |
| WorkBuddy | 默认同意 + 危险确认 | Docker 沙箱 | ✅ 5 大可信(,400+ connectors | Free/Pro $20/Ultra $250 + token | Agentforce | Atlas hybrid + Agent Guardrails |
| Hyperforce + Asymmetric Multi-tenancy | ✅ Einstein Trust Layer(ZDR + Toxicity + Dynamic Grounding) | 强认证/容器管理 | OAuth 2.0 + SAML SSO + RBAC | Flex Credits + $2/对话(行业首创)+ $125/用户/月 | Sierra | Default + Plan approve |
| Sierra cloud + Ghostwriter sandbox | ✅ ZDR + PCI 专用隔离 | 未公开 | 未公开 | Custom | Manus | Default + Take over |
| 完整 sandboxed VM + 持久 FS | ✅ ZDR + Audit logs | internet access | 未公开 | Free/Pro $39/Team | Cursor 2 | Default + Plan + 企业 Auto-run |
| 本地 IDE + Sandbox rules + Composer 训练沙箱 | ✅ Privacy mode + SOC 2 Type II | 企业可配 | API key + SAML/OIDC SSO | Free/Pro $20/Teams $40 + Composer token | Coze 3 | Default + Bot 配置 |
| Coze 云 + HiAgent 2.0 Firecracker MicroVM | ✅ ZDR + 开源版私有部署 | 未公开 | Bot 权限 | 开源免费 + Coze Pro | Copilot Studio | Default + Power Automate Approval |
| Agent Workspace + VNet | ✅ ZDR + sensitivity labels | VNet 集成 | Entra ID SSO + OAuth 2 + API key + Manual | $0.01/message + per-agent Credits | Trae Solo | Default + Builder 触发器 |
| Cloud | ✅ ZDR | 未公开 | 未公开 | Free / SOLO | AutoGPT | Default(autonomous) |
| Docker Compose | ✅ 自托管 ZDR | 未公开 | API Key management | 开源免费 + 云服务 | Accio Work | Default |
| 未公开 | ❓ | 未公开 | ❓ | Subscription |
4. 选型建议
按使用场景选:
- 个人开发者 / 小团队 coding → Claude Code Default / AcceptEdits mode + macOS Seatbelt sandbox + 无 SSO。成本最低,体验最好。 来源:Claude Code 官方 ✅
- 大企业 coding,需 CI/CD 自动跑 → Claude Code Bypass Permissions + Anthropic 云 VM(只能在 sandboxed container / VM 跑) + Claude Max plan + audit hook 写 SIEM。来源:Claude Code 官方 ✅
- 企业 SaaS agent(客服/HR/IT) → Agentforce(Salesforce 生态)/ Copilot Studio(Microsoft 生态)+ Einstein Trust Layer 或 ZDR + SAML SSO + Flex Credits 预算池 + per-agent consumption tracking。来源:Salesforce 官方 + Microsoft Learn ✅
- 完全自托管 / 数据不出网 → Qwen-Agent(本地 Docker)+ AutoGPT(自托管)+ OpenAI Workload Identity Federation(若用 Codex)。来源:Qwen-Agent + AutoGPT 官方 ✅
- 银行 / 医疗 / 政府 → Devin Enterprise(VPC 部署 + per-org network policy)+ Claude Code DontAsk mode +
sandbox.filesystem.allowManagedReadPathsOnly = true+ Entra ID sensitivity labels。来源:Devin Trust Center + Claude Code 官方 ✅ - Computer Use 自动化(legacy ERP) → Copilot Studio Agent Workspace(独立 sandbox,user 可实时观察)+ WorkBuddy Docker 沙箱 + Auto-mode(类 Claude Code)+ Power Automate Approval HITL。来源:Microsoft Learn ✅
- 多 agent 协作 / 企业大型平台 → Agentforce Hyperforce + Cooperative Swarms + Concierge Orchestrator + RBAC 继承 Salesforce 模型。来源:Salesforce Engineering ✅
按信任要求选:
- 只要基本数据保护 → Claude Code Default + ZDR(API 默认)
- 要企业认证(SOC 2 / ISO 27001 / HIPAA / GDPR):15 个 agent 全部覆盖(除 Accio Work 未确认)
- 要 FedRAMP(美国联邦政府)→ Agentforce for Public Sector ✅,其余需自建
- 要 PCI-DSS(信用卡数据)→ Sierra PCI 专用基础设施隔离("Cardholder data isolated by architecture")✅
- 要私有化部署 → Qwen-Agent / AutoGPT / Devin Enterprise / Copilot Studio VNet / Agentforce Hyperforce