English | 简体中文
TuyaOpen Core is a C SDK library for adding Tuya Cloud capabilities to an existing device project while keeping its OS and vendor SDK, connected through a thin platform adapter. The full TuyaOpen framework provides a broader ready-to-build environment for new products.
| API | What it provides |
|---|---|
| IoT | Device activation, authentication, data points, cloud control and OTA. |
| AI Agent | Cloud voice and text conversations, with optional MCP capabilities. |
| P2P | Peer-to-peer audio and video, with optional local storage. |
The application uses the capabilities it needs. Tuya Cloud connectivity and platform services are provided through the core and a platform adapter.
flowchart TB
App[Device application] --> Core[TuyaOpen Core]
Core --> IoT[IoT]
Core --> AI[AI Agent]
Core --> P2P[P2P]
IoT --> Cloud[Tuya Cloud]
AI --> Cloud
P2P --> Cloud
Core --> Port[Platform adapter]
Port --> OS[Existing OS / vendor SDK]
| Platform | Status in this repository |
|---|---|
| Linux / POSIX | Port implementation in port/linux. |
| ESP-IDF | Port implementation in port/esp-idf. |
| TuyaOpen / TuyaOS | Shared contracts and an operations adapter in port/tuyaopen. |
| Other platforms | Add a port by implementing the platform contracts. |
Clone the repository and initialize its submodules:
git clone https://github.com/tuya/tuyaopen-core.git tuyaopen-core
cd tuyaopen-core
git submodule update --init --recursiveThen follow the guide for your platform or integration:
- Quick start on Linux
- Quick start on ESP-IDF
- Add Core to an existing project
- Port to another platform
Explore the Linux examples and their documentation:
Overview · IoT · AI Agent · P2P
tuyaopen-core/
├── agent-core/ # AI Agent conversation services and MCP support.
├── iot-core/ # Cloud connectivity, device management and IoT services.
├── p2p-core/ # P2P audio/video and media services.
├── examples/ # Example applications.
│ └── linux/ # Linux example projects.
│ ├── iot_demo/ # IoT device connectivity to Tuya Cloud.
│ ├── agent_demo/ # AI conversations.
│ ├── p2p_demo/ # P2P audio and video.
│ └── components/ # Shared example components.
├── port/ # Platform adapters and operation contracts.
│ ├── linux/ # Linux/POSIX platform adapter.
│ ├── esp-idf/ # ESP-IDF/FreeRTOS platform adapter.
│ └── tuyaopen/ # TuyaOpen operations adapter and shared contracts.
├── third_party/ # External library submodules.
├── cmake/ # CMake build options.
├── CMakeLists.txt # ESP-IDF component entry point.
├── tuyaopen-core.cmake # Plain CMake integration entry point.
├── Kconfig # Unified feature configuration entry point.
└── Kconfig.projbuild # ESP-IDF menu configuration entry point.
Browse the TuyaOpen Core documentation, ask questions on the TuyaOpen forum, or join the TuyaOpen Discord.
Report issues and contribute through the GitHub repository.