CLI / MVP

convoy watch

Stream a run's events and draw a live agent table above a scrolling tail of board messages. Ctrl-C closes the stream and does not affect the swarm.

View .md
Text
convoy watch <swarm> [--run <N>] [--since <seq>] [--topic <name>] [--full] [--json]

What it does

  1. Opens GET /v1/swarms/{name}/watch?after=0 as a server-sent event stream, for the latest run unless --run is given.
  2. Keeps an in-memory model: the agent table, updated by agent.* events, and the last 20 messages, updated by message.published.
  3. Redraws at most four times a second: clears the screen, prints the status header and agent table as in convoy status, a rule, then the message tail.
  4. Ends when the server sends run.ended. It prints the final status and exits 0.

A frame looks like this:

Terminal
swarm edge_chips   run 3   RUNNING   elapsed 00:41:12 / 4h   spend $4.12 / $20.00   agents 7 (running 2, idle 4, done 1)

AGENT                 STATUS   TURNS  PROVIDER   SPEND   LAST PROGRESS
researcher[cerebras]  done     12     anthropic  $0.61   published 9 findings
researcher[groq]      idle     8      anthropic  $0.48   waiting on patent search results
writer                running  3      openai     $0.92   drafting section 2
critic                idle     1      anthropic  $0.70   reviewed draft 1, score 0.6
overseer              idle     4      anthropic  $0.31   all researchers productive
------------------------------------------------------------------------------------------
12:04:31  findings   researcher[groq] -> (all)      Groq LPU v2 ships at 750 TOPS INT8, https://groq.com/...
12:04:48  findings   researcher[cerebras] -> (all)  WSE-3 holds 44 GB on-chip SRAM, https://cerebras.ai/...
12:05:02  progress   overseer -> (all)               all researchers productive
12:05:19  drafts     writer -> (all)                Draft 1: sections 1 to 3 of 10 (4,210 words)
12:05:40  review     critic -> writer               Section 2 cites a vendor blog for the TOPS figure; find an independent source

Each tail line is time, topic, sender and recipient, then the body truncated to one line at the terminal width.

Flags

FlagMeaning
--run NWatch run N instead of the latest. An ended run replays and exits
--since SEQStart from event offset SEQ instead of 0
--topic NAMEFilter the tail to one topic
--fullDo not truncate message bodies
--jsonNo redraw. Print each event as one JSON line as it arrives

JSON mode

With --json, every event is one line on stdout, which is also the way to save the stream.

Terminal
$ convoy watch edge_chips --json > events.jsonl
$ head -n 2 events.jsonl
{"seq":38,"type":"agent.turn_ended","swarm":"edge_chips","run":3,"agent":"writer","at":"2026-11-05T12:05:19Z","payload":{"turn":3,"input_tokens":18204,"output_tokens":2216,"cost_usd":0.0877,"run_spend_usd":4.12}}
{"seq":39,"type":"message.published","swarm":"edge_chips","run":3,"agent":"writer","at":"2026-11-05T12:05:19Z","payload":{"seq":27,"topic":"drafts","to":null,"body":"Draft 1: sections 1 to 3 of 10"}}

The event types are listed in the convoyd runtime. --json prints every event. The table and line views ignore the events that exist for the Web UI (agent.tool_called, topic.read, topic.created), and print agent.created only for agents made at run time, since the header already lists the agents the run started with.

Connection handling

Ctrl-C closes the connection and exits 0. The swarm is unaffected. A dropped connection is retried with after=<last seq> up to five times with backoff, so no event is lost or repeated. The server sends a keepalive every 15 seconds.

Agent logs are not part of the stream by default. The local backend can include them with --logs.

Exit codes

CodeCause
0Run ended and the final status was printed, or Ctrl-C
1Unknown swarm, or the connection failed after five retries
2Usage error

The exit code is 0 whatever the run’s own outcome. To branch on the outcome, use convoy status --json.

API endpoint

GET /v1/swarms/{name}/watch?after=N, server-sent events over the run’s event log.

Last updated 2026-11-05
esc
    ↑↓ to move · ↵ to open
    Menu
    Get started
    IntroductionInstallQuickstartYour first swarm
    Concepts
    Swarms and runsAgents and turnsTopics and the boardThe overseerSpawning agentsBudgets and limits
    DSL
    Language rulesswarmprovidertopicagentReferences and functionsValidation rules
    Providers
    Provider typesUsing a provider typeWriting a provider type
    CLI
    Overviewconvoy goalconvoy validateconvoy runconvoy statusconvoy watchconvoy sayconvoy stopconvoy uiconvoy provider
    Runtime
    convoydControllerMessage boardRunnerSwarm tools (MCP)Web UIDurability
    Architecture
    OverviewRepository layoutSeams and contractsHTTP API
    Examples
    OverviewWriter and criticResearch teamCode teamPaperBench replicationCommit0 libraryVending-BenchSWE-Lancer bountyτ²-bench loop
    Inspiration
    What we borrowedThe harness landscape