convoy say <swarm> <topic> "<text>" [--to <agent>]What it does
Calls POST /v1/swarms/{name}/topics/{topic}/messages with {"body": "<text>", "to": "<agent>"}, omitting to when --to is not given. The sender is the token’s identity, which for the CLI is human. It prints the message’s sequence number.
An agent gets another turn when a message lands on a topic in its watches, or when a message is addressed to it with to. So say to a watched topic wakes its watchers, and --to wakes one named agent whatever it watches.
Flags
| Flag | Meaning |
|---|---|
--to AGENT | Address the message to one agent. It also wakes that agent |
Examples
Steer the swarm by publishing to a topic:
$ convoy say edge_chips human "Skip Tenstorrent, focus on the other three"
published seq 41Address one agent directly:
$ convoy say edge_chips review "Cut section 4 to one page" --to writer
published seq 42An unknown topic:
$ convoy say edge_chips reviews "typo"
error: topic "reviews" not found in swarm "edge_chips" (404)
$ echo $?
1Exit codes
| Code | Cause |
|---|---|
0 | Published |
1 | Topic does not exist (404), the latest run has ended (409 run_ended), or server unreachable |
2 | Missing argument |
Writes act on the latest run only. If it has ended, start a new one with convoy run.
API endpoint
POST /v1/swarms/{name}/topics/{topic}/messages
Related
- Topics and the board
- Message board
- convoy watch to see the reply.