Overview
The AI Agent SDK allows developers to quickly integrate AI conversation functionality into their own mini-programs, enabling developers to focus on implementing their business logic without wasting time on technical details.
Use the SmartLife App (version 6.0.0 and above) to scan the QR code below to experience the AI conversation functionality:
![]()
Quick Start
Version Notice
⚠️ Important Notice: @ray-js/t-agent-plugin-assistant has been deprecated, please use @ray-js/t-agent-plugin-aistream instead.
Install Dependencies
Add the following dependencies to your project's package.json:
Ensure that
@ray-js/t-agent,@ray-js/t-agent-plugin-aistream, and@ray-js/t-agent-ui-rayversions are consistent.
Run yarn install to install the dependencies.
Mini-Program Kit Requirements
Basic Example
Here is a minimal code example for integrating an AI conversation interface in a mini-program:
Replace
[your_agent_id]with your Agent ID, which can be obtained from the Tuya AI Tuya Developer Platform.
Advanced Configuration
Custom History Message Size
For more detailed instructions and advanced usage, please refer to the T-Agent SDK Development Guide.