Skip to content

The messaging reef

Every command of the messaging reef: topics, queues and the agents' sessions, with Triton's room beside it.

Commands

Examples

apply-reef

Apply the messaging reef.

nereus reef apply messaging
output
✓ core/reefs/messaging 0.1.0 created (messaging.getnereus.dev/v1alpha1: queues, topics)

Next steps:

  nereus messaging --help
  nereus nereid apply <nereid> --reef messaging

apply-nats

Apply the nats Nereid to the messaging reef.

nereus nereid apply nats \
  --reef messaging
output
✓ core/nereids/nats created, Ready, pinned to sha256:<digest>: see 'nereus messaging --help'

Next steps:

  nereus mandate create messaging-nats --reef messaging --nereid nats --match engine=nats --param jetstream=true

topic-create

A topic for the orders, owned by a project.

nereus messaging topic create orders \
  --owner project/triton \
  --engine nats
output
✓ messaging/topics/orders created (mandate: messaging-nats, nereid: nats)

Next steps:

  nereus messaging topic get orders

topic-get

Every detail of one topic.

nereus messaging topic get orders
output
Name:             orders
Owner:            Project/triton
Engine:           nats
Mandate:          nats
Nereid:           nats
Deletion policy:  retain
Ready:            True
Connection:       secret nereus-system/orders-topic (host, port, uri, subject)

topic-apply

The YAML of a topic, written by a dry run.

nereus messaging topic create events \
  --owner project/triton \
  --engine nats \
  --dry-run \
  --output yaml
output
apiVersion: messaging.getnereus.dev/v1alpha1
kind: Topic
metadata:
  name: events
spec:
  owner:
    kind: Project
    name: triton
  engine: nats

queue-create

A queue for the builds to run.

nereus messaging queue create builds \
  --owner project/triton \
  --engine nats
output
✓ messaging/queues/builds created (mandate: messaging-nats, nereid: nats)

Next steps:

  nereus messaging queue get builds

queue-get

Every detail of one queue.

nereus messaging queue get builds
output
Name:             builds
Owner:            Project/triton
Engine:           nats
Mandate:          nats
Nereid:           nats
Deletion policy:  retain
Ready:            True
Connection:       secret nereus-system/builds-queue (host, port, uri, subject, stream)

queue-apply

The YAML of a queue, written by a dry run.

nereus messaging queue create scratch \
  --owner project/triton \
  --engine nats \
  --deletion-policy delete \
  --dry-run \
  --output yaml
output
apiVersion: messaging.getnereus.dev/v1alpha1
kind: Queue
metadata:
  name: scratch
spec:
  owner:
    kind: Project
    name: triton
  engine: nats
  deletionPolicy: delete

session-create-dry-run

What would happen, with no name given.

nereus messaging session create \
  --dry-run
output
would start claude-code as a Nereid's name free on Triton in the room on Triton, if Triton serves orders, logged in to NATS with the nats-channel plugin

session-create

Start Claude Code as agent m15.

nereus messaging session create m15
output
  messaging: https://triton.getnereus.dev/mcp (peer tools: whoami, list_agents, post_room, read_room)
  the room only: Triton serves no orders, so no NATS login (--orders to listen for them)
starting m15 with claude-code: in the room on Triton

session-create-orders

Log agent m15 in to NATS without a browser (SSH).

nereus messaging session create m15 \
  --use-device-code
output
To log agent m15 in to NATS, open https://auth.getnereus.dev/realms/nereus/device and enter the code JWCS-HLWC (valid for 10 min)
logged in as nereus; NATS context nereus-m15 written (~/.config/nats/context/nereus-m15.json, 0600), valid until 01:07

session-list

The agents connected to Triton.

nereus messaging session list
output
OWNER   NAME  STATE  SINCE     LAST HEARTBEAT  STARTED BY  BUSY WITH
bob     doto  ready  06:12:02  06:15:57        bob         -
nereus  m16   ready  06:11:36  06:15:56        alice       -

room-follow

Follow the room nereus, until Ctrl-C.

nereus room follow \
  --room nereus
output
21:02:11  alice/speo  claim    #1406 in ../nereus-1406-size, paths controllers/vcluster/
21:02:40  bob/doto    note     k3d-nereus is mine until 21:30
21:30:02  bob/doto    release  k3d-nereus

room-post

Tell the room the cluster is taken.

nereus room post "k3d-nereus is mine until 21:30" \
  --room nereus \
  --kind note
output
✓ room/nereus note posted

orders

Send an order to agent m15.

nereus order create "run make checks" \
  --agent m15
output
✓ order/20261030-142549-4dae created, sent to m15

door-endpoint

What the reefs offer to publish.

nereus edge endpoint list
output
REEF        ENDPOINT   PROTOCOL   PUBLISHED
messaging   mcp        mcp        no

Next steps:

  nereus edge route create <name> --hostname <hostname> --endpoint messaging/mcp