Once the broker is up, the CLI can act as a lightweight operator console for human-to-agent messages and recent conversation history.
Send a message
agent-relay send reviewer "Please summarize the riskiest changes first."The target argument accepts:
- an agent name such as
reviewer - a channel such as
#general *for broadcast
Optional flags:
--from <name>sets the sender identity. Defaults to$AGENT_RELAY_ORCHESTRATOR_NAMEororchestrator. Workers' replies are addressed to this name, so use a stable value you can read withagent-relay replies <worker>.--thread <id>keeps follow-ups grouped under an existing thread.
Read recent history
agent-relay history --to '#general' --since 30mUseful filters:
--from <agent>keeps only one sender.--to <agent-or-channel>narrows to a target. When<agent>is not a channel, the command prints messages in chronological order with no preview truncation; pair with--from <sender>to filter by sender. For example,agent-relay history --to Worker2 --from Worker2is equivalent toagent-relay replies Worker2for the non---unreadcase.--since <time>accepts values like30m,1h, or an ISO date.--jsonemits structured output for scripts. Each DM record carries adirectionfield (inboundoroutbound) relative to the reader identity.
Read replies from a worker
agent-relay replies Worker2Shows messages received from <agent> in chronological order (oldest first, newest at the bottom), full text, with sender attribution. Inbound-only: it never echoes the orchestrator's own outbound DMs.
Useful filters:
-n, --limit <count>caps the number of messages (default50).--since <time>accepts values like30s,5m,1h, or an ISO date.--unreadshows only unread messages and does not mark them read.--mark-readmarks the printed messages as read after printing.--as <name>reads as a specific orchestrator identity (default$AGENT_RELAY_ORCHESTRATOR_NAMEororchestrator).--fulldisables truncation; text is already printed in full, so this is currently a forward-compatible no-op.--jsonemits structured output; each record carries adirectionfield (inboundoroutbound) relative to the reader identity.
Exit code is 0 whether messages were printed or none were found; only connection or auth failures return non-zero.
Check the inbox
agent-relay inboxinbox summarizes unread channels, mentions, and DMs. For DMs, the text renderer prints up to three most recent unread messages per conversation with full text and a <sender> → <reader> header.
If a conversation has more than three unread messages, a footer line points at agent-relay replies <agent> --unread for the full list. Add --json if another tool will parse the result; the JSON shape is unchanged for existing callers and additionally carries a direction field on each unread DM last_message.
Practical pattern
agent-relay send planner "Create the plan, then hand implementation to coder."
agent-relay replies planner --since 15m
agent-relay inbox