← 返回
AI智能 中文

CreateTelegramClawAgent

Create a new Telegram agent in OpenClaw with proper configuration. Use when user wants to create a new Telegram bot agent, including setting up agent workspa...
在 OpenClaw 中创建 Telegram 代理并完成正确配置,适用于用户需要新建 Telegram 机器人代理,包括设置代理工作区等。
4t-shirt
AI智能 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 487
下载
💾 6
安装
1
版本
#latest

概述

Create Telegram Agent Skill

This skill helps create a new Telegram agent with complete configuration.

Prerequisites

Before starting, ensure you have:

  1. A Telegram bot token (from @BotFather)
  2. The agent's purpose/description
  3. The desired agent name

Workflow

Step 1: Collect Required Information

Ask the user for:

  1. Agent Name (required)
    • Must be unique
    • Use lowercase letters, digits, and hyphens
    • Examples: healthman, news-bot, task-manager
  1. Agent Purpose (required)
    • What will this agent do?
    • Examples: "Personal health coach", "Daily news summarizer", "Task reminder assistant"
  1. Telegram Bot Token (required)
    • Format: 1234567890:ABCdefGHIjklMNOpqrSTUvwxyz
    • Get from @BotFather on Telegram

If user doesn't have a token, provide these steps:

> How to Create a Telegram Bot Token:

> 1. Open Telegram and search for @BotFather

> 2. Start a chat with BotFather and send /newbot

> 3. Follow the prompts:

> - Enter a name for your bot (display name, e.g., "CookMaster")

> - Enter a username for your bot (must end in 'bot', e.g., "cookmaster_bot")

> 4. BotFather will send you a message containing your HTTP API token

> 5. Copy the token (format: 1234567890:ABCdefGHIjklMNOpqrSTUvwxyz)

>

> Important: Keep your token secure. Anyone with your token can control your bot.

Step 2: Generate Agent Configuration

Based on user input, prepare the following configurations:

Agent Definition

{
  "id": "<agent-id>",
  "name": "<Agent Name>",
  "workspace": "/Users/<user>/.openclaw/workspace-<agent-id>",
  "agentDir": "/Users/<user>/.openclaw/agents/<agent-id>/agent"
}

Telegram Binding

{
  "agentId": "<agent-id>",
  "match": {
    "channel": "telegram",
    "accountId": "<bot-id>"
  }
}

Telegram Bot Account

"<bot-id>": {
  "enabled": true,
  "dmPolicy": "pairing",
  "botToken": "<full-bot-token>",
  "groupPolicy": "allowlist",
  "streamMode": "partial"
}

Step 3: Present Configuration for Review

CRITICAL: DO NOT MODIFY openclaw.json DIRECTLY

Present the following to the user in a clear format:


📋 Configuration Summary

The following changes will be made to openclaw.json:

1. Agent Definition (add to agents.list)

{
  "id": "<agent-id>",
  "name": "<Agent Name>",
  "workspace": "/Users/<user>/.openclaw/workspace-<agent-id>",
  "agentDir": "/Users/<user>/.openclaw/agents/<agent-id>/agent"
}

2. Telegram Binding (add to bindings)

{
  "agentId": "<agent-id>",
  "match": {
    "channel": "telegram",
    "accountId": "<bot-id>"
  }
}

3. Telegram Bot Account (add to channels.telegram.accounts)

"<bot-id>": {
  "enabled": true,
  "dmPolicy": "pairing",
  "botToken": "<full-bot-token>",
  "groupPolicy": "allowlist",
  "streamMode": "partial"
}

4. Agent Responsibilities (suggested for AGENTS.md)

Based on the provided purpose, generate a responsibility description covering:

  • Core functions of the agent
  • Working methodology
  • Relationship with the user

Please confirm to proceed with the modifications. Any adjustments needed?

Step 4: Wait for User Confirmation

Only proceed after user explicitly confirms (e.g., "confirm", "proceed", "execute", "go ahead").

Step 5: Execute Configuration

Once confirmed:

  1. Create directories:

```bash

mkdir -p /Users//.openclaw/workspace-

mkdir -p /Users//.openclaw/agents//agent

```

  1. Update openclaw.json:
    • Add agent to agents.list
    • Add binding to bindings
    • Add bot account to channels.telegram.accounts
  1. Create agent files:
    • AGENTS.md - Work responsibilities and workflow
    • SOUL.md - Agent personality and values
  1. Report completion:
    • Show summary of what was created
    • Remind user to restart OpenClaw gateway (if applicable)
    • Provide next steps (e.g., test the bot)

Important Rules

  1. Never modify openclaw.json without explicit user confirmation
  2. Always show the complete configuration changes before applying
  3. Extract bot ID from token (the number before the colon)
  4. Create all necessary directories before writing files
  5. Generate appropriate AGENTS.md and SOUL.md based on the agent's purpose

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 03:49 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,350 📥 317,461
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,054 📥 794,329
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 709 📥 243,380