面向边缘硬件(SoC/MCU)的 Claw
[!WARNING] ** Under Active Development** — This project is in heavy development and things will break. Running it now may spoil the experience we're building for you. Please visit or open Issues if you encounter any problem.
Ducky — TuyaOpen's hardware mascot — runs the Claw on every board. (Formerly known as DuckyClaw.)
TClaw is a hardware-oriented AI agent built on the TuyaOpen C SDK. It runs a Claw-style agent loop on edge devices (Tuya T5AI, ESP32, Raspberry Pi, Linux) that communicates with users via IM channels (Telegram, Discord, Feishu, WeChat, QQ Bot) and executes MCP-style tools directly on the device.
| Category | Models/Platforms |
|---|---|
| MCUs | Tuya T5AI Module (ATK, Waveshare, variants), ESP32-S3 |
| SoCs | Raspberry Pi 4/5/CM4/CM5, DshanPi, Linux ARM SoCs (Qualcomm/Rockchip/Allwinner etc.) |
| PCs | Linux Ubuntu (x64) |
This project is built on top of the TuyaOpen C SDK, which offers flexible cross ARM Cortex-M and ARM Cortex-A, and even x64 PC deployments. It also offers a wide variety of ready-to-use hardware drivers and APIs, making integrating new hardware and peripherals as easy as building blocks (sensors, displays, speaker-mic audio, cameras, IoT cloud integrations).
Most AI agent frameworks are powerful but cumbersome. They often come with costly subscriptions, complicated setups, and are layered on top of other frameworks and APIs. TClaw offers a different path.
Built on a commercial-grade device–cloud AI agent foundation, TClaw uniquely fuses on-device agents with the power of the cloud.
With a single TuyaOpen Key, you gain seamless access to the Tuya Cloud Platform and its next-generation device–cloud AI agents.
It's lightweight and effortlessly deployable to almost any edge hardware — from WiFi-connected MCUs to ARM SoCs to PC Ubuntu.
| TClaw | OpenClaw / MimiClaw / others | |
|---|---|---|
| Architecture | Hardware-oriented Claw agent on TuyaOpen C SDK; device–cloud fusion | OpenClaw: Node.js, 24/7 desktop/server agent. MimiClaw: bare-metal C on ESP32-S3 only. Others: framework stacks (Pi, Claude Code, etc.) |
| Deployment | MCUs (Tuya T5AI, ESP32-S3), SoCs (RPi 4/5, ARM Linux), PC (Ubuntu x64); one codebase | OpenClaw: Mac mini, Pi, VPS. MimiClaw: single $5 ESP32-S3. Others: server/desktop only, no edge MCU |
| Runtime | TuyaOpen C; ARM Cortex-M, Cortex-A, x64; no Node on MCU | OpenClaw: Node.js. MimiClaw: no OS, no Node. Others: Node.js 22+, pnpm, full OS |
| Device–cloud | One TuyaOpen key → Tuya Cloud Platform + device; built-in device-cloud AI | OpenClaw: self-hosted, optional API subs. MimiClaw: local-only. Others: cloud-only or DIY |
| Channels | Telegram, Discord, Feishu, WeChat (iLink), QQ Bot — unified via message bus + TLS proxy | OpenClaw: WhatsApp, Telegram, Discord, iMessage, Slack, etc. MimiClaw: Telegram, WebSocket, serial CLI |
| Memory | MEMORY.md + daily notes (YYYY-MM-DD.md); session manager (JSONL); persistent across reboots | OpenClaw: 24/7 persistent context, Obsidian/Raycast. MimiClaw: on-device MEMORY.md. Others: flat conversation history |
| MCP Tools | CRON, FILE, EXEC (RPi/Linux), HW (GPIO/I2C/PWM), Lua scripting, OpenClaw gateway ctrl | OpenClaw: browser automation, cron, ClawHub skills. MimiClaw: ReAct + web search, time, OTA, GPIO. Others: ad-hoc or single provider |
| ✨ Setup | Single TuyaOpen key; pick board config, configure IM tokens | OpenClaw: Gateway, OAuth, multi-step. MimiClaw: flash firmware, API keys. Others: complex onboarding |
| ✨ Cost | Low cost; unified key access to services | OpenClaw/MimiClaw: bring your own Claude/OpenAI. Others: Claude Pro/Max ($20–200/mo) or API-heavy |
| ✨ IoT Control | Native device and IoT control via Tuya ecosystem | ❌ (typically no built-in device control) |
| ✨ Voice (ASR) | Hardware voice input (ASR) supported on select boards | ❌ (voice input not natively supported) |
| ✨ Lua Scripting | Sandboxed Lua 5.5 runtime with GPIO/delay modules; write agent skills in Lua | ❌ |
Ducky is TuyaOpen's hardware mascot — a duck that thrives in any environment, from the tiniest MCU to a full desktop Linux box. TClaw inherits that spirit: one codebase, every board, zero compromise.
The name tells the whole story. T stands for TuyaOpen — the foundation, the commercial-grade C SDK that bridges chip-level hardware, IoT cloud, and AI in a single unified key. Claw is the agent paradigm — the loop of reasoning, tool use, and action borrowed from OpenClaw, adapted for the physical world. Add Ducky, and you get an always-on hardware companion that gets smarter the more you use it.
Why a duck and a claw? Ducks are omnipresent, adaptable, and thrive in almost any environment — just like TClaw's software, which you can deploy from microcontrollers to desktop Linux. The "claw" symbolizes precision, dexterity, and direct command over both your real-world devices and digital agents. With TuyaOpen, hardware integration is much more flexible, allowing you to easily connect a wide range of hardware features and capabilities directly into your agent.
5 IM Channels: Telegram, Discord, Feishu, WeChat (iLink), and QQ Bot — all through a unified message bus and TLS HTTP proxy, no channel-specific code in the agent loop.
Device–Cloud Hybrid AI Agent: Centralized AI agent powered by TuyaOpen, enabling both on-device and cloud-based actions with the Claw mechanism (outer loop for messages, inner tool loop up to 10 iterations).
6 MCP-Style Device Tools:
Persistent Memory:
Long-term memory in MEMORY.md, daily notes in YYYY-MM-DD.md, personality in SOUL.md, user profile in USER.md — all stored on flash/SD and loaded each turn.
Session Manager: JSONL-based session persistence across reboots. Picks up conversations where they left off.
Skills System:
Agent skills are .md files in skills/. The agent reads a summary each turn and loads full skill files on demand via the read_file tool.
Build-Time Overlay:
overlay/ai_components/ surgically patches ai_agent and ai_mcp without modifying the TuyaOpen SDK submodule — keeping upstream clean.
PSRAM Support:
claw_malloc/claw_free wrappers automatically route allocations to external PSRAM when available, enabling large context buffers on T5AI boards.
Hardware Voice ASR: Audio input with Automatic Speech Recognition supported on select T5AI boards with microphone hardware.
SD Card & Filesystem: Persistent storage for memory, skills, sessions, and agent-generated files.
Local CLI: Serial/local CLI for setup and debugging without IM connectivity.
The TClaw architecture combines local device agents and cloud agents under a unified system. At its core, it uses the TuyaOpen AI-Agent framework to handle messaging, automation, and control. Local hardware (Raspberry Pi, ESP32, T5AI, or Linux) runs a Claw-style agent loop, communicating with users via IM channels and executing MCP tools directly on-device.
Agent loop flow:
message_bus_pop_inbound() — waits for any IM messageTwo ways in. Flash a prebuilt firmware if you just want a working device — no toolchain, no build. Build from source if you want to change the code.
No toolchain required. Full walkthrough with per-board asset names, GUI steps and the complete command reference: Flash a Prebuilt Firmware.
1. Download the image for your board from the
Releases page —
assets are named TClaw__QIO_.bin, and QIO is a full flash
image that works on a blank board.
2. Get your Tuya credentials — you need three values:
3. Flash with the tyutool desktop app:
put the board into download mode, then on the Firmware Flash page pick the
serial port, confirm the auto-filled chip (t5ai or esp32s3), select the
.bin, and click Flash.
4. Configure over the serial console at 115200 baud — released builds ship without credentials. tyutool's Serial Debug page works as the terminal:
cfg_set_product_id
cfg_set_auth
cfg_set_channel_mode telegram # telegram | discord | feishu | weixin | qqbot | OFF
cfg_set_tg_token
cfg_show # check what is in effect, then reboothelp lists the rest of the cfg_* commands. Settings live in the device's KV
store and take effect after a reconnect or reboot.
Raspberry Pi 5 and DshanPi A1 are Linux targets — they run a native binary rather than flashed firmware. Follow the Raspberry Pi guide instead.
git clone https://github.com/tuya/TClaw.git
cd TClaw
git submodule update --initcp include/tuya_app_config_secrets.h.example include/tuya_app_c暂无开放 Issues,或尚未同步最近议题。