The demo we'll introduce in Episode 3 uses NVIDIA NemoClaw to observe data transmitted from a microcontroller board equipped with temperature, humidity, and pressure sensors. Data acquisition is performed at regular intervals using the AI agent's Cron function.
System configuration
Sensor data is transmitted from the microcontroller board via BLE UART. Since NemoClaw does not have a BLE UART interface, a sensor data server, which is a REST API endpoint, is set up, and NemoClaw retrieves data from that server.
|
module |
role |
|
Raspberry Pi Pico 2 WH |
Source of sensor data |
|
Sensor data server |
API endpoint for exposing sensor data |
|
vLLM server |
Running Local LLM |
|
NemoClaw |
Actions based on the central AI agent, SKILL.md. |
|
Discord |
User notification channels |
Sensor data server
We created a sensor data server that publishes sensor data received via BLE UART using a REST API, and NemoClaw retrieves data from this server. Although the API is specific to this demo, it was easily implemented using FastAPI. The image below shows the created API displayed using Swagger UI.
Network Policy
The network policy for NemoClaw 's AI agent to access the sensor data server is as follows:
preset: name: sensor-api description: "Sensor API" network_policies: sensor_api: name: sensor_api endpoints: - host: xx.xx.xx.xx # 実際のIPアドレスを記載する port: 8100 protocol: rest enforcement: enforce rules: - allow: { method: GET, path: "/" } - allow: { method: GET, path: "/status" } - allow: { method: GET, path: "/sensor/latest" } - allow: { method: GET, path: "/sensor/history" } - allow: { method: GET, path: "/ble/scan" } - allow: { method: POST, path: "/ble/connect" } - allow: { method: POST, path: "/ble/disconnect" } binaries: - { path: /usr/bin/curl } - { path: /usr/local/bin/node }
Agent skills
The method for using the sensor data server is described in a format compliant with Agent Skills and installed using the `nemoclaw sandbox skill install` command. This agent skill allows the AI agent to understand how to acquire sensor data without prompting.
Example conversation with an AI agent
The following is an example of a request to an AI agent to read sensor data. "BME688" is the model name of the sensor device.
Example of a Cron job
The following is an example of using a Cron job to periodically monitor sensor data.
Prompt: "Refer to the bme688-sensor-api SKILL to monitor for any changes in the data output from the BME688 sensor."
Inquiry
In Episode 3, we explained how to periodically acquire temperature, humidity, and pressure sensor data and observe it using NemoClaw.
In Episode 4, we will explain how to use an acceleration unit (IMU) to detect changes in activity and notify an AI agent in real time.