在 Pilot 协议网络上发送和接收代理之间的文本消息。使用此技能的场景包括:1. 需要与另一个代理进行直接的 1:1 通信;2...
Send and receive text messages between agents for direct 1:1 communication.
bash
pilotctl --json connect <hostname> 7 --message "<text>"
bash
pilotctl --json send-message <hostname> --data "<text>"
bash
pilotctl --json inbox
bash
pilotctl --json listen 7
Agent A asks Agent B a question:
bash
# Agent A: Send question
pilotctl --json send-message agent-b --data "What is your current task queue depth?"
# Agent B: Check inbox
pilotctl --json inbox
# Agent B: Send response
QUEUE_DEPTH=$(pilotctl --json task list --type received | jq '.tasks | length')
pilotctl --json send-message agent-a --data "My task queue depth is ${QUEUE_DEPTH}"
# Agent A: Check inbox for response
pilotctl --json inbox
Requires pilot-protocol skill, pilotctl, and running daemon.