返回 Skill 列表
extension
分类: 开发与工程无需 API Key

agent-lifecycle-manager

管理节点上的完整OpenClaw代理生命周期操作:创建/注册代理、配置通道绑定、继承凭证、批准配对、存档和删除代理、刷新状态仪表板以及写入生命周期变更日志。当用户要求添加新的代理、重新配置现有代理、退役/存档/删除代理,或维护代理状态板和生命周期审核记录时使用。

person作者: jakexiaohubgithub

Agent Lifecycle Manager

Use this skill to execute repeatable, low-error lifecycle operations for OpenClaw agents.

Workflow

  1. Collect required inputs
  2. Run lifecycle action (create/configure/archive/delete/status)
  3. Verify runtime status (openclaw status, openclaw agents list)
  4. Refresh dashboard files
  5. Append lifecycle log entry

If deleting an agent, always archive first and require explicit confirmation.

Required inputs by action

  • Create + Telegram bind:
    • AGENT_ID
    • TELEGRAM_TOKEN
    • optional WORKSPACE (default: ~/.openclaw/workspace-<AGENT_ID>)
  • Pairing approval (separate step):
    • AGENT_ID
    • PAIRING_CODE (obtained only after user sends /start to the bot)
  • Reconfigure:
    • AGENT_ID
    • changed fields (model/routes/channel token/etc.)
  • Archive/Delete:
    • AGENT_ID
    • archive destination (default under state/archive/<AGENT_ID>/)

Command playbook

Read references/openclaw-agent-lifecycle-playbook.md before running uncommon operations.

For deterministic execution, use scripts in this skill:

  • scripts/create-telegram-agent.sh
  • scripts/approve-telegram-pairing.sh
  • scripts/archive-agent.sh
  • scripts/delete-agent-safe.sh
  • scripts/refresh-dashboard.sh
  • scripts/lifecycle-log.sh

Execution rules

  • Prefer openclaw CLI over ad-hoc file edits.
  • Configure bindings via openclaw config get/set (append entry; do not overwrite blindly).
  • Do not restart gateway by default after binding/config changes.
  • Use pairing command with explicit channel flag: openclaw pairing approve <PAIRING_CODE> --channel telegram.
  • Never hard-delete before successful archive.
  • For deletion, prefer scripts/delete-agent-safe.sh (archive verification + explicit confirmation + cleanup + logging).
  • After every lifecycle change, run dashboard refresh + lifecycle logging.

Minimal post-change verification

Run:

openclaw agents list --json
openclaw status --json
openclaw gateway status --json

Confirm:

  • target agent exists (or is absent after deletion)
  • expected bindings/routes are present
  • gateway runtime is healthy and RPC probe is ok