Skip to main content

Tool Naming Convention

When a device connects with a list of commands, the agent runtime creates a tool for each command. The tool name follows this pattern:
For example, a device named label-printer with a command print_label becomes the tool:
The agent sees this tool alongside its regular skill tools and can invoke it in exactly the same way.

Auto-Generated Tools

The agent runtime automatically generates each device tool with: No lua push or lua deploy is needed. The tools appear the moment the device connects and disappear when it disconnects.

Tips for Good Descriptions

The description field is what the AI agent reads to decide whether to use the tool. Better descriptions lead to better tool selection.
These descriptions tell the agent:
  • What the command does
  • What it needs as input
  • What it returns
  • How long it takes (if relevant)

Persona Tips

Your agent persona can reference devices to guide tool usage. Add instructions in your persona about when and how to use device tools:

Example Conversation

Here is what a conversation looks like when an agent uses device tools:

Multiple Devices

An agent can have many devices connected at once. The device name in the tool name disambiguates them:
The agent picks the right device based on the user’s request and the tool descriptions.

Offline Devices

When a device disconnects, its tools are removed from the agent’s tool list. The agent will not be able to use commands from an offline device. If a user asks for something that requires an offline device, the agent should explain that the device is unavailable.
Design your persona to handle this gracefully. The agent does not know about devices that were previously connected but are now offline — it only sees currently connected devices.

Next Steps

Self-Describing Commands

Detailed reference for DeviceCommandDefinition

Triggers

The other direction — devices sending events to the agent

Quickstart

See device tools in action

Examples

Full working examples with multiple devices