内容摘录
MimiClaw: Pocket AI Assistant on a $5 Chip
<p align="center">
<img src="assets/banner.png" alt="MimiClaw" width="500" />
</p>
<p align="center">
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
<a href="https://deepwiki.com/memovai/mimiclaw"><img src="https://img.shields.io/badge/DeepWiki-mimiclaw-blue.svg" alt="DeepWiki"></a>
<a href="https://discord.gg/r8ZxSvB8Yr"><img src="https://img.shields.io/badge/Discord-mimiclaw-5865F2?logo=discord&logoColor=white" alt="Discord"></a>
<a href="https://x.com/ssslvky"><img src="https://img.shields.io/badge/X-@ssslvky-black?logo=x" alt="X"></a>
</p>
<p align="center">
<strong><a href="README.md">English</a> | <a href="README_CN.md">中文</a> | <a href="README_JA.md">日本語</a></strong>
</p>
**The world's first AI assistant(OpenClaw) on a $5 chip. No Linux. No Node.js. Just pure C**
MimiClaw turns a tiny ESP32-S3 board into a personal AI assistant. Plug it into USB power, connect to WiFi, and talk to it through Telegram — it handles any task you throw at it and evolves over time with local memory — all on a chip the size of a thumb.
Meet MimiClaw
**Tiny** — No Linux, no Node.js, no bloat — just pure C
**Handy** — Message it from Telegram, it handles the rest
**Loyal** — Learns from memory, remembers across reboots
**Energetic** — USB power, 0.5 W, runs 24/7
**Lovable** — One ESP32-S3 board, $5, nothing else
How It Works
You send a message on Telegram. The ESP32-S3 picks it up over WiFi, feeds it into an agent loop — the LLM thinks, calls tools, reads memory — and sends the reply back. Supports both **Anthropic (Claude)** and **OpenAI (GPT)** as providers, switchable at runtime. Everything runs on a single $5 chip with all your data stored locally on flash.
Quick Start
What You Need
An **ESP32-S3 dev board** with 16 MB flash and 8 MB PSRAM (e.g. Xiaozhi AI board, ~$10)
A **USB Type-C cable**
A **Telegram bot token** — talk to @BotFather on Telegram to create one
An **Anthropic API key** — from console.anthropic.com, or an **OpenAI API key** — from platform.openai.com
Install
<details>
<summary>Ubuntu Install</summary>
Recommended baseline:
Ubuntu 22.04/24.04
Python >= 3.10
CMake >= 3.16
Ninja >= 1.10
Git >= 2.34
flex >= 2.6
bison >= 3.8
gperf >= 3.1
dfu-util >= 0.11
libusb-1.0-0, libffi-dev, libssl-dev
Install and build on Ubuntu:
</details>
<details>
<summary>macOS Install</summary>
Recommended baseline:
macOS 12/13/14
Xcode Command Line Tools
Homebrew
Python >= 3.10
CMake >= 3.16
Ninja >= 1.10
Git >= 2.34
flex >= 2.6
bison >= 3.8
gperf >= 3.1
dfu-util >= 0.11
libusb, libffi, openssl
Install and build on macOS:
</details>
Configure
MimiClaw uses a **two-layer config** system: build-time defaults in mimi_secrets.h, with runtime overrides via the serial CLI. CLI values are stored in NVS flash and take priority over build-time values.
Edit main/mimi_secrets.h:
Then build and flash:
**Important: Plug into the correct USB port!** Most ESP32-S3 boards have two USB-C ports. You must use the one labeled **USB** (native USB Serial/JTAG), **not** the one labeled **COM** (external UART bridge). Plugging into the wrong port will cause flash/monitor failures.
<details>
<summary>Show reference photo</summary>
<img src="assets/esp32s3-usb-port.jpg" alt="Plug into the USB port, not COM" width="480" />
</details>
CLI Commands (via UART/COM port)
Connect via serial to configure or debug. **Config commands** let you change settings without recompiling — just plug in a USB cable anywhere.
**Runtime config** (saved to NVS, overrides build-time defaults):
**Debug & maintenance:**
USB (JTAG) vs UART: Which Port for What
Most ESP32-S3 dev boards expose **two USB-C ports**:
| Port | Use for |
|------|---------|
| **USB** (JTAG) | idf.py flash, JTAG debugging |
| **COM** (UART) | **REPL CLI**, serial console |
**REPL requires the UART (COM) port.** The USB (JTAG) port does not support interactive REPL input.
<details>
<summary>Port details & recommended workflow</summary>
| Port | Label | Protocol |
|------|-------|----------|
| **USB** | USB / JTAG | Native USB Serial/JTAG |
| **COM** | UART / COM | External UART bridge (CP2102/CH340) |
The ESP-IDF console/REPL is configured to use UART by default (CONFIG_ESP_CONSOLE_UART_DEFAULT=y).
**If you have both ports connected simultaneously:**
USB (JTAG) handles flash/download and provides secondary serial output
UART (COM) provides the primary interactive console for the REPL
macOS: both appear as /dev/cu.usbmodem* or /dev/cu.usbserial-* — run ls /dev/cu.usb* to identify
Linux: USB (JTAG) → /dev/ttyACM0, UART → /dev/ttyUSB0
**Recommended workflow:**
</details>
Memory
MimiClaw stores everything as plain text files you can read and edit:
| File | What it is |
|------|------------|
| SOUL.md | The bot's personality — edit this to change how it behaves |
| USER.md | Info about you — name, preferences, language |
| MEMORY.md | Long-term memory — things the bot should always remember |
| HEARTBEAT.md | Task list the bot checks periodically and acts on autonomously |
| cron.json | Scheduled jobs — recurring or one-shot tasks created by the AI |
| 2026-02-05.md | Daily notes — what happened today |
| tg_12345.jsonl | Chat history — your conversation with the bot |
Tools
MimiClaw supports tool calling for both Anthropic and OpenAI — the LLM can call tools during a conversation and loop until the task is done (ReAct pattern).
| Tool | Description |
|------|-------------|
| web_search | Search the web via Brave Search API for current information |
| get_current_time | Fetch current date/time via HTTP and set the system clock |
| cron_add | Schedule a recurring or one-shot task (the LLM creates cron jobs on its own) |
| cron_list | List all scheduled cron jobs |
| cron_remove | Remove a cron job by ID |
To enable web search, set a Brave Search API key via MIMI_SECRET_SEARCH_KEY in mimi_secrets.h.
Cron Tasks
MimiClaw has a built-in cron scheduler that let…