Create AI Agent with Home Device Control

Last Updated on : 2025-07-30 07:30:21download

Tuya offers a comprehensive home control solution that supports multi-device connectivity and automation rule configuration. This topic describes how to create a home device control AI Agent on the Tuya Developer Platform, enabling intelligent control of smart home devices.

Overview

What is a home device control AI agent?

A home device control AI agent is a system that uses large AI models to remotely or automatically control home devices, such as lights, air conditioners, and curtains. The agent can operate devices via mobile apps or voice assistants, making people’s lives more convenient.

Objectives

By following this guide, you will learn how to:

  • Create an AI agent with home device control capabilities.
  • Bind a specific product ID (PID) with the AI agent.

For more information about AI agent development, see AI Agent Development.

Step 1: Create an AI agent

Go to AI Agent Dev Platform

  1. Register and log in to the Tuya Developer Platform.
  2. Go to AI Agent Dev Platform.

Create an AI thermostat agent

  1. Click Create Agent.

    Create AI Agent with Home Device Control

  2. Configure the agent information and click OK.

    Create AI Agent with Home Device Control

Develop the agent

  1. In the section 01 Model Configuration, select the AI model, plugin (select Device Control > Device Control Skills > Smart Home Device Control Tool), max context messages, audio, and dialog style.

    Create AI Agent with Home Device Control

  2. Develop a prompt.

    Create AI Agent with Home Device Control

Prompt template

  • Prioritize using {tools} and select the most suitable function and parameters. In device control scenarios, query device parameters and make sure they are fully matched. Then, commands can be sent.
  • Strictly adhere to function and parameter descriptions when calling {tools}.
  • Parameters:
    • Device name: {{names}}
    • Category: {{categories}}
    • Attribute: {{attributes}}
    • Room: {{rooms}}
    • Scene name: {{sceneNames}}
    • Latitude: {{latitude}}
    • Longitude: {{longitude}}
    • Current time: {{currentTime}}
  • Always use {{names}} for device control. Do not include room names in device names.

Step 2: Release the AI agent

  1. Click Release on the top right corner and deploy a version to the China Data Center.

    Create AI Agent with Home Device Control

  2. Switch to the Western America Data Center and release a version.

    Create AI Agent with Home Device Control

  3. Switch to the Central Europe Data Center and release a version.

    Create AI Agent with Home Device Control

  4. In the Operation columm, choose > Publish to publish the agent.

    Create AI Agent with Home Device Control

The agent can only be released after it is deployed in three data centers: China, Western America, and Central Europe.

Step 3: Link PID with the agent

Follow the steps below to link the specified PID with the agent.

Create AI Agent with Home Device Control

Create AI Agent with Home Device Control

Conclusion

You have now successfully created a Tuya-enabled home device control AI agent.

Hope this tutorial has been helpful to you. If you have any questions, please feel free to contact us.