The NATS Message Bus
NATS is the central nervous system of OneMind OS. Every agent, sensor, camera, robot, app, and dashboard communicates through it. Publish once. Every subscriber gets it. No REST APIs. No polling. No webhooks.
How NATS Powers OneMind
📡 Pub-Sub Core
Subject-based addressing. agents.prompt.hermes.zeus.legacy — publish a prompt, Legacy responds. fabric.sensor.temperature.* — every temp sensor publishes here. No service discovery. No load balancers. Pure subject routing.
💾 JetStream Persistence
Streams capture every message. Replay any time window. The audit trail is built in. sensor-readings stream keeps 30 days of all sensor data. agent-responses stream stores every AI answer forever.
🌐 Leaf Nodes
Extend the bus to edge locations. A Raspberry Pi in the greenhouse becomes a leaf node. Messages flow transparently between the hub and the leaf. The edge is first-class.
🔌 MQTT Bridge
IoT devices speak MQTT. NATS bridges it transparently. An ESP32 publishing to greenhouse/soil becomes fabric.sensor.greenhouse.soil on the bus. No protocol translation layer needed.
🔐 Multi-Tenant Security
NATS accounts: SYS, CORE, FABRIC, INTERFACE. Each account has its own subject space, imports/exports, and auth. Agents can't read user data. Sensors can't publish to agent subjects.
📊 Observable
NATS Dashboard at :5173. AgentTap TUI. Every message, every connection, every stream — visible in real time. The bus is transparent by design.
Subject Map (Core Subjects)
| Subject Pattern | Purpose | Account |
|---|---|---|
| agents.prompt.* | AI agent tasking + responses | CORE |
| fabric.sensor.* | All sensor telemetry | FABRIC |
| fabric.robot.* | Drone/robot telemetry + commands | FABRIC |
| fabric.camera.* | Camera detections + snapshots | FABRIC |
| tak.cot.* | TAK Cursor-on-Target events | INTERFACE |
| tak.mission.* | TAK mission data | INTERFACE |
| om.task.* | Task engine — work queue | CORE |
| om.presence.* | Voice bridge + user presence | CORE |