name: 4d-compression-core version: 1.0.2 description: "把长内容压缩成结构化向量——节省 60-80% Token,保留核心信息" metadata: { "openclaw": { "emoji": "🌀", "requires": { "bins": ["jq", "awk"] }, "triggers": ["压缩", "4d",...
中文简介正在准备中。当前显示原文说明。
Add a new OpenClaw Agent, automatically configure openclaw.json, create workspace, copy auth and skills.
中文简介正在准备中。当前显示原文说明。
安装前可以查看交给 AI 代理的指令内容。
Quickly add a new isolated Agent with a dedicated Telegram Bot.
User says something like:
"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"
Once a new agent request is received, execute in the following order:
Extract the following fields from user input:
AGENT_ID: English ID (e.g. marketing)AGENT_NAME: Agent name (e.g. Marketing Assistant, Alice, WorkBot, etc.)BOT_TOKEN: Telegram Bot TokenALLOW_FROM: allowFrom numeric ID (e.g. 123456789)DESCRIPTION: Role description (e.g. responsible for content marketing and social media)If any field is missing, ask the user to provide it before continuing.
Read the current openclaw.json path, extract the actual paths from the existing main agent in agents.list to derive:
STATE_DIR: e.g. /home/openclaw/.openclawMAIN_WORKSPACE: main agent workspace pathMAIN_AGENT_DIR: main agent agentDir pathNEW_WORKSPACE: ${STATE_DIR}/workspace-${AGENT_ID}NEW_AGENT_DIR: ${STATE_DIR}/agents/${AGENT_ID}/agentcp ${CONFIG_PATH} ${CONFIG_PATH}.bak.$(date +%Y%m%d%H%M%S)
openclaw agents add ${AGENT_ID}
This automatically initializes the workspace directory structure, agentDir, and default files like SOUL.md and AGENTS.md.
# Copy auth profiles
cp ${MAIN_AGENT_DIR}/auth-profiles.json \
${NEW_AGENT_DIR}/auth-profiles.json
# Copy skills
cp -r ${MAIN_WORKSPACE}/skills/ \
${NEW_WORKSPACE}/skills/
# Copy USER.md
cp ${MAIN_WORKSPACE}/USER.md \
${NEW_WORKSPACE}/USER.md
Overwrite ${NEW_WORKSPACE}/SOUL.md:
# ${AGENT_NAME}
## Identity
You are ${AGENT_NAME}, ${DESCRIPTION}.
Your partner is the main agent. You collaborate together to complete tasks.
## Core Responsibilities
${DESCRIPTION}
## Personality
- Action-oriented: Break down tasks immediately and provide clear execution steps
- Proactive reporting: Report results to main after completing tasks
- Professional: Maintain high standards for all outputs
## Rules
- Do not execute high-risk operations without confirmation
- Always notify the user before executing operations that require manual approval
Overwrite ${NEW_WORKSPACE}/AGENTS.md:
# ${AGENT_NAME} Agent Configuration
## Other Agents in the System
- **main**: Primary agent, responsible for daily conversation, task coordination and decisions
- **${AGENT_ID} (yourself)**: ${DESCRIPTION}
## Collaboration Rules
### Receiving Tasks from main
1. Confirm task goal and priority
2. Break down execution steps
3. Execute and record results
4. Report results back to main upon completion
### When to Proactively Contact main
- Operations that require final user confirmation
- Result reporting after task completion
- Escalating anomalies or unexpected situations
Read the current config and append the following:
Add to agents.list:
{
"id": "${AGENT_ID}",
"name": "${AGENT_NAME}",
"workspace": "${NEW_WORKSPACE}",
"agentDir": "${NEW_AGENT_DIR}"
}
Add to bindings:
{
"agentId": "${AGENT_ID}",
"match": {
"channel": "telegram",
"accountId": "${AGENT_ID}"
}
}
Add to channels.telegram.accounts:
"${AGENT_ID}": {
"enabled": true,
"botToken": "${BOT_TOKEN}",
"dmPolicy": "pairing",
"allowFrom": ["${ALLOW_FROM}"],
"groupPolicy": "allowlist",
"streaming": "off"
}
Handle tools config (check before writing):
Check whether the tools field exists:
tools does not exist, add the full block:"tools": {
"agentToAgent": {
"enabled": true,
"allow": ["main", "${AGENT_ID}"]
},
"sessions": {
"visibility": "all"
}
}
tools exists but has no agentToAgent, add it:"agentToAgent": {
"enabled": true,
"allow": ["main", "${AGENT_ID}"]
}
If agentToAgent already exists, only append "${AGENT_ID}" to the allow array (no duplicates)
If sessions.visibility does not exist, add it:
"sessions": {
"visibility": "all"
}
cat ${CONFIG_PATH} | python3 -m json.tool
If validation fails, stop immediately and restore from backup:
cp ${CONFIG_PATH}.bak.* ${CONFIG_PATH}
Report the exact error to the user.
chown -R $(stat -c '%U:%G' ${MAIN_WORKSPACE}) ${NEW_WORKSPACE}/
chown -R $(stat -c '%U:%G' ${MAIN_AGENT_DIR}) ${NEW_AGENT_DIR}/
Reply to the user:
✅ Agent "${AGENT_NAME}" (${AGENT_ID}) created successfully!
Completed:
- openclaw agents add initialized
- openclaw.json updated
- Auth, skills and USER.md copied from main
- SOUL.md / AGENTS.md generated
- agentToAgent communication configured
- JSON validation passed
⚠️ Manual steps required:
1. Restart the Gateway:
openclaw gateway restart
2. Verify bindings:
openclaw agents list --bindings
3. Open Telegram, find the new Bot and send /start to complete pairing
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
name: 4d-compression-core version: 1.0.2 description: "把长内容压缩成结构化向量——节省 60-80% Token,保留核心信息" metadata: { "openclaw": { "emoji": "🌀", "requires": { "bins": ["jq", "awk"] }, "triggers": ["压缩", "4d",...
中文简介正在准备中。当前显示原文说明。
Use cheap, TEE-verified AI models from the 0G Compute Network as OpenClaw providers. Discover available models and compare pricing vs OpenRouter, verify provider integrity via hardware attestation (Intel TDX), manage your 0G wallet and sub-accounts, and configure models in OpenClaw with one workflow. Supports DeepSeek, GLM-5, Qwen, and other models available on the 0G marketplace.
中文简介正在准备中。当前显示原文说明。
Send and receive P2P messages using disposable numbers and PINs. No servers, no accounts. Use for human notifications, approval flows, and agent-to-agent communication.
中文简介正在准备中。当前显示原文说明。
Query historical crypto market data from 0xArchive across Hyperliquid, Lighter.xyz, and HIP-3. Covers orderbooks, trades, candles, funding rates, open interest, liquidations, and data quality. Use when the user asks about crypto market data, orderbooks, trades, funding rates, or historical prices on Hyperliquid, Lighter.xyz, or HIP-3.
中文简介正在准备中。当前显示原文说明。
Find and complete paid tasks on the 0xWork decentralized marketplace (Base chain, USDC escrow). Use when: the agent wants to earn money/USDC by doing work, discover available tasks, claim a bounty, submit deliverables, check earnings or wallet balance, or set up as a 0xWork worker. Task categories: Writing, Research, Social, Creative, Code, Data. NOT for: posting tasks (use the website), managing the 0xWork platform, or frontend development.
中文简介正在准备中。当前显示原文说明。
Patterns and practices that dramatically accelerate development velocity. Covers parallel execution, automation, feedback loops, workflow optimization, and anti-pattern avoidance. Use when starting projects, planning sprints, optimizing workflows, or onboarding developers.
中文简介正在准备中。当前显示原文说明。