{
"gateway": {
"port": 18789,
"host": "0.0.0.0",
"auth": {
"requirePairing": true,
"tokenTTL": 2592000,
"maxFailedAttempts": 5,
"cooldownSeconds": 300
},
"logging": {
"level": "info",
"file": "/var/log/openclaw/gateway.log",
"maxSize": "100M",
"maxAge": 30,
"format": "json"
}
},
"agents": {
"work-assistant": {
"name": "企业工作助手",
"description": "协助团队自动化日报、代码评审、故障诊断和工时追踪",
"model": "claude-opus-4-6",
"modelProvider": "anthropic",
"temperature": 0.7,
"maxTokens": 2048,
"tools": [
"github_pr_analyzer",
"jira_issue_manager",
"knowledge_base_search",
"monitoring_query",
"document_writer"
],
"memory": {
"strategy": "session_with_summary",
"maxContextTokens": 8000,
"compactAfterTurns": 25,
"pruneStrategy": "by_relevance"
},
"constraints": {
"maxConcurrentRequests": 3,
"requestTimeoutMs": 45000,
"rateLimit": {
"perUser": "10/min",
"perTeam": "100/min",
"perGlobal": "1000/min"
}
},
"systemPrompt": "你是一个企业工作助手,帮助团队自动化日常工作。你能:\n1. 分析代码改动并给出评审意见\n2. 汇总日报进展\n3. 辅助故障诊断\n4. 更新项目任务\n\n在执行任何操作前,必须确认用户权限。对于写入操作,必须提前告知用户。"
}
},
"profiles": {
"engineer": {
"clearanceLevel": 3,
"allowedTools": [
"github_pr_analyzer",
"jira_issue_manager:read",
"knowledge_base_search",
"monitoring_query"
],
"deniedTools": [
"document_writer:write_to_admin_folder",
"jira_issue_manager:delete"
],
"rateLimit": "10/min"
},
"manager": {
"clearanceLevel": 2,
"allowedTools": [
"jira_issue_manager",
"document_writer",
"knowledge_base_search"
],
"deniedTools": [
"github_pr_analyzer:admin_actions"
],
"rateLimit": "20/min"
},
"guest": {
"clearanceLevel": 1,
"allowedTools": [
"knowledge_base_search",
"jira_issue_manager:read"
],
"rateLimit": "5/min"
}
},
"channels": {
"lark": {
"enabled": true,
"type": "lark",
"appId": "${LARK_APP_ID}",
"appSecret": "${LARK_APP_SECRET}",
"encryptionKey": "${LARK_ENCRYPTION_KEY}",
"verificationToken": "${LARK_VERIFICATION_TOKEN}",
"webhookPath": "/webhook/lark",
"messageFormat": "lark_card",
"groups": {
"research-team": {
"chatId": "${RESEARCH_TEAM_CHAT_ID}",
"enabled": true,
"requireMention": true,
"mentionPatterns": ["@工作助手", "@work-bot"],
"triggerKeywords": ["#codereview", "#故障", "#日报"],
"defaultAgent": "work-assistant",
"defaultProfile": "engineer",
"permissions": {
"allowActions": ["query", "analyze", "summarize"],
"denyActions": ["delete", "execute_system_command"]
},
"routing": {
"#codereview": {
"tool": "github_pr_analyzer",
"mode": "auto_reply"
},
"#故障": {
"tool": "monitoring_query",
"mode": "escalate_to_manager"
}
}
}
}
},
"slack": {
"enabled": true,
"type": "slack",
"botToken": "${SLACK_BOT_TOKEN}",
"appToken": "${SLACK_APP_TOKEN}",
"signingSecret": "${SLACK_SIGNING_SECRET}",
"webhookPath": "/webhook/slack",
"channels": {
"engineering": {
"channelId": "${SLACK_ENGINEERING_CHANNEL_ID}",
"enabled": true,
"requireMention": true,
"mentionPatterns": ["@work-assistant"],
"defaultAgent": "work-assistant",
"defaultProfile": "engineer"
}
}
}
},
"tools": {
"github_pr_analyzer": {
"enabled": true,
"type": "github",
"token": "${GITHUB_TOKEN}",
"timeout": 30000,
"maxAttempts": 3,
"cache": {
"enabled": true,
"ttl": 3600
},
"policy": {
"minClearance": 3,
"maxSize": 1000,
"allowedActions": ["read", "comment"]
}
},
"jira_issue_manager": {
"enabled": true,
"type": "jira",
"url": "${JIRA_URL}",
"username": "${JIRA_USERNAME}",
"apiToken": "${JIRA_API_TOKEN}",
"timeout": 20000,
"maxAttempts": 3,
"policy": {
"minClearance": 2,
"allowedActions": ["read", "update", "comment"],
"deniedActions": ["delete"]
}
},
"knowledge_base_search": {
"enabled": true,
"type": "custom",
"endpoint": "http://kb-service:9000/search",
"timeout": 15000,
"policy": {
"minClearance": 1
}
},
"monitoring_query": {
"enabled": true,
"type": "custom",
"endpoint": "http://prometheus:9090",
"timeout": 20000,
"policy": {
"minClearance": 2
}
},
"document_writer": {
"enabled": true,
"type": "lark_docs",
"folderPath": "/团队工作区/日报汇总",
"timeout": 25000,
"policy": {
"minClearance": 2,
"allowedFolders": ["/团队工作区/日报汇总", "/项目管理/进度"],
"deniedFolders": ["/admin", "/财务"]
}
}
},
"hooks": {
"onMessageReceived": {
"enabled": true,
"script": "hooks/on_message_received.js"
},
"beforeToolExecution": {
"enabled": true,
"script": "hooks/before_tool_execution.js"
},
"afterToolExecution": {
"enabled": true,
"script": "hooks/after_tool_execution.js"
}
},
"cron": {
"daily_report_aggregation": {
"schedule": "0 16 * * *",
"agent": "work-assistant",
"task": "aggregate_daily_reports",
"timeout": 60000,
"enabled": true
}
},
"security": {
"enableAudit": true,
"auditLog": "/var/log/openclaw/audit.log",
"enableEncryption": true,
"tlsCert": "/etc/openclaw/tls/cert.pem",
"tlsKey": "/etc/openclaw/tls/key.pem",
"allowedIPs": ["10.0.0.0/8", "192.168.0.0/16"],
"requireMTLS": false
}
}