Skip to main content
Back to LearnTuyaOpen IDE · Practice 2

your_chat_bot — cloud AI Agent

Build the classic AI + IoT project end-to-end: create from an example, build and flash, authorize, and pair — the cloud IoT / AI Agent flow in the IDE.

Intermediate20 minIDE

This is the classic TuyaOpen AI + IoT project. The focus here is the cloud IoT / AI Agent development flow inside the IDE.

Two development modes

ModeSuited forSteps
Basic (recommended for beginners)New to TuyaOpen or AIUse the official default PID directly (feature and agent configuration already done).
AdvancedBuilding your own product1. Create a PID · 2. Create an Agent · 3. Bind the Agent to the PID.

This practice uses Basic mode — fast for beginners and a real taste of three-ends-in-one.

Step 1: Create a project from an example

  1. Click Examples in the IDE toolbar, choose AI voice chatbot, and click Create project.

  2. Select Tuya T5AI and the Tuya T5AI-Board, plus the 3.5-inch LCD touch screen (optional).

    Examples gallery — AI voice chatbot

  3. Follow the prompt to grab the OEM example PID. This opens the Tuya Developer Platform in your browser. For what a PID is, see PID.

    OEM example PID — jump to the developer platform

  4. Click Copy product, fill in a product name and model number, and confirm.

    Copy product dialog

  5. Click to enter the development flow.

    Enter the development flow

    Development flow detail

  6. Copy the PID in the top left.

    Copy the PID from the product

  7. Back in TuyaOpen IDE, paste the PID and click Next to create the project.

    Paste the PID and create the project in the IDE

Why copy? Copying quickly produces a product with the same features as the default PID. For AI + IoT products it also copies the Agent already bound to that product.

Step 2: Build and flash

  1. In Cloud IoT / Agent development you can see that the cloud product is now bound.

    Cloud IoT / Agent page — product bound

  2. Open Project Details and build and flash. At the bottom of the page you can see the Vibe Coding hardware view and all pin states.

    Project Details — Vibe Coding hardware view

  3. After flashing succeeds, the touch screen lights up.

Step 3: Authorize the device

The license key (UUID + AuthKey) is the credential a device uses to reach the cloud, obtained from the Tuya IoT Platform.

  1. For the concept of license keys and how to get them, see TuyaOpen license keys and the authorization guide. For this practice, claim two free license keys first. Back on the Tuya Developer Platform, open AI Products → Product Development to see the OEM example product from step 1.

    OEM example product in the developer platform

  2. Click Continue development on the right.

    Continue development on the platform

  3. Under 03 Hardware development, in the selected cloud-access hardware section, click Claim 2 free license keys.

    Claim free license keys

    License keys claimed

    License key list detail

  4. Download the license key list.

    Download the license key list

  5. Enter the license keys into the TuyaOpen IDE license key manager.

    IDE license key manager

  6. Use AI to write the license key to the device.

    AI writes the license key to the device

Step 4: Pair the device

  1. Follow the official device network configuration steps to pair the device.

  2. Once paired, you can switch the AI Agent you talk to from the mini-app panel.

    Switch AI Agent from the mini-app panel

  3. Double-tap the board KEY button to switch conversation mode. The current project supports the wake words "你好涂鸦" / "Hey Tuya".

Going further — building your own Agent (Advanced mode): see the Agent Development Guide.

Next step

You have a cloud-connected device. Continue with Practice 3: mini-app panel — build the phone control panel for it.