360 Secure SkillHub
360 安全技能中心

Agent Messaging

该 Skill 提供跨网关 Agent 通信脚本:通过 clawdbot 网关的 HTTP Hook 接口,用 curl 携带 Bearer 令牌以 POST 方式把消息或任务发送给 Ada、Scotty 等目标 Agent,并返回 ok 与 runId;目标繁忙时消息排队。不包含令牌管理、消息加密或投递重试机制。

h-mascot
h-mascot
热度 23.99
最近更新 2026-06-04 00:17:00
分类:协作依赖:代码执行 / 第三方 API应用场景:工作流 / 任务管理 / API 集成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add ec-agent-messaging
Metadata
name
agent-messaging
description
Send messages between agents across gateways using hooks. Use when you need to delegate tasks to Scotty (Pi) or communicate cross-gateway.

Agent Messaging Skill

Send tasks and messages to other agents across different gateways.

Agent Directory

Agent Location IP Port Hook Token
Ada 🔮 ada-gateway (GCP) 100.106.69.9 18789 $ADA_HOOK_TOKEN (see secrets/agent-tokens.env)
Spock 🖖 ada-gateway (GCP) Same as Ada Same Same
Scotty 🔧 castlemascot-r1 (Pi) 100.68.207.75 8443 $SCOTTY_HOOK_TOKEN (see secrets/agent-tokens.env)

Usage

Send message to Scotty (from Ada/Spock)

~/clawd/skills/agent-messaging/scripts/send-to-scotty.sh "Your task or message here"

Send message to Ada (from Scotty)

~/clawd/skills/agent-messaging/scripts/send-to-ada.sh "Your message here"

Direct curl (any agent)

curl -X POST http://<IP>:<PORT>/hooks/agent \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"message": "Your message"}'

Examples

Delegate a task to Scotty

./scripts/send-to-scotty.sh "Install the table-image skill. Run: go install github.com/joargp/tablesnap/cmd/tablesnap@latest. Confirm when done."

Ask Scotty to run a script

./scripts/send-to-scotty.sh "Run setup-skills.sh and report results: cd ~/clawd && ./scripts/setup-skills.sh"

Report back to Ada

./scripts/send-to-ada.sh "Task complete! Installed 5 packages successfully."

Response

The hook returns:

{"ok": true, "runId": "uuid-here"}

The target agent will process the message in their next available slot.

Notes

  • Messages are queued if agent is busy
  • Use Tailscale IPs (100.x.x.x) for reliability
  • Tokens are in ~/clawd/secrets/ or memory.md
  • Same-gateway agents (Ada ↔ Spock) use sessions_send instead

Troubleshooting

Connection refused?

  • Check if gateway is running: ps aux | grep clawdbot
  • Verify port is correct
  • Check Tailscale connection: tailscale status

Unauthorized?

  • Verify hook token matches gateway config
  • Check hooks.token in clawdbot.json