logo
0
0
WeChat Login
docs: trim CNB quickstart note

RT-Claw

Making AI Assistants Cheap Again

QQ Group Telegram Bilibili MIT License

中文 | 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.

RT-Claw Demo — AI drawing on LCD via Tool Use

Architecture · ESP32-C3 QEMU Guide · Contributing · Coding Style

Core Idea

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.

Features

FeatureDescriptionStatus
LLM Chat EngineInteractive conversation with Claude API over HTTPDone
Tool UseLLM-driven hardware control (GPIO, system info, LCD) via function callingDone
LCD Graphics320x240 RGB565 framebuffer with text, shapes, and drawing primitives; AI agent can draw on screen via tool callsDone
Chat-first ShellUART REPL where direct input goes to AI, /commands for system; UTF-8 supportDone
OSALWrite once, run on FreeRTOS and RT-Thread with zero code changesDone
GatewayThread-safe message routing between servicesDone
NetworkingEthernet + HTTP client on ESP32-C3 QEMU; WiFi on real hardwareDone
Multi-Model APISupport mainstream LLM APIs: Claude, GPT, Gemini, DeepSeek, GLM, MiniMax, Grok, Moonshot, Baichuan, Qwen, Doubao, Llama (Ollama)Planned
Web Config PortalLightweight built-in web page for configuring API keys, selecting models, and tuning parameters at runtimePlanned
Swarm IntelligenceNode discovery, heartbeat, distributed task schedulingIn Progress
Conversation MemoryShort-term RAM ring buffer + long-term NVS Flash persistent storageDone
Skill MemoryNodes learn and recall frequently used operation patternsIn Progress
Scheduled TasksTimer-driven task execution and periodic automationDone
IM IntegrationsConnect to Feishu, DingTalk, QQ, and Telegram as message channelsIn Progress
Claw Skill ProviderServe as a skill for other Claws, giving them the ability to sense and control the physical worldPlanned

Architecture

+---------------------------------------------------+ | 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 | +-----------------+---------------------------------+

Supported Platforms

PlatformTargetRTOSBuildStatus
ESP32-C3QEMU (Espressif fork)ESP-IDF + FreeRTOSMeson + CMakeAI verified
ESP32-S3QEMU (Espressif fork)ESP-IDF + FreeRTOSMeson + CMakeAI verified
ESP32-C3Real hardwareESP-IDF + FreeRTOSMeson + CMakeUntested
ESP32-S3Real hardwareESP-IDF + FreeRTOSMeson + CMakeUntested
QEMU vexpress-a9QEMURT-ThreadMeson + SConsAI verified

Quick Start

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.

ESP32-C3 (ESP-IDF + QEMU)

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

PresetFileShellFeishuDescription
Quick Demosdkconfig.defaults.demoOnOffInteractive terminal with full AI agent
Feishu Botsdkconfig.defaults.feishuOffOnHeadless IM bot, saves RAM
Defaultsdkconfig.defaultsOffOffMinimal 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

QEMU vexpress-a9 (RT-Thread)

# 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

Project Structure

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) └── ...

Community

Join the GTOC (Gevico Open-Source Community) channels:

Documentation

License

MIT