Ameba-Claw AI Agent Framework
Develop smart AI applications through conversation — runs entirely on-chip
Overview
Ameba-Claw is Realtek's AI Agent framework built on Ameba AIoT SoCs. It delivers a complete sense-understand-reason-act ReAct Agent loop on the SoC itself. Connect to Wi-Fi, configure an LLM API key, and interact with the agent over WeChat, Telegram, Feishu, or QQ. The agent generates Lua scripts at runtime to extend its capabilities without recompiling the firmware — GPIO, audio, LCDC, USB, and other hardware peripherals can all be scripted and controlled via IM chat.
Unlike general-purpose Linux solutions such as Openclaw, Ameba-Claw explores a vast territory that Linux cannot reach: using IoT chips for what they do best — low cost, low power, high integration, and easy customization — to carry an AI Agent, transforming the Agent from a complex, expensive system into a truly mass-producible, low-cost endpoint intelligence.
Hardware Foundation: RTL8721F Built for the Agent
The advantage of the Ameba-Claw solution starts with the hardware. What does an on-device Agent need? Enough memory to carry context, enough storage for long-term memory, rich peripherals to connect sensors and actuators, and stable wireless connectivity. These are not "nice-to-have" extras — they are essential for the Agent to function effectively on the endpoint.
RTL8721F is designed to align with these core Agent requirements, with well-balanced resource allocation at the chip level:
| Capability Dimension | Common Industry Practice / Limitation | RTL8721F Solution |
|---|---|---|
| Wireless Connectivity | Single-band 2.4G only, prone to interference in industrial/commercial environments | Dual-band Wi-Fi 6 (2.4G/5G), 5 GHz band ensures reliable real-time response in complex environments |
| RAM | Most on-device solutions use low-speed, small-capacity RAM, limiting context window | High-speed DQ16 PSRAM, accommodates larger system prompts, memory summaries, and multi-turn conversation history. Accelerates complex GUI graphics rendering |
| Storage Expansion | NOR Flash only; logs and memory space easily fill up | Supports NOR or NAND Flash, as well as external SD cards., providing ample space for long-term memory, images, and logs |
| Display Output | Requires external driver or SPI emulation, consuming CPU resources | Built-in LCDC hardware controller + MJPEG decoder + PPE graphics engine, renders UI and monitoring screens directly without additional compute overhead |
| External Expansion | USB functionality limited or device-mode only | USB 2.0 HS Host + Device dual mode, connects standard peripherals such as UVC cameras and USB drives, plug-and-play |
Ameba-Claw is currently developed on RTL8721F. The framework itself is designed to be chip-portable and will be gradually extended to more Ameba-series ICs in the future.
How It Works
Users send commands via IM channels. The chip receives them over Wi-Fi and automatically assembles context — including long-term memory files, session history, the current timestamp, a list of available tools, and Lua Skills — then issues an LLM API request. The LLM performs multi-step reasoning and tool calls in a ReAct loop (GPIO control, web search, Lua Skills, file operations, etc.) until the task is complete, and finally returns the result to the original message source. Context management, memory maintenance, and tool execution are all completed locally on the chip, which communicates directly with the LLM API endpoint — no cloud gateway required.
Core Features
SOUL.md (personality & behavior guardrails), USER.md (preferences & permissions), and MEMORY.md (structured long-term memory summaries) are persisted in local Flash. Developers can edit them directly as the Agent's long-term context for reasoning. NAND Flash support enables memory to accumulate over time.
Send natural language instructions via IM, and the device generates and executes Lua scripts on the fly. New capabilities load, unload, and combine like building blocks — the same hardware switches roles across different scenarios. The lightweight Lua engine avoids the heavy overhead of a Python runtime.
The Agent Loop completes entirely on the chip — no cloud gateway needed. User conversation history, tool call records, memory files, and other sensitive data remain in local Flash and are never uploaded to third-party platforms. This naturally avoids the data leakage risks of cloud-based Agent solutions.
One framework, multiple frontends: Telegram, Feishu, WeChat (iLink), QQ, and a built-in local browser WebIM. Messages from different channels on the same chip enter the same Agent loop for processing — no need to write separate logic for each platform.
Leveraging RTL8721F's USB 2.0 HS Host, standard UVC cameras plug-and-play for live viewing, and USB drives plug-and-play for storage. Compared to Linux solutions, there is no need to maintain the V4L2 framework or complex USB driver stacks — direct operation under RTOS, with an immediately usable peripheral ecosystem.
Backed by RTL8721F's abundant interface resources, natively supports GPIO, UART, I2C, SPI, PWM, ADC, DAC, USB, LCDC display controller, and more. The Agent can directly drive various sensors, actuators, cameras, displays, and storage devices at runtime.
System Architecture
Ameba-Claw adopts a layered architecture design, from the hardware SoC to the upper-level Agent application, with clear responsibilities at each layer:
- Application Layer (App): The Ameba-Claw Agent core, comprising Memory Manager, Lua VM (script runtime), Caps (tool set), Scheduler (task scheduler), and IM (messaging), forming a complete sense-understand-reason-act closed loop.
- Services Layer: OS provides the RTOS base runtime; Net encapsulates the dual-band Wi-Fi 6 network stack; IM provides unified multi-platform instant messaging access; Security provides secure channels and key management.
- Hardware Layer (SoC): RTL8721F provides dual-band Wi-Fi 6, LCDC display controller, USB 2.0 HS, abundant GPIO/I2C/SPI/PWM peripheral interfaces, plus large-capacity PSRAM and NOR / NAND Flash support.
Application Demos
The following demos showcase Ameba-Claw's capabilities across different scenarios: Ameba-Claw Demo Compilation
| Demo | Key Capabilities |
|---|---|
| USB Camera + LCD Change Monitoring | UVC camera plug-and-play, LCD real-time display with highlighted change annotations, combined with cloud LLM visual understanding |
| LAN Voice Intercom | Instant generation via WeChat command, UDP ad-hoc networking + microphone/speaker driver, ready for intercom when powered on |
| LVGL HMI Graphical Control Panel | Agent auto-draws the UI, finger slider for real-time dimming, full-link closed loop from UI rendering to PWM/I2C hardware control |
| 2048 Game | Lua runtime generates complete game logic, auto-adapts rendering to different screen resolutions |
Development Resources
| Icon | Resource Name | Link |
|---|---|---|
![]() |
Ameba-Claw Guide Doc | Link |
![]() |
Online Flash Tool | Link |
![]() |
GitHub Repository | Link |
![]() |
Contact Us | Link |
Recommended ICs
| Features | Filter | RTL8720F | RTL8721F | RTL8721Dx | RTL8720E | RTL8710E | RTL8726E | RTL8713E | RTL8730E | RTL872xD | RTL8735B |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Application Processor |
Cortex-M | Cortex-M | Cortex-M | Cortex-M | Cortex-M | Cortex-M | Cortex-M | Cortex-A | Cortex-M | Cortex-M | |
| DSP | N | N | N | N | N | Y | Y | N | N | N | |
| ISP | N | N | N | N | N | N | N | N | N | Y | |
| Arm TrustZone | Y | Y | Y | Y | N | Y | N | Y | Y | Y | |
| Dual Band | N | Y | Y | N | N | N | N | Y | Y | Y | |
| Wi-Fi 6 | Y | Y | N | Y | Y | Y | Y | Y | N | N | |
| R-MESH | Y | Y | Y | N | N | N | N | N | N | N | |
| Ultra-low Power | Y | Y | Y | N | N | N | N | N | Y | Y | |
| Ethernet | N | Y | N | N | N | N | N | N | N | N | |
| BT Dual Mode | N | N | N | N | N | Y | Y | Y | N | N | |
| HMI | N | Y | Y | Y | N | Y | Y | Y | N | N | |
| Audio ADC | N | N | N | N | N | Y | Y | Y | Y | Y | |
| Audio DAC | N | N | N | N | N | Y | Y | Y | Y | Y | |
| SDIO Host | N | Y | N | N | N | N | N | N | N | N | |
| SD/EMMC Host | N | Y | N | N | N | N | N | Y | Y | Y | |
| USB | N | Y | Y | N | N | N | N | Y | Y | Y | |
|
BT Dedicated Antenna |
N | N | N | N | N | N | N | Y | N | N | |
| CAN | N | Y | N | N | N | N | N | N | N | N |


