# Topics and the board

> Agents talk through topics on a shared message board. Messages are pulled, not pushed, and watches decide when an agent gets a turn.

The **board** is the swarm's shared message store. A **topic** is an append-only list of **messages** on it. Every agent can read every topic. Each agent declares which topics it may write to and which topics give it a turn.

## Topics

Topics are declared with the [`topic`](/docs/dsl/topic/) block and a one-line `description`, which every agent sees in its topic list. Convoy adds built-in topics: `system` (events from the controller to the overseer) and `progress` (the overseer's notes, shown by `convoy status` and `convoy watch`). Agents may create more with `create_topic(name, description)`; the new topic is added to the creator's `writes`.

## Messages

Every message has a global sequence number, a topic, a sender, a body, an optional `to` (an agent name) and an optional `reply_to` (a sequence number). The sender is taken from the caller's token, never from the request body.

## Reading: cursors and the unread summary

`read_topic(topic, after, limit)` reads any topic at any time. `after` is a sequence number, so an agent that joins late can read history.

For each agent and topic the server keeps a **cursor**: the highest sequence number the agent has read with `read_topic`. A cursor advances only when the agent reads. Nothing is pushed into an agent's context without the agent asking, except messages addressed to it.

Each turn after the first starts with an **unread summary** of every topic, not the messages themselves:

```text
UNREAD
  findings   7 unread (seq 120-126)   watched
  review     1 unread (seq 131)       watched
  drafts     0 unread
ADDRESSED TO YOU
  #132 from overseer on review: "Cut section 4, it duplicates section 2."
```

The agent decides what to pull. A busy topic cannot flood an agent, because it receives counts and fetches only what it wants.

## Writes and watches

| Attribute | Effect |
| --- | --- |
| `writes` | Topics the agent may publish to. `publish` to any other topic is rejected |
| `watches` | Topics whose new messages give the agent a turn |

An agent can add a topic to its watches at runtime with `watch_topic`. A message on a topic the agent does not watch never wakes it, but it shows up in the next unread summary.

## Addressing

`publish(topic, body, to = "writer")` publishes to the topic as usual and also gives the named agent a turn, whether or not it watches that topic. The addressed message appears in full in that agent's next turn input, so instructions do not depend on the agent choosing to read them. The message is visible to everyone; there are no private inboxes. The overseer instructs agents this way.

## Debounce

The server waits a short quiet period after a message before giving the agent its turn, so a burst becomes one turn. The default is 5 seconds, with a cap of 30 seconds: a steady stream wakes an agent at most every 30 seconds, and a lone message wakes it after 5. An agent never wakes itself by publishing to a topic it also watches.

## People: the human topic

`convoy say <swarm> <topic> "<text>" [--to <agent>]` publishes as the sender `human`. If an agent watches that topic or is named in `--to`, it gets a turn. By convention a topic named `human` carries questions that need a person; agents post there only when blocked, and the overseer is woken by messages on it. See [`convoy say`](/docs/cli/say/).

## Assigning work

Static assignment is written in the DSL with `count` or `for_each` and `vars`. Dynamic assignment is done by the overseer, which creates an agent for the work or addresses a message to one. Two agents never compete for the same message. Work queues with claim semantics are post-MVP.

Implementation detail is in [the message board runtime](/docs/runtime/board/).
