Create Agent With Telegram Group
Create a new OpenClaw agent and bind it to a dedicated Telegram group with workspace ~/claw-<agent-n
- Rating
- 4.4 (363 reviews)
- Downloads
- 24,883 downloads
- Version
- 1.0.0
Overview
Create a new OpenClaw agent and bind it to a dedicated Telegram group with workspace ~/claw-<agent-name>.
Complete Documentation
View Source →
Agent Create + Dedicated Telegram Group
Create one dedicated Telegram group per agent, bind the agent to that group, and set an isolated workspace path.
Script-first Rule
Prefer bundled scripts for deterministic steps (more stable + lower token cost). Only do manual JSON editing when scripts cannot cover a special case.
Use:
scripts/provision_config.pyfor agent/config/binding/no-mention setup (with automatic backup ofopenclaw.json)scripts/init_workspace.pyforUSER.md/IDENTITY.md/SOUL.mdinitialization
Access Scope
This skill accesses the following files on the host:
~/.openclaw/openclaw.json— read (model discovery) and write (agent binding)~/.openclaw/cron/jobs.json— read-only (for job listing if needed)~/claw-— workspace directory created by script/ ~/.openclaw/agents/— directory created (no auth files copied)/agent/
Config Safety
scripts/provision_config.pyreads and writes~/.openclaw/openclaw.json.- By default it creates a backup file:
~/.openclaw/openclaw.json.bak.. - It updates only:
agents.list(add/update target agent) — does NOT copy auth credentialsbindings(add target telegram group binding)channels.telegram.groups..requireMention=false gateway.reload.modeonly if missing (sets defaulthybrid)- The skill does NOT propagate API keys or auth tokens between agents.
- Gateway-level auth is inherited automatically; do not manually copy auth files.
Inputs
Collect (before executing):
agent_name(required)model(required): ask user explicitly which model to use; model options must be read live from the user’s~/.openclaw/openclaw.json(do not hardcode examples)- Optional
telegram_group_titleoverride (custom group name) - Initialization preferences (required ask):
- whether to create/update
USER.md - whether to create/update
IDENTITY.md - whether to create/update
SOUL.md - If initialization is enabled, collect content fields before writing files:
USER.md: user name / preferred call name / language / goals / notesIDENTITY.md: agent display name / vibe / emoji (optional)SOUL.md: role/mission / tone / constraints (short bullet points)
agent_name:
- Keep lowercase letters, digits, and hyphens only.
- Replace spaces/underscores with
-. - Use this value in paths and IDs.
- If user provides
telegram_group_title, use it directly. - If not provided, generate default title from agent name in PascalCase.
- Example:
test-skill->TestSkill,bilingual-agent->BilingualAgent.
Workflow
- Read available models from
~/.openclaw/openclaw.jsonfirst, then confirm inputs with user (agent name, model, init-file preferences, optional telegram group title). - Build workspace path as
~/claw-and create it if missing. - Resolve group title:
- custom
telegram_group_titleif provided - otherwise PascalCase(agent_name)
- Create and bind Telegram group (use resolved group title):
- use browser automation/user-account flow (Telegram bot API cannot reliably create groups)
- CONFIRM with user before triggering browser automation (explicit yes/no required)
- if browser automation is unavailable, request the minimal manual steps and resume
- Create/update OpenClaw config via script (preferred):
- CONFIRM with user before modifying openclaw.json (explicit yes/no required)
python3 scripts/provision_config.py --agent-name--model --chat-id - this sets: agent entry, workspace, binding, and
requireMention=false - Apply config and activate it:
- if hot reload is enabled, verify reload logs show applied changes
- if reload is off or not applied, CONFIRM with user before restarting gateway (explicit yes/no required)
- restart gateway only after user approval
- Bootstrap agent runtime files (required for first-run stability):
- ensure
~/.openclaw/agents/exists/agent - do NOT copy any auth files from other agents (this prevents credential/API key propagation)
- new agents inherit authentication from the gateway's shared auth context automatically
- do NOT manually copy or create auth-profiles.json, auth.json, or models.json
- If initialization is requested, ask user for file content fields first, then write files:
- collect required values for
USER.md/IDENTITY.md/SOUL.md - then run:
python3 scripts/init_workspace.py --workspace--agent-name [--with-user] [--with-identity] [--with-soul] - if user provided custom text, apply it after script initialization (overwrite placeholders)
- Ensure routing validity for current schema (no invalid allowFrom entries for groups).
- Post-provision verification:
- send a test message in group and ask user to send
ping - confirm agent responds without
@mention - Return completion summary with:
- agent name
- model
- workspace path
- group title
- chat_id
- no-mention reply mode (
enabled/disabled) - status and next step (if any)
Telegram Automation Rules
- Group creation/deletion and member operations should use browser automation (user-account flow).
- For browser flow, prefer Chrome relay profile for existing logged-in Telegram sessions.
- If no connected Chrome tab is available, ask user to attach once, then continue.
- If Telegram shows confirmation/captcha that cannot be automated, request one manual click, then resume.
OpenClaw Command Discovery
Do not invent OpenClaw commands.
When agent create/update command syntax is unknown:
- Run
openclaw help. - If needed, run
openclawfor the relevant subcommand.--help - Use only discovered command forms.
Idempotency
- If
~/claw-already exists, reuse it. - If a same-name group already exists, confirm whether to reuse or create a fresh one.
- If agent already exists, update model/binding/workdir instead of duplicating.
Reliability Checks (must do)
- Verify
requireMention=falsefor the bound group. - Verify gateway config actually applied:
- check reload mode/status logs (
config hot reload applied,restarting telegram channel) - if reload is
offor not applied, restart gateway and re-check logs. - Send one bot-originated test message to the new group, then require one live user
ping. - Verify agent replies without
@mention. - Do not claim success before
ping -> pongverification passes.
Failure Handling
If group creation succeeds but binding fails:
- Keep created group.
- Report exact failed step.
- Provide one-command resume instruction for the next run.
- Report that as a partial success.
- Provide the shortest fallback step to fetch chat_id, then continue binding.
Output Template
Return concise status:
agent:model:workspace:~/claw-telegram_group:chat_id:binding:reply_without_mention:initialized_files:verification:next_step:
Installation
openclaw install create-agent-with-telegram-group
Tags
Quick Info
Ready to Install?
Get started with this skill in seconds
Related Skills
4claw
4claw — a moderated imageboard for AI agents.
Aap Passport
Agent Attestation Protocol - The Reverse Turing Test.
Acestep Lyrics Transcription
Transcribe audio to timestamped lyrics using OpenAI Whisper or ElevenLabs Scribe API.
Adaptive Suite
A continuously adaptive skill suite that empowers Clawdbot.