📡 New Lane

Devices & Ecosystems

An agent embedded in hardware doesn't just execute tasks — it builds a causal model of its physical environment. Sensors are signals. States accumulate. Patterns emerge. And humans can audit, correct, and extend what the device has learned, in plain language, any time.

Device agent does
Learns its environment. Ingests sensor readings as signals, builds state models, detects patterns, raises anomalies — autonomously.
Human does
Provides context & intent. Why a reading was unusual. What a state change means. What the device should prioritize. A chat away, always.
🔭

This lane is forward-looking. The core tools work today. The full on-device deployment vision — agents that learn locally on embedded hardware with world models syncing to the edge — is in active development. Build with this in mind.

Overview

Traditional IoT architectures push data to the cloud and pull decisions back down. An agent with a persistent world model changes this: the intelligence lives on the device, the model accumulates locally, and humans interact with it in natural language — without querying dashboards or writing SQL.

Every sensor reading is a potential signal. Every state change is an event. Every recurring behavior is a pattern. Nervous Machine gives your device agent the scaffolding to learn from its environment, accumulate this knowledge over time, and act on it with growing confidence.

The Device Model

A device world model captures the physical environment the device operates in — not just what the device measures, but what those measurements mean.

WhatSignal typeExample
Sensor baselinesmetricAmbient temp normal range: 18–24°C
Current device statestateHVAC: cooling / idle / fault
Recurring behaviorspatternTemp spikes 2°C every weekday at 9am
Environmental claimsclaimRoom B air quality degrades when west window is open
Incidents & anomalieseventPower spike on 2025-11-03, cause: unknown
Connected devicesentitySensor-node-4, gateway-main, thermostat-A

Sensors as Signals

Each sensor reading can be saved as a metric event. Over time, the world model builds a statistical baseline for each sensor — and deviations from that baseline become meaningful signals in themselves.

Save a sensor reading
await call_tool("save_event", { "user_id": "device-pod-floor2", "key": "ambient-temperature", "signal_type": "metric", "value": 0.74, # normalized: 0=min, 1=max of expected range "certainty": 0.9, # sensor is reliable "gloss": "22.1°C — within normal range", "validation_type": "direct", # sensor is ground truth "meta": { "raw_value": 22.1, "unit": "celsius", "sensor_id": "temp-sensor-4", "timestamp": "2025-11-15T09:00:00Z" } })

Normalize sensor values to 0–1. Map the expected range of a sensor to [0, 1]. A temperature sensor that normally reads 18–24°C would map 22°C to ~0.67. This lets the world model compare signals across different sensor types on a common scale.

States & Patterns

Current state

Use state events to track what mode or condition the device or system is currently in. Update these as transitions occur — the world model accumulates a history of state changes over time.

Track device state
await call_tool("save_event", { "user_id": "device-pod-floor2", "key": "hvac-state", "signal_type": "state", "value": 0.8, # 0=off, 0.5=idle, 1=active/fault "certainty": 0.95, "gloss": "HVAC: cooling mode, running normally", "meta": { "mode": "cooling", "set_point": 21 } })

Patterns

When the agent detects a recurring behavior — confirmed across multiple observations — save it as a pattern event. Patterns let the agent anticipate and act pre-emptively.

Save a detected pattern
await call_tool("save_event", { "user_id": "device-pod-floor2", "key": "morning-temp-spike", "signal_type": "pattern", "value": 0.75, # strength of pattern "certainty": 0.65, # still building confidence "gloss": "Temperature rises ~2°C on weekday mornings around 9am. Likely occupancy-driven.", "meta": { "observed_n": 12, "hypothesis": "office occupancy", "suggested_action": "Pre-cool to 20°C by 8:45am on weekdays" } })

Anomaly Detection

When a sensor reading significantly deviates from the established baseline, save it as an event with low certainty (cause unknown) and flag it for human review via a curiosity trigger.

Save an anomaly
# Sensor read 31°C — well outside normal 18–24°C range await call_tool("save_event", { "user_id": "device-pod-floor2", "key": "temp-anomaly-2025-11-15", "signal_type": "event", "value": 1.0, "certainty": 0.2, # cause uncertain — needs human input "gloss": "Temperature spike to 31°C at 14:22 UTC. No known cause. HVAC was in cooling mode.", "meta": { "raw_value": 31.0, "expected_range": [18, 24], "hvac_state": "cooling", "flagged_for_review": True } })

Human Alignment

Devices observe physical reality — but humans provide intent, context, and causality that no sensor can supply. Why was the window left open? Was the spike a test or a fault? What should the device prioritize when it conflicts?

Explaining an anomaly
That temperature spike on the 15th — that was us running a heat test in Room B. Please update the device world model to note the cause and mark it as expected.
Adding environmental context
Please save to the floor 2 world model that the west-facing sensors always read 1–2°C high in afternoon sunlight. That's structural, not an anomaly.
Setting device intent
I want the floor 2 agent to prioritize air quality over temperature comfort between 8am and 6pm on weekdays. Please save that as a preference.

Ecosystem Context

Devices don't operate in isolation. Use link_events to connect related signals across your device ecosystem — a temperature anomaly linked to a power spike, a state change linked to a known pattern.

Link a power spike to an anomaly
await call_tool("link_events", { "user_id": "device-pod-floor2", "source_key": "temp-anomaly-2025-11-15", "source_signal_type": "event", "target_key": "power-spike-2025-11-15", "target_signal_type": "event", "relationship": "RELATED_TO", "note": "Both anomalies occurred within 2 minutes. Possible causal link." })

Signal Types Used in This Lane

SignalUse case
metricSensor readings, environmental measurements
stateDevice mode, operational status, phase
patternRecurring behaviors, environmental cycles
eventAnomalies, incidents, state transitions
claimEnvironmental rules, structural constraints
entitySensors, gateways, connected devices
preferenceDevice priorities, human-set intent