- 新增 .openclaw/ 网关配置 (openclaw.json, .env.example) - 7 个专业 Agent 独立 workspace:生产总控、模具管理、注塑管理、质量管理、仓储物流、设备管理、数据分析 - 每个 Agent 含 SOUL.md / AGENTS.md / USER.md / TOOLS.md / IDENTITY.md - 适配铭奕精密科技模具组与注塑组生产管理场景 Made-with: Cursor
324 lines
8.0 KiB
JSON
324 lines
8.0 KiB
JSON
{
|
||
// ============================================================
|
||
// 铭奕精密科技 MOM 系统 - OpenClaw 多 Agent 网关配置
|
||
// ============================================================
|
||
|
||
// 环境变量(API keys 存放在 .env 中,通过 ${VAR} 引用)
|
||
env: {
|
||
shellEnv: {
|
||
enabled: true,
|
||
timeoutMs: 15000
|
||
}
|
||
},
|
||
|
||
// 认证配置
|
||
auth: {
|
||
profiles: {
|
||
"anthropic:mingyi": {
|
||
provider: "anthropic",
|
||
mode: "api_key"
|
||
},
|
||
"openai:mingyi": {
|
||
provider: "openai",
|
||
mode: "api_key"
|
||
}
|
||
},
|
||
order: {
|
||
anthropic: ["anthropic:mingyi"],
|
||
openai: ["openai:mingyi"]
|
||
}
|
||
},
|
||
|
||
// 日志配置
|
||
logging: {
|
||
level: "info",
|
||
file: "~/.openclaw/logs/mom-system.log",
|
||
consoleLevel: "info",
|
||
consoleStyle: "pretty",
|
||
redactSensitive: "tools"
|
||
},
|
||
|
||
// 消息格式
|
||
messages: {
|
||
messagePrefix: "[铭奕MOM]",
|
||
responsePrefix: ">",
|
||
ackReaction: "👀",
|
||
ackReactionScope: "group-mentions"
|
||
},
|
||
|
||
// 路由与消息队列
|
||
routing: {
|
||
groupChat: {
|
||
mentionPatterns: ["@铭奕MOM", "@mom", "@mingyi"],
|
||
historyLimit: 100
|
||
},
|
||
queue: {
|
||
mode: "collect",
|
||
debounceMs: 1500,
|
||
cap: 30,
|
||
drop: "summarize"
|
||
}
|
||
},
|
||
|
||
// Session 行为
|
||
session: {
|
||
scope: "per-sender",
|
||
reset: {
|
||
mode: "daily",
|
||
atHour: 4,
|
||
idleMinutes: 60
|
||
},
|
||
resetTriggers: ["/new", "/reset", "/重置"],
|
||
store: "~/.openclaw/sessions/sessions.json",
|
||
maintenance: {
|
||
mode: "warn",
|
||
pruneAfter: "30d",
|
||
maxEntries: 1000,
|
||
rotateBytes: "20mb",
|
||
resetArchiveRetention: "90d",
|
||
maxDiskBytes: "1gb"
|
||
},
|
||
typingIntervalSeconds: 3
|
||
},
|
||
|
||
// ============================================================
|
||
// 通道配置(预留企业微信、钉钉、Slack)
|
||
// ============================================================
|
||
channels: {
|
||
defaults: {
|
||
groupPolicy: "allowlist",
|
||
heartbeat: {
|
||
showOk: false,
|
||
showAlerts: true,
|
||
useIndicator: true
|
||
}
|
||
},
|
||
|
||
// 企业微信 - 工厂主要通讯工具
|
||
// 注意:需要对接企业微信 API,配置 corpId / agentId / secret
|
||
// whatsapp 通道用作企业微信桥接的占位
|
||
whatsapp: {
|
||
dmPolicy: "allowlist",
|
||
allowFrom: ["+86_REPLACE_PRODUCTION_MANAGER_PHONE"],
|
||
groupPolicy: "allowlist",
|
||
groupAllowFrom: ["+86_REPLACE_PRODUCTION_MANAGER_PHONE"],
|
||
groups: {
|
||
"*": { requireMention: true }
|
||
},
|
||
textChunkLimit: 4000,
|
||
mediaMaxMb: 50
|
||
},
|
||
|
||
// Slack - 技术团队协作
|
||
slack: {
|
||
enabled: false,
|
||
botToken: "${SLACK_BOT_TOKEN}",
|
||
appToken: "${SLACK_APP_TOKEN}",
|
||
channels: {
|
||
"#mom-production": { allow: true, requireMention: false },
|
||
"#mom-quality": { allow: true, requireMention: true },
|
||
"#mom-warehouse": { allow: true, requireMention: true },
|
||
"#mom-equipment": { allow: true, requireMention: true },
|
||
"#mom-alerts": { allow: true, requireMention: false }
|
||
},
|
||
dm: {
|
||
enabled: true,
|
||
allowFrom: ["${SLACK_ADMIN_USER_ID}"]
|
||
}
|
||
},
|
||
|
||
// Telegram - 备用通道
|
||
telegram: {
|
||
enabled: false,
|
||
botToken: "${TELEGRAM_BOT_TOKEN}",
|
||
dmPolicy: "allowlist",
|
||
allowFrom: ["${TELEGRAM_ADMIN_ID}"],
|
||
groups: {
|
||
"*": { requireMention: true }
|
||
}
|
||
},
|
||
|
||
// 按通道指定 Agent 模型
|
||
modelByChannel: {
|
||
slack: {
|
||
"#mom-production": "anthropic/claude-sonnet-4-5",
|
||
"#mom-alerts": "anthropic/claude-sonnet-4-5"
|
||
}
|
||
}
|
||
},
|
||
|
||
// ============================================================
|
||
// Agent 配置 - 7 个专业 Agent
|
||
// ============================================================
|
||
agents: {
|
||
defaults: {
|
||
userTimezone: "Asia/Shanghai",
|
||
model: {
|
||
primary: "anthropic/claude-sonnet-4-5",
|
||
fallbacks: ["anthropic/claude-opus-4-6", "openai/gpt-4o"]
|
||
},
|
||
models: {
|
||
"anthropic/claude-opus-4-6": { alias: "opus" },
|
||
"anthropic/claude-sonnet-4-5": { alias: "sonnet" },
|
||
"openai/gpt-4o": { alias: "gpt" }
|
||
},
|
||
thinkingDefault: "medium",
|
||
verboseDefault: "off",
|
||
elevatedDefault: "on",
|
||
timeoutSeconds: 600,
|
||
mediaMaxMb: 10,
|
||
maxConcurrent: 5
|
||
},
|
||
|
||
list: [
|
||
// ---- 1. 生产总控 Agent ----
|
||
{
|
||
id: "production-master",
|
||
workspace: "~/.openclaw/workspace-production-master",
|
||
model: {
|
||
primary: "anthropic/claude-sonnet-4-5",
|
||
fallbacks: ["anthropic/claude-opus-4-6"]
|
||
}
|
||
},
|
||
|
||
// ---- 2. 模具管理 Agent ----
|
||
{
|
||
id: "mold-manager",
|
||
workspace: "~/.openclaw/workspace-mold-manager",
|
||
model: {
|
||
primary: "anthropic/claude-sonnet-4-5",
|
||
fallbacks: ["anthropic/claude-opus-4-6"]
|
||
}
|
||
},
|
||
|
||
// ---- 3. 注塑管理 Agent ----
|
||
{
|
||
id: "injection-manager",
|
||
workspace: "~/.openclaw/workspace-injection-manager",
|
||
model: {
|
||
primary: "anthropic/claude-sonnet-4-5",
|
||
fallbacks: ["anthropic/claude-opus-4-6"]
|
||
}
|
||
},
|
||
|
||
// ---- 4. 质量管理 Agent ----
|
||
{
|
||
id: "quality-inspector",
|
||
workspace: "~/.openclaw/workspace-quality-inspector",
|
||
model: {
|
||
primary: "anthropic/claude-sonnet-4-5",
|
||
fallbacks: ["anthropic/claude-opus-4-6"]
|
||
}
|
||
},
|
||
|
||
// ---- 5. 仓储物流 Agent ----
|
||
{
|
||
id: "warehouse-logistics",
|
||
workspace: "~/.openclaw/workspace-warehouse-logistics",
|
||
model: {
|
||
primary: "anthropic/claude-sonnet-4-5",
|
||
fallbacks: ["anthropic/claude-opus-4-6"]
|
||
}
|
||
},
|
||
|
||
// ---- 6. 设备管理 Agent ----
|
||
{
|
||
id: "equipment-manager",
|
||
workspace: "~/.openclaw/workspace-equipment-manager",
|
||
model: {
|
||
primary: "anthropic/claude-sonnet-4-5",
|
||
fallbacks: ["anthropic/claude-opus-4-6"]
|
||
}
|
||
},
|
||
|
||
// ---- 7. 数据分析 Agent ----
|
||
{
|
||
id: "data-analyst",
|
||
workspace: "~/.openclaw/workspace-data-analyst",
|
||
model: {
|
||
primary: "anthropic/claude-opus-4-6",
|
||
fallbacks: ["anthropic/claude-sonnet-4-5"]
|
||
}
|
||
}
|
||
]
|
||
},
|
||
|
||
// ============================================================
|
||
// 工具权限配置
|
||
// ============================================================
|
||
tools: {
|
||
allow: ["exec", "process", "read", "write", "edit", "apply_patch"],
|
||
deny: ["browser", "canvas"],
|
||
exec: {
|
||
backgroundMs: 15000,
|
||
timeoutSec: 1800,
|
||
cleanupMs: 1800000
|
||
},
|
||
media: {
|
||
audio: {
|
||
enabled: true,
|
||
maxBytes: 20971520,
|
||
models: [
|
||
{ provider: "openai", model: "gpt-4o-mini-transcribe" }
|
||
],
|
||
timeoutSeconds: 120
|
||
},
|
||
video: {
|
||
enabled: false
|
||
}
|
||
},
|
||
elevated: {
|
||
enabled: true,
|
||
allowFrom: {
|
||
whatsapp: ["+86_REPLACE_PRODUCTION_MANAGER_PHONE"],
|
||
slack: ["${SLACK_ADMIN_USER_ID}"]
|
||
}
|
||
}
|
||
},
|
||
|
||
// ============================================================
|
||
// 定时任务
|
||
// ============================================================
|
||
cron: {
|
||
enabled: true,
|
||
store: "~/.openclaw/cron/cron.json",
|
||
maxConcurrentRuns: 3,
|
||
sessionRetention: "48h"
|
||
},
|
||
|
||
// ============================================================
|
||
// 网关配置
|
||
// ============================================================
|
||
gateway: {
|
||
mode: "local",
|
||
port: 18789,
|
||
bind: "loopback",
|
||
controlUi: {
|
||
enabled: true,
|
||
basePath: "/openclaw"
|
||
},
|
||
auth: {
|
||
mode: "token",
|
||
token: "${GATEWAY_TOKEN}"
|
||
},
|
||
reload: {
|
||
mode: "hybrid",
|
||
debounceMs: 300
|
||
}
|
||
},
|
||
|
||
// ============================================================
|
||
// Skills 配置
|
||
// ============================================================
|
||
skills: {
|
||
allowBundled: ["gemini"],
|
||
load: {
|
||
extraDirs: ["~/.openclaw/workspace-production-master/skills"]
|
||
},
|
||
install: {
|
||
preferBrew: true,
|
||
nodeManager: "npm"
|
||
}
|
||
}
|
||
}
|