🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

OpenClaw Add Agent

by @gaoxiaowei2117

Add a new agent to OpenClaw configuration. Use when user wants to add a new Telegram bot agent to OpenClaw. Triggers: add agent, new agent, bind telegram.

Versionv1.0.0
Downloads215
TERMINAL
clawhub install openclaw-add-agent

πŸ“– About This Skill


name: openclaw-add-agent description: "Add a new agent to OpenClaw configuration. Use when user wants to add a new Telegram bot agent to OpenClaw. Triggers: add agent, new agent, bind telegram."

Add Agent to OpenClaw

Workflow

Step 1: Collect Agent Info

Required info from user:

  • Bot token: Telegram bot token (format: 123456789:ABCdef...)
  • Agent ID: Unique identifier (e.g., translator, customer_support)
  • Purpose/Name: Display name (optional, defaults to agent ID)
  • Allow users: Telegram user IDs that can access this bot (default: same as existing agents)
  • Step 2: Update openclaw.json

    Edit /home/xgao/.openclaw/openclaw.json:

    A. Add agent to agents.list:

    {
      "id": "",
      "name": "",
      "workspace": "/home/xgao/clawd-workspace/"
    }
    

    B. Add binding:

    {
      "agentId": "",
      "match": {
        "channel": "telegram",
        "accountId": ""
      }
    }
    

    C. Add telegram account:

    "": {
      "enabled": true,
      "dmPolicy": "allowlist",
      "botToken": "",
      "allowFrom": [],
      "groupPolicy": "allowlist",
      "streaming": "partial"
    }
    

    Step 3: Create Workspace Directory

    mkdir -p /home/xgao/clawd-workspace/
    

    Step 4: Ask About Memory Isolation

    Ask user: "ζ˜―ε¦ιœ€θ¦η‹¬η«‹ηš„memory?"

  • Yes β†’ Each agent already has independent workspace, memory is automatically isolated
  • No β†’ Share workspace (not recommended)
  • Step 5: Restart OpenClaw

    Inform user to restart: openclaw restart

    Minimal Config Example

    For a simple translator bot:

    // agents.list
    { "id": "translator", "name": "translator", "workspace": "/home/xgao/clawd-workspace/translator" }

    // bindings { "agentId": "translator", "match": { "channel": "telegram", "accountId": "translator" } }

    // channels.telegram.accounts "translator": { "enabled": true, "dmPolicy": "allowlist", "botToken": "8223784004:AAE-...", "allowFrom": ["8538882690"], "groupPolicy": "allowlist", "streaming": "partial" }