{
  "schemaVersion": "1.0",
  "item": {
    "slug": "add-agent",
    "name": "add-agent",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/owen-ai-01/add-agent",
    "canonicalUrl": "https://clawhub.ai/owen-ai-01/add-agent",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/add-agent",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=add-agent",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "_meta.json"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/add-agent"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/add-agent",
    "agentPageUrl": "https://openagent3.xyz/skills/add-agent/agent",
    "manifestUrl": "https://openagent3.xyz/skills/add-agent/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/add-agent/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "add-agent",
        "body": "Quickly add a new isolated Agent with a dedicated Telegram Bot."
      },
      {
        "title": "Trigger",
        "body": "User says something like:\n\n\"Add a new agent, ID is marketing, name is Marketing Assistant, telegram Bot Token is xxx, allowFrom is 123456789, responsible for content marketing and social media\""
      },
      {
        "title": "Steps",
        "body": "Once a new agent request is received, execute in the following order:"
      },
      {
        "title": "1. Extract Parameters",
        "body": "Extract the following fields from user input:\n\nAGENT_ID: English ID (e.g. marketing)\nAGENT_NAME: Agent name (e.g. Marketing Assistant, Alice, WorkBot, etc.)\nBOT_TOKEN: Telegram Bot Token\nALLOW_FROM: allowFrom numeric ID (e.g. 123456789)\nDESCRIPTION: Role description (e.g. responsible for content marketing and social media)\n\nIf any field is missing, ask the user to provide it before continuing."
      },
      {
        "title": "2. Detect Installation Directory",
        "body": "Read the current openclaw.json path, extract the actual paths from the existing main agent in agents.list to derive:\n\nSTATE_DIR: e.g. /home/openclaw/.openclaw\nMAIN_WORKSPACE: main agent workspace path\nMAIN_AGENT_DIR: main agent agentDir path\nNEW_WORKSPACE: ${STATE_DIR}/workspace-${AGENT_ID}\nNEW_AGENT_DIR: ${STATE_DIR}/agents/${AGENT_ID}/agent"
      },
      {
        "title": "3. Backup Config File",
        "body": "cp ${CONFIG_PATH} ${CONFIG_PATH}.bak.$(date +%Y%m%d%H%M%S)"
      },
      {
        "title": "4. Run openclaw agents add",
        "body": "openclaw agents add ${AGENT_ID}\n\nThis automatically initializes the workspace directory structure, agentDir, and default files like SOUL.md and AGENTS.md."
      },
      {
        "title": "5. Copy Auth, Skills and USER.md",
        "body": "# Copy auth profiles\ncp ${MAIN_AGENT_DIR}/auth-profiles.json \\\n   ${NEW_AGENT_DIR}/auth-profiles.json\n\n# Copy skills\ncp -r ${MAIN_WORKSPACE}/skills/ \\\n      ${NEW_WORKSPACE}/skills/\n\n# Copy USER.md\ncp ${MAIN_WORKSPACE}/USER.md \\\n   ${NEW_WORKSPACE}/USER.md"
      },
      {
        "title": "6. Generate Persona Files",
        "body": "Overwrite ${NEW_WORKSPACE}/SOUL.md:\n\n# ${AGENT_NAME}\n\n## Identity\nYou are ${AGENT_NAME}, ${DESCRIPTION}.\nYour partner is the main agent. You collaborate together to complete tasks.\n\n## Core Responsibilities\n${DESCRIPTION}\n\n## Personality\n- Action-oriented: Break down tasks immediately and provide clear execution steps\n- Proactive reporting: Report results to main after completing tasks\n- Professional: Maintain high standards for all outputs\n\n## Rules\n- Do not execute high-risk operations without confirmation\n- Always notify the user before executing operations that require manual approval\n\nOverwrite ${NEW_WORKSPACE}/AGENTS.md:\n\n# ${AGENT_NAME} Agent Configuration\n\n## Other Agents in the System\n\n- **main**: Primary agent, responsible for daily conversation, task coordination and decisions\n- **${AGENT_ID} (yourself)**: ${DESCRIPTION}\n\n## Collaboration Rules\n\n### Receiving Tasks from main\n1. Confirm task goal and priority\n2. Break down execution steps\n3. Execute and record results\n4. Report results back to main upon completion\n\n### When to Proactively Contact main\n- Operations that require final user confirmation\n- Result reporting after task completion\n- Escalating anomalies or unexpected situations"
      },
      {
        "title": "7. Update openclaw.json",
        "body": "Read the current config and append the following:\n\nAdd to agents.list:\n\n{\n  \"id\": \"${AGENT_ID}\",\n  \"name\": \"${AGENT_NAME}\",\n  \"workspace\": \"${NEW_WORKSPACE}\",\n  \"agentDir\": \"${NEW_AGENT_DIR}\"\n}\n\nAdd to bindings:\n\n{\n  \"agentId\": \"${AGENT_ID}\",\n  \"match\": {\n    \"channel\": \"telegram\",\n    \"accountId\": \"${AGENT_ID}\"\n  }\n}\n\nAdd to channels.telegram.accounts:\n\n\"${AGENT_ID}\": {\n  \"enabled\": true,\n  \"botToken\": \"${BOT_TOKEN}\",\n  \"dmPolicy\": \"pairing\",\n  \"allowFrom\": [\"${ALLOW_FROM}\"],\n  \"groupPolicy\": \"allowlist\",\n  \"streaming\": \"off\"\n}\n\nHandle tools config (check before writing):\n\nCheck whether the tools field exists:\n\nIf tools does not exist, add the full block:\n\n\"tools\": {\n  \"agentToAgent\": {\n    \"enabled\": true,\n    \"allow\": [\"main\", \"${AGENT_ID}\"]\n  },\n  \"sessions\": {\n    \"visibility\": \"all\"\n  }\n}\n\nIf tools exists but has no agentToAgent, add it:\n\n\"agentToAgent\": {\n  \"enabled\": true,\n  \"allow\": [\"main\", \"${AGENT_ID}\"]\n}\n\nIf agentToAgent already exists, only append \"${AGENT_ID}\" to the allow array (no duplicates)\n\n\nIf sessions.visibility does not exist, add it:\n\n\"sessions\": {\n  \"visibility\": \"all\"\n}"
      },
      {
        "title": "8. Validate JSON",
        "body": "cat ${CONFIG_PATH} | python3 -m json.tool\n\nIf validation fails, stop immediately and restore from backup:\n\ncp ${CONFIG_PATH}.bak.* ${CONFIG_PATH}\n\nReport the exact error to the user."
      },
      {
        "title": "9. Fix File Permissions",
        "body": "chown -R $(stat -c '%U:%G' ${MAIN_WORKSPACE}) ${NEW_WORKSPACE}/\nchown -R $(stat -c '%U:%G' ${MAIN_AGENT_DIR}) ${NEW_AGENT_DIR}/"
      },
      {
        "title": "10. Report Completion",
        "body": "Reply to the user:\n\n✅ Agent \"${AGENT_NAME}\" (${AGENT_ID}) created successfully!\n\nCompleted:\n- openclaw agents add initialized\n- openclaw.json updated\n- Auth, skills and USER.md copied from main\n- SOUL.md / AGENTS.md generated\n- agentToAgent communication configured\n- JSON validation passed\n\n⚠️ Manual steps required:\n1. Restart the Gateway:\n   openclaw gateway restart\n\n2. Verify bindings:\n   openclaw agents list --bindings\n\n3. Open Telegram, find the new Bot and send /start to complete pairing"
      }
    ],
    "body": "add-agent\n\nQuickly add a new isolated Agent with a dedicated Telegram Bot.\n\nTrigger\n\nUser says something like:\n\n\"Add a new agent, ID is marketing, name is Marketing Assistant, telegram Bot Token is xxx, allowFrom is 123456789, responsible for content marketing and social media\"\n\nSteps\n\nOnce a new agent request is received, execute in the following order:\n\n1. Extract Parameters\n\nExtract the following fields from user input:\n\nAGENT_ID: English ID (e.g. marketing)\nAGENT_NAME: Agent name (e.g. Marketing Assistant, Alice, WorkBot, etc.)\nBOT_TOKEN: Telegram Bot Token\nALLOW_FROM: allowFrom numeric ID (e.g. 123456789)\nDESCRIPTION: Role description (e.g. responsible for content marketing and social media)\n\nIf any field is missing, ask the user to provide it before continuing.\n\n2. Detect Installation Directory\n\nRead the current openclaw.json path, extract the actual paths from the existing main agent in agents.list to derive:\n\nSTATE_DIR: e.g. /home/openclaw/.openclaw\nMAIN_WORKSPACE: main agent workspace path\nMAIN_AGENT_DIR: main agent agentDir path\nNEW_WORKSPACE: ${STATE_DIR}/workspace-${AGENT_ID}\nNEW_AGENT_DIR: ${STATE_DIR}/agents/${AGENT_ID}/agent\n3. Backup Config File\ncp ${CONFIG_PATH} ${CONFIG_PATH}.bak.$(date +%Y%m%d%H%M%S)\n\n4. Run openclaw agents add\nopenclaw agents add ${AGENT_ID}\n\n\nThis automatically initializes the workspace directory structure, agentDir, and default files like SOUL.md and AGENTS.md.\n\n5. Copy Auth, Skills and USER.md\n# Copy auth profiles\ncp ${MAIN_AGENT_DIR}/auth-profiles.json \\\n   ${NEW_AGENT_DIR}/auth-profiles.json\n\n# Copy skills\ncp -r ${MAIN_WORKSPACE}/skills/ \\\n      ${NEW_WORKSPACE}/skills/\n\n# Copy USER.md\ncp ${MAIN_WORKSPACE}/USER.md \\\n   ${NEW_WORKSPACE}/USER.md\n\n6. Generate Persona Files\n\nOverwrite ${NEW_WORKSPACE}/SOUL.md:\n\n# ${AGENT_NAME}\n\n## Identity\nYou are ${AGENT_NAME}, ${DESCRIPTION}.\nYour partner is the main agent. You collaborate together to complete tasks.\n\n## Core Responsibilities\n${DESCRIPTION}\n\n## Personality\n- Action-oriented: Break down tasks immediately and provide clear execution steps\n- Proactive reporting: Report results to main after completing tasks\n- Professional: Maintain high standards for all outputs\n\n## Rules\n- Do not execute high-risk operations without confirmation\n- Always notify the user before executing operations that require manual approval\n\n\nOverwrite ${NEW_WORKSPACE}/AGENTS.md:\n\n# ${AGENT_NAME} Agent Configuration\n\n## Other Agents in the System\n\n- **main**: Primary agent, responsible for daily conversation, task coordination and decisions\n- **${AGENT_ID} (yourself)**: ${DESCRIPTION}\n\n## Collaboration Rules\n\n### Receiving Tasks from main\n1. Confirm task goal and priority\n2. Break down execution steps\n3. Execute and record results\n4. Report results back to main upon completion\n\n### When to Proactively Contact main\n- Operations that require final user confirmation\n- Result reporting after task completion\n- Escalating anomalies or unexpected situations\n\n7. Update openclaw.json\n\nRead the current config and append the following:\n\nAdd to agents.list:\n\n{\n  \"id\": \"${AGENT_ID}\",\n  \"name\": \"${AGENT_NAME}\",\n  \"workspace\": \"${NEW_WORKSPACE}\",\n  \"agentDir\": \"${NEW_AGENT_DIR}\"\n}\n\n\nAdd to bindings:\n\n{\n  \"agentId\": \"${AGENT_ID}\",\n  \"match\": {\n    \"channel\": \"telegram\",\n    \"accountId\": \"${AGENT_ID}\"\n  }\n}\n\n\nAdd to channels.telegram.accounts:\n\n\"${AGENT_ID}\": {\n  \"enabled\": true,\n  \"botToken\": \"${BOT_TOKEN}\",\n  \"dmPolicy\": \"pairing\",\n  \"allowFrom\": [\"${ALLOW_FROM}\"],\n  \"groupPolicy\": \"allowlist\",\n  \"streaming\": \"off\"\n}\n\n\nHandle tools config (check before writing):\n\nCheck whether the tools field exists:\n\nIf tools does not exist, add the full block:\n\"tools\": {\n  \"agentToAgent\": {\n    \"enabled\": true,\n    \"allow\": [\"main\", \"${AGENT_ID}\"]\n  },\n  \"sessions\": {\n    \"visibility\": \"all\"\n  }\n}\n\nIf tools exists but has no agentToAgent, add it:\n\"agentToAgent\": {\n  \"enabled\": true,\n  \"allow\": [\"main\", \"${AGENT_ID}\"]\n}\n\n\nIf agentToAgent already exists, only append \"${AGENT_ID}\" to the allow array (no duplicates)\n\nIf sessions.visibility does not exist, add it:\n\n\"sessions\": {\n  \"visibility\": \"all\"\n}\n\n8. Validate JSON\ncat ${CONFIG_PATH} | python3 -m json.tool\n\n\nIf validation fails, stop immediately and restore from backup:\n\ncp ${CONFIG_PATH}.bak.* ${CONFIG_PATH}\n\n\nReport the exact error to the user.\n\n9. Fix File Permissions\nchown -R $(stat -c '%U:%G' ${MAIN_WORKSPACE}) ${NEW_WORKSPACE}/\nchown -R $(stat -c '%U:%G' ${MAIN_AGENT_DIR}) ${NEW_AGENT_DIR}/\n\n10. Report Completion\n\nReply to the user:\n\n✅ Agent \"${AGENT_NAME}\" (${AGENT_ID}) created successfully!\n\nCompleted:\n- openclaw agents add initialized\n- openclaw.json updated\n- Auth, skills and USER.md copied from main\n- SOUL.md / AGENTS.md generated\n- agentToAgent communication configured\n- JSON validation passed\n\n⚠️ Manual steps required:\n1. Restart the Gateway:\n   openclaw gateway restart\n\n2. Verify bindings:\n   openclaw agents list --bindings\n\n3. Open Telegram, find the new Bot and send /start to complete pairing"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/owen-ai-01/add-agent",
    "publisherUrl": "https://clawhub.ai/owen-ai-01/add-agent",
    "owner": "owen-ai-01",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/add-agent",
    "downloadUrl": "https://openagent3.xyz/downloads/add-agent",
    "agentUrl": "https://openagent3.xyz/skills/add-agent/agent",
    "manifestUrl": "https://openagent3.xyz/skills/add-agent/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/add-agent/agent.md"
  }
}