Skip to content

tuya/DuckyClaw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DuckyClaw: Hardware-Driven OpenClaw Project

DuckyClaw is a hardware oriented version of the OpenClaw. The Ideas is to explore the physical hardware with the powerful concept of OpenClaw agents.

Deployable to Hardware

Category Models/Platforms
MCUs - Tuya T5AI Module
- ESP32s
SoCs - Raspberry Pi 4/5/CM4/CM5
- Linux ARM SoCs (Qualcomm/Rockchip/Allwinner etc...)
PCs - Linux Ubuntu

This project is build on top of the the TuyaOpen C SDK, which offers flexable cross ARM Cortex-M and ARM Cortex-A, and event x64 PC deployments. And also offers wide varierity ready-to-use hardware drivers and API. Makeing integreating new hardware and peferials as easy as building blocks. (Sensors, Displays, Speaker-Mic Audio, Cameras, to IoT cloud integreations)

GitHub Repo Banner

Your autonomous AI companion. Simplify Hardware Integration, Unlock Infinite Control Possibilities

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 encountered any problem.

❓ Why DuckyClaw?

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. DuckyClaw offers a different path.

Built on a commercial-grade device–cloud AI agent foundation, DuckyClaw 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 System on Chip ARM, to PC Ubuntus.

DuckyClaw 🐜 OpenClaw / MimiClaw / others
Architecture Hardware-oriented OpenClaw 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, ESP32s), SoCs (RPi 4/5, ARM Linux), PC (Ubuntu); one codebase OpenClaw: Mac mini, Pi, VPS. MimiClaw: single $5 ESP32-S3. Others: server/desktop only, no edge MCU
Runtime TuyaOpen C; cross ARM Cortex-M, ARM 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 (SOUL.md, USER.md, MEMORY.md). Others: cloud-only or DIY
Channels Telegram, Discord, Feishu via unified IM component (message bus, proxy, TLS) OpenClaw: WhatsApp, Telegram, Discord, iMessage, Slack, etc. MimiClaw: Telegram, WebSocket, serial CLI. Others: terminal or separate UI
Memory MEMORY.md + daily notes (YYYY-MM-DD.md); session manager; ported from MimiClaw-style store OpenClaw: 24/7 persistent context, Obsidian/Raycast. MimiClaw: on-device MEMORY.md. Others: flat conversation history
Tools CRON, FILE, IoT device control (Tuya); EXEC (RPi) planned; MCP-style device tools 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 (T5AI/ESP32/RPi/Linux), configure IM tokens OpenClaw: Gateway, OAuth, multi-step. MimiClaw: flash firmware, API keys. Others: complex onboarding, many deps
✨ 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
✨ Device IoT Control Native device and IoT control, controlling other device in the ecosystem (over TuyaOpen/embedded protocols) ❌ (typically no built-in device control)
✨ Voice (ASR) Input Hardware voice input (ASR) supported on select boards ❌ (voice input not natively supported)

πŸ’‘ Philosophy

DuckyClaw is inspired by the vision of making personal AI accessible, practical, and genuinely helpfulβ€”rooted not in corporate tools, but in the idea of an always-there companion that intuitively fits into your daily life and hardware. The project’s name and mascot of Cute Duck from Tuya, embrace the spirit of resourceful, adaptive creatures of Claw.

Why a duck and a claw? Ducks are omnipresent, adaptable, and thrive in almost any environmentβ€”just like DuckyClaw’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. This project isn’t about replacing peopleβ€”it’s about building a dependable, always-learning, always-improving companion you fully control with real-life hardware interfaces.

Core Principles

  • Personal-first, not enterprise. DuckyClaw is made for individuals and makers. Your workflows and day-to-day life come first, no bureaucracy or corporate bloat.
  • Lean core, plugin power. Everything outside the essential C coreβ€”channels, providers, toolsβ€”is a plugin you can swap and extend.
  • Self-tuning and adaptive. Learns via real episode memory and periodic self-review, with memory fading that helps it stay relevant.
  • IoT control memory. DuckyClaw remembers device states, actions, and preferences as part of IoT_MEMORY.md, allowing it to build a rich contextual history of your devices and interactions. Of how you control other devices in the Tuya ecosystem. This lets the agent adapt to your automation routines, device quirks, and personal preferences over timeβ€”enabling smarter, more intuitive IoT control that gets better the more you use it.
  • Config by conversation. No thick config files: set up and modify your agent simply by chatting, both on hardware and in the cloud.
  • Distinctive personality. Each instance has its own configuration and optional Hardware layer for characterful, helpful responses.
  • Builds natively on C/TuyaOpen. No Node, no Python frameworks glued on. Built from scratch for the boards and platforms you actually use.
  • Rapid to start. Requires just a TuyaOpen key. Choose models and providers as neededβ€”switch between them with the messaging interface anytime.
  • Unified model access. With a single TuyaOpen API Access Key, you can tap into the latest models from GPT, Claude, Deepseek, Qwen, and moreβ€”choose the best model for each task, all seamlessly hosted and managed by Tuya.
  • Device and Cloud AI Agents. DuckyClaw is natively built to support both agents that run locally on your device (β€œdevice agents”) and those that operate in Claw like manner the cloud (β€œcloud agents”). This hybrid architecture enables on-device actions, voice, and IoT control while also providing access to advanced cloud intelligence, remote coordination, and online skills, MCPs. You can configure, blend, or move workloads fluidly between device and cloudβ€”giving you the flexibility to optimize for speed, privacy, and power as you choose.

✨ Features

  • Unified Messaging Input:
    Seamless integration with WhatsApp, Telegram, Feishu, and more through a unified proxy IM interface.

  • Device–Cloud Hybrid AI Agent:
    Centralized AI agent powered by TuyaOpen, enabling both on-device and cloud-based actions with the Claw mechanism.

  • IoT Device Control:
    Native control and management of Tuya IoT smart devices directly from the agent.

  • Music Playback & Audio Features:
    Built-in music player.

  • Hardware Voice ASR Audio input with Automatic Speech Recognition (ASR)

  • MCP Device Tools:

    • CRON Tool MCP: Scheduled device tasks and heartbeating.
    • FILE Tool MCP: File operations and management on supported devices.
    • IoT Device Control Tool MCP: Advanced management for Tuya-connected devices.
    • EXEC Tool MCP: Remote code execution/injection on Raspberry Pi
  • Additional Capabilities:

    • SD Card storage support
    • Persistent memory via local Agent.txt and memory.txt
    • Flexible Gateway switching for device/cloud agent handoff
    • Simple CLI for Tuya authentication and messaging setup

πŸ›οΈ Architecture

Architecture

The DuckyClaw 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 (like Raspberry Pi, ESP32, or Linux devices) runs its own Claw like loop agent, able to communicate directly with your devices via IoT and hardware interfaces.

πŸš€ Quick Start

Install

git clone https://github.com/tuya/DuckyClaw.git
git submodule update --init

Development

  • Tuya T5 MCU Guide: [TODO]
  • Raspberry Pi Guide: [TODO]
  • ESP32 MCU Guide: [TODO]

πŸ”Œ Plugin/Skills Development

Skill format: Skills are .md files in the skills/ directory. The agent gets a summary of them and follows the instructions. Use this structure:

# Skill Title

One-line description.

## When to use
When the user asks about X / when Y happens.

## How to use
1. Call tool_A with ...
2. Then call tool_B ...
3. Reply with ...

## Example
User: "…" β†’ use get_current_time, then web_search "…", then reply "…"

Add skills: put a new name.md in the skills dir (e.g. via the write_file tool), or add built-ins in skills/skill_loader.c. See existing skills there for examples.

πŸ“ Project Structure

DuckyClaw/
β”œβ”€β”€ agent/                 # Agent core logic
β”‚   β”œβ”€β”€ agent_loop.c/h     # Claw-style agent loop (reasoning, tool calls, context)
β”‚   └── context_builder.c/h # Dialogue and system context building
β”œβ”€β”€ config/                # Board/platform configs (Kconfig selection)
β”‚   β”œβ”€β”€ TUYA_T5AI_BOARD_LCD_3.5_CAMERA.config  # Tuya T5AI dev board
β”‚   β”œβ”€β”€ RaspberryPi.config                     # Raspberry Pi
β”‚   └── ESP32S3_BREAD_COMPACT_WIFI.config      # ESP32-S3
β”œβ”€β”€ heartbeat/             # Scheduled heartbeat and keepalive
β”‚   └── heartbeat.c/h
β”œβ”€β”€ IM/                    # Unified messaging layer (message bus + channels)
β”‚   β”œβ”€β”€ bus/               # Message bus (message_bus)
β”‚   β”œβ”€β”€ channels/          # Telegram / Discord / Feishu channels
β”‚   β”œβ”€β”€ proxy/             # HTTP proxy (TLS, cloud connectivity)
β”‚   β”œβ”€β”€ cli/               # Serial/local CLI
β”‚   β”œβ”€β”€ certs/             # Certificates and TLS config
β”‚   β”œβ”€β”€ im_api.h / im_platform.h / im_config.h
β”‚   └── README.md          # IM component docs
β”œβ”€β”€ include/               # App-level public headers
β”‚   β”œβ”€β”€ app_im.h / ducky_claw_chat.h / tuya_app_config.h
β”‚   └── reset_netcfg.h
β”œβ”€β”€ memory/                # Persistent memory and sessions
β”‚   β”œβ”€β”€ memory_manager.c/h # Agent.txt, memory.txt, IoT memory, etc.
β”‚   └── session_manager.c/h
β”œβ”€β”€ src/                   # App entry and business logic
β”‚   β”œβ”€β”€ tuya_app_main.c    # TuyaOpen app entry, init, event loop
β”‚   β”œβ”€β”€ ducky_claw_chat.c  # Chat flow, device/cloud agent dispatch
β”‚   β”œβ”€β”€ app_im.c           # IM–Agent bridge
β”‚   β”œβ”€β”€ cli_cmd.c          # CLI and config (auth, IM setup, etc.)
β”‚   └── reset_netcfg.c     # Network config reset
β”œβ”€β”€ tools/                 # MCP-style device tools
β”‚   β”œβ”€β”€ tool_cron.c/h      # CRON scheduling and heartbeat
β”‚   β”œβ”€β”€ tool_files.c/h     # FILE operations
β”‚   β”œβ”€β”€ tools_register.c/h # Tool registration and dispatch
β”‚   └── Kconfig
β”œβ”€β”€ dist/                  # Build output (e.g. DuckyClaw_1.0.x)
β”œβ”€β”€ app_default.config     # Default Kconfig
└── TuyaOpen/              # TuyaOpen C SDK submodule (platform, drivers, cloud, AI, etc.)

πŸ› Issues

Please report any issues and bugs by creating a new issue here, also make sure you're reporting an issue that doesn't exist. Any help to improve the project would be appreciated. Thanks! πŸ™βœ¨

πŸ™πŸ™πŸ™ Follow us

Like this project? Leave a star! ⭐⭐⭐⭐⭐

This project wouldn't be possible without the amazing TuyaOpen Open Source AI-Agent framework. It makes AI-Agent integreation really easy TuyaOpen Repo

πŸ“ƒ License

This project is licensed under the Apache License 2.0.

πŸ‘₯ Credits

  • TuyaOpen - This project is build on top of this amazing hardware AIoT OS call TuyaOpen.
  • OpenClaw β€” original idea and inspiration
  • MimiClaw - original inspiration of ESP32 local agent and skills

πŸ“ Author

This project is created by TuyaOpen Team, with the help of awesome contributors

contributors


About

Edge-Hardware (SoC/MCU) oriented 🦞

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages