12.2 自定义工具:把副作用关进可控边界
12.2.1 自定义工具的最小原则:输入可验证,输出可回放
12.2.2 把工具接入工具策略:分层规则与拒绝优先
{
tools: {
profile: 'coding',
deny: ['shell.*', 'fs.write*', 'fs.delete*'],
},
channels: {
webchat: {
groups: {
'*': {
tools: { deny: ['shell.*'] },
},
},
},
ops: {
groups: {
'*': {
tools: { deny: ['shell.*'] },
toolsBySender: {
'admin_user': { alsoAllow: ['sandbox.*', 'fs.write*'] },
},
},
},
},
},
}12.2.3 高风险工具的隔离执行:多智能体沙箱工具
12.2.4 验收与排障:先看策略加载,再看单次调用链
最后更新于
