Agent Deployment Checklist
Production deployment framework for AI agent infrastructure on dedicated hardware (Mac Mini, Linux servers). Every deployment follows the same 5-layer stack, every time, no shortcuts.
The 5-Layer Deployment Stack
Every agent deployment is five layers applied in order. No layer is optional. Each layer has a binary pass/fail gate before moving to the next.
Layer 1: Base OS + OpenClaw Install (Scripted)
Goal: Clean machine with OpenClaw runtime ready.
Checklist:
- - [ ] Fresh OS install or verified clean state
- [ ] OS updates applied to latest stable
- [ ] Xcode Command Line Tools installed (macOS)
- [ ] Homebrew installed and updated (macOS)
- [ ] Node.js LTS installed via nvm
- [ ] Python 3.11+ installed
- [ ] Git configured with deploy key
- [ ] OpenClaw CLI installed and verified
- [ ] Claude Code installed and licensed
- [ ] Working directory created at INLINECODE0
- [ ] SSH key pair generated for this machine
Script template:
CODEBLOCK0
Gate: node --version returns LTS, python3 --version returns 3.11+, git status works in workspace directory.
Layer 2: IAM Config (White-Glove)
Goal: Identity, access, and API keys configured for this specific client/deployment.
This layer is always done manually — never scripted — because every client's access pattern is different.
Checklist:
- - [ ] API keys provisioned (Anthropic, OpenAI if needed)
- [ ] API keys stored in environment variables (never in files)
- [ ]
.env file created with proper permissions (chmod 600) - [ ] Client-specific service accounts created
- [ ] MCP server credentials configured
- [ ] GitHub/GitLab access tokens scoped to client repos only
- [ ] Email/calendar integrations authorized (OAuth tokens)
- [ ] QuickBooks / accounting integrations connected (if applicable)
- [ ] All credentials tested with a live API call
- [ ] Credential rotation schedule documented
Key principle: Client pays for their own API keys and licenses. We never share keys across clients.
CODEBLOCK1
Gate: Every configured API key returns a valid response. No 401s, no 403s.
Layer 3: Client-Specific Software (Varies)
Goal: Install and configure whatever tools this specific client needs.
This layer varies per deployment. Common patterns:
For accounting/bookkeeping clients:
- - [ ] QuickBooks MCP server configured (read-only by default)
- [ ] Financial reporting templates deployed
- [ ] Tax calendar crons scheduled
For marketing/content clients:
- - [ ] CMS integrations connected
- [ ] Social media API access configured
- [ ] Analytics dashboards linked
For development team clients:
- - [ ] CI/CD pipeline access configured
- [ ] Code review automation set up
- [ ] Deployment notification channels connected
For legal/compliance clients:
- - [ ] Document management system access
- [ ] Compliance calendar configured
- [ ] Audit trail logging enabled
Gate: Client-specific test suite passes. Each integration returns expected data.
Layer 4: Security Hardening (Every Deployment)
Goal: Lock down the machine to production security standards.
Checklist:
- - [ ] Firewall enabled and configured (only required ports open)
- [ ] SSH hardening applied:
- [ ] Password authentication disabled
- [ ] Root login disabled
- [ ] Key-only authentication enforced
- [ ] Non-standard SSH port configured
- - [ ] Disk encryption enabled (FileVault on macOS, LUKS on Linux)
- [ ] Automatic security updates enabled
- [ ] Fail2ban or equivalent installed and configured
- [ ] Log rotation configured
- [ ] File integrity monitoring enabled
- [ ]
.env and credential files have 600 permissions - [ ] No credentials in git history (verified with
git log --all -p | grep -i "api_key\|secret\|password") - [ ] SOUL, IDENTITY, USER, AGENTS files marked as sacred (never leave the environment)
- [ ] Outbound network allowlist configured (only known API endpoints)
macOS firewall script:
CODEBLOCK2
Gate: Security audit script returns grade A or B. No grade C or below passes.
Layer 5: Onboarding — Day 1
Goal: Client can interact with their agent and sees value immediately.
Checklist:
- - [ ] 5-file memory system scaffolded (see below)
- [ ] Starter crons installed and verified
- [ ] Health check running and reporting
- [ ] Client walkthrough completed (30-min live session)
- [ ] Client can ask agent a question and get a response
- [ ] First real task completed with client watching
- [ ] Emergency contact and escalation path documented
- [ ] Client has link to support channel
- [ ] Week-1 check-in scheduled
The Day-1 demo: Always do one real task live. Not a demo. Not a rehearsed script. Pick something from their actual workflow and do it. This is how you build trust.
Gate: Client has independently asked the agent a question and received a useful answer without help.
Pre-Scaffolded 5-File Memory System
Every deployment starts with the same five files. They are empty templates, not boilerplate — the agent fills them in during operation.
SOUL.md Template
CODEBLOCK3
IDENTITY.md Template
CODEBLOCK4
USER.md Template
CODEBLOCK5
AGENTS.md Template
CODEBLOCK6
MEMORY.md Template
CODEBLOCK7
Starter Cron Templates
Every deployment gets these three crons minimum.
Health Check (Every 4 Hours)
CODEBLOCK8
CODEBLOCK9
Memory Maintenance (Daily at 2 AM)
CODEBLOCK10
CODEBLOCK11
Backup (Daily at 3 AM)
CODEBLOCK12
CODEBLOCK13
Hardware Requirements
Minimum (Single-Agent Deployment)
| Component | Spec |
|---|
| CPU | Apple M1 or equivalent |
| RAM |
16 GB |
| Storage | 256 GB SSD |
| Network | Stable broadband, static IP preferred |
| UPS | Recommended for always-on deployments |
Recommended (Multi-Agent Deployment)
| Component | Spec |
|---|
| CPU | Apple M2 Pro / M4 or equivalent |
| RAM |
32 GB |
| Storage | 512 GB SSD |
| Network | Business-grade with failover |
| UPS | Required |
Network Configuration
CODEBLOCK14
Post-Deployment Monitoring
Week 1: Daily Check-ins
- - Is the agent responding correctly?
- Are crons running on schedule?
- Any errors in logs?
- Client satisfaction?
Weeks 2-4: Twice-Weekly
- - Memory system growing appropriately?
- Performance stable?
- Any new integration needs?
Month 2+: Weekly
- - Health grade trend
- Backup verification
- Security update status
- Client feature requests
Deployment Anti-Patterns
Don't do these:
- - Sharing API keys across clients. Every client pays for their own. No exceptions.
- Skipping Layer 4. "It's just a test deployment" is how breaches start.
- Copying another client's SOUL.md. Every deployment gets a fresh identity calibrated to the client.
- Enabling write access on day 1. Start read-only. Earn write access through demonstrated reliability.
- Deploying without a health check cron. If you can't monitor it, don't deploy it.
- Promising specific features before Layer 3. Scope the deployment, then promise.
Agent 部署清单
用于专用硬件(Mac Mini、Linux 服务器)上 AI 代理基础设施的生产部署框架。每次部署都遵循相同的 5 层堆栈,绝不走捷径。
5 层部署堆栈
每个代理部署按顺序应用五层。没有哪一层是可选的。在进入下一层之前,每一层都有一个二进制的通过/失败门控。
第 1 层:基础操作系统 + OpenClaw 安装(脚本化)
目标: 准备好运行 OpenClaw 运行时的干净机器。
清单:
- - [ ] 全新操作系统安装或已验证的干净状态
- [ ] 操作系统更新至最新稳定版
- [ ] 已安装 Xcode 命令行工具(macOS)
- [ ] 已安装并更新 Homebrew(macOS)
- [ ] 通过 nvm 安装 Node.js LTS
- [ ] 已安装 Python 3.11+
- [ ] 使用部署密钥配置 Git
- [ ] 已安装并验证 OpenClaw CLI
- [ ] 已安装并授权 Claude Code
- [ ] 在 ~/.openclaw/workspace 创建工作目录
- [ ] 为此机器生成 SSH 密钥对
脚本模板:
bash
#!/bin/bash
layer-1-base-install.sh
set -euo pipefail
echo === 第 1 层:基础安装 ===
macOS 特定
xcode-select --install 2>/dev/null || true
/bin/bash -c $(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)
brew update && brew upgrade
运行时
brew install nvm python@3.11 git jq
nvm install --lts
nvm use --lts
OpenClaw 工作空间
mkdir -p ~/.openclaw/workspace
cd ~/.openclaw/workspace
git init
echo 第 1 层完成。验证:node --version && python3 --version && git --version
门控: node --version 返回 LTS 版本,python3 --version 返回 3.11+,git status 在工作空间目录中正常工作。
第 2 层:IAM 配置(白手套服务)
目标: 为此特定客户/部署配置身份、访问权限和 API 密钥。
这一层始终手动完成——从不脚本化——因为每个客户的访问模式都不同。
清单:
- - [ ] 配置 API 密钥(Anthropic,如果需要 OpenAI)
- [ ] API 密钥存储在环境变量中(绝不存储在文件中)
- [ ] 创建具有适当权限的 .env 文件(chmod 600)
- [ ] 创建客户特定的服务账户
- [ ] 配置 MCP 服务器凭据
- [ ] GitHub/GitLab 访问令牌仅限客户仓库范围
- [ ] 授权电子邮件/日历集成(OAuth 令牌)
- [ ] 连接 QuickBooks / 会计集成(如适用)
- [ ] 通过实时 API 调用测试所有凭据
- [ ] 记录凭据轮换计划
关键原则: 客户支付自己的 API 密钥和许可证。我们绝不跨客户共享密钥。
bash
验证所有凭据是否有效
echo 测试 Anthropic API...
curl -s https://api.anthropic.com/v1/messages \
-H x-api-key: $ANTHROPIC
APIKEY \
-H content-type: application/json \
-d {model:claude-sonnet-4-20250514,max_tokens:10,messages:[{role:user,content:ping}]} \
| jq .content[0].text
echo 测试 GitHub 访问...
gh auth status
门控: 每个配置的 API 密钥都返回有效响应。没有 401,没有 403。
第 3 层:客户特定软件(各不相同)
目标: 安装和配置此特定客户需要的任何工具。
这一层因部署而异。常见模式:
对于会计/簿记客户:
- - [ ] 配置 QuickBooks MCP 服务器(默认为只读)
- [ ] 部署财务报告模板
- [ ] 安排税务日历 crons
对于营销/内容客户:
- - [ ] 连接 CMS 集成
- [ ] 配置社交媒体 API 访问
- [ ] 链接分析仪表板
对于开发团队客户:
- - [ ] 配置 CI/CD 管道访问
- [ ] 设置代码审查自动化
- [ ] 连接部署通知渠道
对于法律/合规客户:
- - [ ] 文档管理系统访问
- [ ] 配置合规日历
- [ ] 启用审计跟踪日志
门控: 客户特定的测试套件通过。每个集成返回预期数据。
第 4 层:安全加固(每次部署)
目标: 将机器锁定到生产安全标准。
清单:
- - [ ] 启用并配置防火墙(仅开放所需端口)
- [ ] 应用 SSH 加固:
- [ ] 禁用密码认证
- [ ] 禁用 root 登录
- [ ] 强制仅密钥认证
- [ ] 配置非标准 SSH 端口
- - [ ] 启用磁盘加密(macOS 上的 FileVault,Linux 上的 LUKS)
- [ ] 启用自动安全更新
- [ ] 安装并配置 Fail2ban 或等效工具
- [ ] 配置日志轮换
- [ ] 启用文件完整性监控
- [ ] .env 和凭据文件具有 600 权限
- [ ] Git 历史记录中没有凭据(使用 git log --all -p | grep -i api_key\|secret\|password 验证)
- [ ] SOUL、IDENTITY、USER、AGENTS 文件标记为神圣(绝不离开环境)
- [ ] 配置出站网络白名单(仅已知的 API 端点)
macOS 防火墙脚本:
bash
#!/bin/bash
layer-4-firewall.sh
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setblockall on
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setallowsigned on
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on
echo 防火墙已配置。验证:sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
门控: 安全审计脚本返回 A 或 B 等级。C 级或以下不通过。
第 5 层:入职——第一天
目标: 客户可以与他们的代理交互并立即看到价值。
清单:
- - [ ] 搭建 5 文件记忆系统(见下文)
- [ ] 安装并验证启动 crons
- [ ] 健康检查运行并报告
- [ ] 完成客户演练(30 分钟实时会话)
- [ ] 客户可以向代理提问并获得响应
- [ ] 在客户观看下完成第一个真实任务
- [ ] 记录紧急联系人和升级路径
- [ ] 客户拥有支持渠道链接
- [ ] 安排第一周回访
第一天演示: 始终实时完成一个真实任务。不是演示。不是排练好的脚本。从他们实际工作流程中挑选一件事并完成它。这就是建立信任的方式。
门控: 客户在没有帮助的情况下独立向代理提问并收到有用的答案。
预搭建的 5 文件记忆系统
每次部署都从相同的五个文件开始。它们是空模板,不是样板——代理在运行期间填充它们。
SOUL.md 模板
markdown
SOUL
身份
你是 [客户名称] 的 AI 运营代理,由 IAM Solutions 部署。
核心价值观
- - 准确性优先于速度
- 在假设之前先提问
- 绝对保护客户数据
- 持续学习和改进
边界
- - 绝不在此环境外共享客户数据
- 未经明确批准绝不执行金融交易
- 未经确认绝不修改生产系统
- 不确定时升级给人类
沟通风格
[在入职期间根据客户偏好进行校准]
IDENTITY.md 模板
markdown
IDENTITY
部署
- - 部署日期:[日期]
- 硬件:[机器规格]
- 位置:[物理或云位置]
- 由 IAM Solutions 管理
能力
[在第 3 层根据已安装的集成填充]
限制
[在入职期间根据明确排除在范围之外的内容记录]
USER.md 模板
markdown
USER
主要用户
- - 姓名:[客户名称]
- 角色:[客户角色]
- 沟通偏好:[电子邮件/Slack/短信]
访问模式
[客户通常如何以及何时交互——第一周后填充]
领域知识
[客户熟悉什么 vs.