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:label-printer with a command print_label becomes the tool:
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.- Good Descriptions
- Bad Descriptions
- 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:Offline Devices
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

