360 Secure SkillHub
360 安全技能中心

Agent Messaging

核心功能是实现不同网关的Agent间收发消息与任务委派,支持Ada、Spock(GCP网关)和Scotty(Pi网关)跨网通信。典型场景包括给Scotty指派安装技能、运行脚本任务,或向Ada反馈任务结果。可通过专用脚本命令或curl请求输入消息,输出带runId的成功响应;消息遇Agent繁忙会排队,需用Tailscale IP与对应token保障通信,同网关Agent另有专属方式。

h-mascot
h-mascot
热度 23.93
最近更新 2026-06-04 00:17:00
分类:协作依赖:代码执行 / 第三方 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