Expand description
Well-known MQTT topic constants and builder helpers.
All AgentFlow topics follow one of two patterns:
agents/{agent_id}/{event}— per-actor eventssystem/{event}— system-wide broadcasts
Use the builder functions to avoid string formatting errors in call sites.
Constants§
- AGENTS_
ALL - Subscribe to all agent events (wildcard).
- IO_CHAT
io/chat— inbound messages from the UI gateway.- SYSTEM_
HEALTH - System-wide health topic.
- SYSTEM_
LLM_ ERROR - LLM provider error broadcast (published by LlmAgent / MainActor on API failure).
Payload:
{ provider, model, error, consecutiveErrors, timestampMs } - SYSTEM_
LLM_ SWITCH - LLM provider switch command (published by WIK agent to trigger hot-swap).
Payload:
{ provider, model, apiKey?, baseUrl?, reason } - SYSTEM_
SHUTDOWN - System-wide shutdown topic.
Functions§
- alert
agents/{id}/alert- chat
agents/{id}/chat— direct chat messages to/from an agent.- commands
agents/{id}/commands— topic on which the agent listens for commands.- detections
agents/{id}/detections— ML/monitoring agents publish detections here.- heartbeat
agents/{id}/heartbeat- logs
agents/{id}/logs- parse_
agent_ topic - Extract
(agent_id, event)from anagents/{id}/{event}topic. - result
agents/{id}/result— agent publishes task results here.- spawn
agents/{id}/spawn— agent announces its presence on startup.- status
agents/{id}/status