Making AI Assistants Cheap Again
中文 | English
RT-Claw is an OpenClaw-inspired intelligent assistant for embedded devices. Multi-RTOS support via OSAL. Build swarm intelligence with networked nodes.
Deploy your own AI assistant on hardware that costs just one dollar — seamlessly integrated into your daily workflow, efficiently bridging the digital and physical worlds.
Architecture · ESP32-C3 QEMU Guide · Contributing · Coding Style
rt-claw brings intelligence from the cloud to the edge through low-cost embedded nodes and swarm networking. Each node can sense the world, collaborate with others, and execute control tasks in real time.
RT-Claw exposes atomized hardware capabilities — GPIO, sensors, LCD, networking — as tools that an LLM can dynamically orchestrate. Adapt to any scenario without writing, compiling, or flashing embedded code again.
| Feature | Description | Status |
|---|---|---|
| LLM Chat Engine | Interactive conversation with Claude API over HTTP | Done |
| Tool Use | LLM-driven hardware control (GPIO, system info, LCD) via function calling | Done |
| LCD Graphics | 320x240 RGB565 framebuffer with text, shapes, and drawing primitives; AI agent can draw on screen via tool calls | Done |
| Chat-first Shell | UART REPL where direct input goes to AI, /commands for system; UTF-8 support | Done |
| OSAL | Write once, run on FreeRTOS and RT-Thread with zero code changes | Done |
| Gateway | Thread-safe message routing between services | Done |
| Networking | Ethernet + HTTP client on ESP32-C3 QEMU; WiFi on real hardware | Done |
| Multi-Model API | Support mainstream LLM APIs: Claude, GPT, Gemini, DeepSeek, GLM, MiniMax, Grok, Moonshot, Baichuan, Qwen, Doubao, Llama (Ollama) | Planned |
| Web Config Portal | Lightweight built-in web page for configuring API keys, selecting models, and tuning parameters at runtime | Planned |
| Swarm Intelligence | Node discovery, heartbeat, distributed task scheduling | In Progress |
| Conversation Memory | Short-term RAM ring buffer + long-term NVS Flash persistent storage | Done |
| Skill Memory | Nodes learn and recall frequently used operation patterns | In Progress |
| Scheduled Tasks | Timer-driven task execution and periodic automation | Done |
| IM Integrations | Connect to Feishu, DingTalk, QQ, and Telegram as message channels | In Progress |
| Claw Skill Provider | Serve as a skill for other Claws, giving them the ability to sense and control the physical world | Planned |
+---------------------------------------------------+ | rt-claw Application | | gateway | swarm | net | ai_engine | tools | lcd | +---------------------------------------------------+ | claw_os.h (OSAL API) | +-----------------+---------------------------------+ | FreeRTOS (IDF) | RT-Thread | +-----------------+---------------------------------+ | ESP32-C3 / S3 | QEMU vexpress-a9 | | WiFi / BLE | Ethernet / UART | +-----------------+---------------------------------+
| Platform | Target | RTOS | Build | Status |
|---|---|---|---|---|
| ESP32-C3 | QEMU (Espressif fork) | ESP-IDF + FreeRTOS | Meson + CMake | AI verified |
| ESP32-S3 | QEMU (Espressif fork) | ESP-IDF + FreeRTOS | Meson + CMake | AI verified |
| ESP32-C3 | Real hardware | ESP-IDF + FreeRTOS | Meson + CMake | Untested |
| ESP32-S3 | Real hardware | ESP-IDF + FreeRTOS | Meson + CMake | Untested |
| QEMU vexpress-a9 | QEMU | RT-Thread | Meson + SCons | AI verified |
No hardware? No problem. Open cnb.cool/gevico.online/rtclaw/rt-claw to launch a CNB Cloud-Native IDE with all toolchains pre-installed. Build and run RT-Claw on QEMU directly in your browser.
1. Install system dependencies
# Ubuntu / Debian
sudo apt install git wget flex bison gperf python3 python3-venv \
cmake ninja-build ccache libffi-dev libssl-dev dfu-util \
libusb-1.0-0 libgcrypt20-dev libglib2.0-dev libpixman-1-dev \
libsdl2-dev libslirp-dev meson
# Arch Linux
sudo pacman -S --needed libgcrypt glib2 pixman sdl2 libslirp \
python cmake ninja gcc git wget flex bison meson
2. Install ESP-IDF + QEMU
# One-line setup (clones ESP-IDF v5.4, installs toolchain + QEMU)
./tools/setup-esp-env.sh
3. Choose a configuration preset
| Preset | File | Shell | Feishu | Description |
|---|---|---|---|---|
| Quick Demo | sdkconfig.defaults.demo | On | Off | Interactive terminal with full AI agent |
| Feishu Bot | sdkconfig.defaults.feishu | Off | On | Headless IM bot, saves RAM |
| Default | sdkconfig.defaults | Off | Off | Minimal base for custom builds |
source $HOME/esp/esp-idf/export.sh
# Pick one:
cp platform/esp32c3-qemu/sdkconfig.defaults.demo \
platform/esp32c3-qemu/sdkconfig.defaults # Quick Demo
# cp platform/esp32c3-qemu/sdkconfig.defaults.feishu \
# platform/esp32c3-qemu/sdkconfig.defaults # Feishu Bot
idf.py -C platform/esp32c3-qemu set-target esp32c3
All presets include: AI engine, Tool Use, swarm heartbeat, scheduler, LCD, skills, and boot-time AI connectivity test.
4. Configure API key
idf.py -C platform/esp32c3-qemu menuconfig
# Navigate: Component config → rt-claw Configuration → AI Engine
# - LLM API Key: <your-api-key>
# - LLM API endpoint URL: https://api.anthropic.com/v1/messages
# - LLM model name: claude-sonnet-4-6
5. (Optional) Configure Feishu bot
idf.py -C platform/esp32c3-qemu menuconfig
# Navigate: Component config → rt-claw Configuration → Feishu (Lark) Integration
# - Enable Feishu IM integration: [*]
# - Feishu App ID: <your-app-id>
# - Feishu App Secret: <your-app-secret>
Create an app on Feishu Open Platform, enable
Event Subscription → Long Connection mode, and subscribe to
im.message.receive_v1. The device establishes a WebSocket long connection
on boot — no public IP required.
6. Build and run
# Unified build (recommended)
make esp32c3-qemu
# Run on QEMU
make run-esp32c3-qemu
# Or flash to real hardware (untested)
idf.py -C platform/esp32c3-qemu -p /dev/ttyUSB0 flash monitor
# Prerequisites: arm-none-eabi-gcc, qemu-system-arm, scons, meson, ninja
# Unified build
make vexpress-a9-qemu
# Configure API key (optional)
meson configure build/vexpress-a9-qemu -Dai_api_key='<your-key>'
meson compile -C build/vexpress-a9-qemu
scons -C platform/vexpress-a9-qemu -j$(nproc)
# Start API proxy (RT-Thread has no TLS, proxy forwards HTTP->HTTPS)
python3 tools/api-proxy.py https://api.anthropic.com &
# Run
make run-vexpress-a9-qemu
rt-claw/ ├── meson.build # Meson build definition (cross-compiles src + osal) ├── meson_options.txt # Meson build options (osal backend, features, AI config) ├── Makefile # Unified build entry (make esp32c3-qemu / make vexpress-a9-qemu) ├── osal/ # OS Abstraction Layer │ ├── include/claw_os.h # Unified RTOS API │ ├── freertos/ # FreeRTOS implementation │ └── rtthread/ # RT-Thread implementation ├── src/ # Platform-independent core │ ├── claw_init.* # Boot entry point │ ├── claw_config.h # Project configuration │ ├── core/gateway.* # Message routing │ ├── services/ai/ # LLM chat engine (Claude API) │ ├── services/net/ # Network service │ ├── services/swarm/ # Swarm intelligence │ └── tools/ # Tool Use framework (GPIO, system, LCD) ├── platform/ │ ├── esp32c3-qemu/ # ESP32-C3 QEMU (ESP-IDF, Meson + CMake) │ └── vexpress-a9-qemu/ # RT-Thread BSP (Meson + SCons) ├── vendor/ │ ├── freertos/ # FreeRTOS-Kernel (submodule) │ └── rt-thread/ # RT-Thread (submodule) ├── docs/ │ ├── en/ # English documentation │ └── zh/ # Chinese documentation ├── scripts/ │ ├── gen-esp32c3-cross.py # Auto-generate Meson cross-file from ESP-IDF │ └── ... └── tools/ ├── api-proxy.py # HTTP→HTTPS proxy for QEMU (no TLS on RT-Thread) └── ...
Join the GTOC (Gevico Open-Source Community) channels:
MIT