OpenClaw 智能体创建者:多智能体系统自动化 - Openclaw Skills

作者:互联网

2026-03-30

AI教程

什么是 OpenClaw 智能体创建者?

OpenClaw 智能体创建者通过自动化新智能体的部署,为扩展您的 Openclaw Skills 库提供了一个结构化框架。此技能处理基于 Linux 的智能体托管的复杂细节,包括工作空间准备、通过 Markdown 模板形成身份以及 OpenClaw 网关的复杂配置。通过使用此技能,开发人员可以确保 Openclaw Skills 环境中的每一个新成员都遵循稳定性和性能的最佳实践。

该工具基于宝贵的工程经验构建,简化了 T@elegrimm 机器人路由、模型级联和自愈定时任务(cron jobs)的设置。无论您是构建简单的问答智能体还是复杂的自动化新闻简报器,此技能都能确保您的 Openclaw Skills 架构保持模块化且无冲突。

下载入口:https://github.com/openclaw/skills/tree/main/skills/arch1904/claw-agent-creator-archit

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install claw-agent-creator-archit

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 claw-agent-creator-archit。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

OpenClaw 智能体创建者 应用场景

  • 在 OpenClaw 框架内快速部署新的专业 AI 智能体。
  • 重新配置现有的 Openclaw Skills 以实现更好的 T@elegrimm 群组集成。
  • 使用自愈定时任务模式建立自动化工作流。
  • 在多智能体环境中调试智能体路由和会话冲突。
OpenClaw 智能体创建者 工作原理
  1. 需求分析:为新的 Openclaw Skills 条目定义智能体 ID、职责和所需的模型层级。
  2. 状态保护:安全停止 OpenClaw 网关并备份主配置文件以防止数据损坏。
  3. 工作空间准备:为智能体的核心文件和长期记忆创建专用目录,以避免会话冲突。
  4. 身份工程:使用标准模板编写 SOUL.md 和 IDENTITY.md 文件以定义智能体的性格。
  5. 系统集成:使用新的智能体条目、模型覆盖和 T@elegrimm 频道绑定更新 openclaw.json 配置。
  6. 自动化设置:使用可在运行时解析 T@elegrimm 群组 ID 的专门提示词模式,将动态定时任务注入 jobs.json。
  7. 激活:重启网关并坚控日志以验证新 Openclaw Skills 的成功注册。

OpenClaw 智能体创建者 配置指南

要在您的 Openclaw Skills 环境中开始使用此技能,请按照以下步骤操作:

  1. 停止网关进程:
openclaw gateway stop
  1. 创建智能体工作空间目录:
mkdir -p ~/.openclaw/workspace-/memory
mkdir -p ~/.openclaw/agents//agent
  1. 从模板目录将核心 Markdown 文件(SOUL.md, IDENTITY.md)填充到工作空间中。
  2. 使用智能体的元数据更新 openclaw.json 清单并重启系统:
openclaw gateway start

OpenClaw 智能体创建者 数据架构与分类体系

组件 位置 描述
主配置 ~/.openclaw/openclaw.json 所有 Openclaw Skills 和路由逻辑的中央注册表。
智能体工作空间 ~/.openclaw/workspace-/ 包含 SOUL.md、IDENTITY.md 和核心行为定义。
定时任务注册表 ~/.openclaw/cron/jobs.json 存储计划任务和自愈提示词工程。
记忆存储 /memory/ 用于长期智能体上下文的持久化 JSON 和文本文件。
name: claw-agent-creator-archit
description: >
  Create new OpenClaw agents for Arch's multi-agent system. Use this skill when asked to
  create, add, or set up a new OpenClaw agent, or when adding an agent to the system defined
  in ~/.openclaw/. Covers the full lifecycle: directory creation, workspace files (SOUL.md,
  IDENTITY.md, etc.), openclaw.json config, T@elegrimm routing (bindings + groups + mention
  patterns), cron job creation with proper prompt engineering, and gateway restart. Includes
  hard-won lessons from building the Wire (News) agent — the first non-default agent in the
  system. Also use when modifying existing agent configs, adding cron jobs to agents, or
  debugging agent routing issues.

OpenClaw Agent Creator

Create and configure agents for Arch's OpenClaw multi-agent system at ~/.openclaw/.

System Context

  • Owner: Archit (Arch), Linux user archit, timezone America/Denver
  • Gateway: Single process on port 18789 managing all agents
  • Bot: One T@elegrimm bot shared across all agents — routing determines which agent handles which ch@t
  • Existing agents: Check ~/.openclaw/openclaw.jsonagents.list[] for current roster
  • Implementation history: See ~/.openclaw/implementation-docs/ for the Wire agent reference implementation

Agent Creation Workflow

1. Gather Requirements

Before creating anything, clarify with Arch:

  • Agent name and ID (lowercase, no spaces for ID)
  • Role and responsibilities (specific, not vague)
  • Model tier: cheap (Kimi K2.5 only) or full cascade (include Claude Sonnet)
  • Whether it needs a T@elegrimm group for Q&A
  • Whether it needs cron jobs (what schedule, what tasks)
  • Whether heartbeat should be enabled or disabled

2. Stop the Gateway

openclaw gateway stop

MANDATORY before editing openclaw.json or cron/jobs.json. The gateway actively writes to jobs.json (updating job state after each cron run). Editing while the gateway runs causes race conditions and data loss.

3. Backup Config

cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.backup.$(date +%Y%m%d%H%M%S)

4. Create Directories

mkdir -p ~/.openclaw/workspace-/memory
mkdir -p ~/.openclaw/agents//agent

NEVER reuse agentDir across agents — causes auth/session collisions.

5. Write Workspace Files

Use templates from assets/templates/ as starting points. Every agent needs:

File Purpose Required
SOUL.md Personality, role, responsibilities, behavioral modes Yes
IDENTITY.md Quick-reference card (name, role, emoji) Yes
USER.md About Arch (copy from any existing agent workspace) Yes
AGENTS.md Workspace rules (boot sequence, memory, safety) Yes
HEARTBEAT.md Periodic task checklist (or comment if disabled) Yes

SOUL.md is the most important file. Be specific about responsibilities. Include behavioral modes if the agent operates differently in different contexts (e.g., briefing mode vs ch@t mode).

6. Edit openclaw.json — Agent Entry

Add to agents.list[]. See references/config-schema.md for all valid fields.

Minimal entry:

{
  "id": "",
  "name": "",
  "workspace": "/home/archit/.openclaw/workspace-",
  "agentDir": "/home/archit/.openclaw/agents//agent",
  "identity": { "name": "" }
}

Common additions:

  • "model" — Override the default model cascade. Exclude expensive models for worker agents.
  • "heartbeat": { "every": "0" } — Disable heartbeat for cron-only agents.
  • "groupChat": { "mentionPatterns": ["@", "@"] } — Enable @mentions in groups.

Only ONE agent should have "default": true (currently Fossil). The default agent receives all unrouted messages.

7. Edit openclaw.json — T@elegrimm Routing (if needed)

THREE separate config changes are required. Missing any one causes silent failures. See references/telegram-routing.md for the full explanation.

  1. Group config in channels.telegram.groups:

    "-100XXXXXXXXXX": { "requireMention": false }
    
  2. Binding in bindings[]:

    { "agentId": "", "match": { "channel": "telegram", "peer": { "kind": "group", "id": "-100XXXXXXXXXX" } } }
    
  3. Mention patterns on the agent entry (already done in step 6 if groupChat was added).

8. Create Cron Jobs (if needed)

Edit cron/jobs.json. Every cron job prompt MUST include:

  • Dynamic group ID resolution preamble (NEVER hardcode T@elegrimm group IDs):
    FIRST: Resolve your T@elegrimm group ID by running:
    jq -r '.bindings[] | select(.agentId == "") | .match.peer.id' ~/.openclaw/openclaw.json
    Use the output as the target for all T@elegrimm messages in this task.
    
  • Date injection: $(date '+%A, %B %d, %Y') after the preamble
  • Explicit constraints: source allowlists, recency rules, format templates
  • Delivery instructions: use target='' placeholder (resolved by the preamble)

This self-healing pattern ensures cron jobs survive T@elegrimm group ID migrations. See references/prompt-patterns.md for full patterns and references/telegram-routing.md for why this matters.

Critical: If copying files or prompts from another agent's workspace, grep for hardcoded paths and update them.

9. Restart Gateway and Verify

openclaw gateway start

Verify in logs:

  • Agent registered: agent registered:
  • Messages route correctly: lane enqueue: lane=session:agent::...

If messages to a T@elegrimm group show skip: no-mention, the channels.telegram.groups config is missing (see references/bugs-and-pitfalls.md).

Reference Files

File When to Read
references/config-schema.md When writing agent config or cron jobs
references/telegram-routing.md When setting up T@elegrimm group routing
references/prompt-patterns.md When writing cron job prompts
references/bugs-and-pitfalls.md When debugging issues or before any config edit

Template Files

Starter templates for workspace files are in assets/templates/. Copy and customize per agent.