2026-02-06 18:59:07 +08:00
# MimiClaw: Pocket AI Assistant on a $5 Chip
2026-02-04 12:37:56 +08:00
2026-02-08 13:47:46 +08:00
[](LICENSE)
[](https://deepwiki.com/memovai/mimiclaw)
2026-02-09 11:35:29 +08:00
[](https://discord.gg/r8ZxSvB8Yr)
2026-02-08 13:47:46 +08:00
[](https://x.com/ssslvky)
2026-02-06 23:01:05 +08:00
**[English ](README.md ) | [中文 ](README_CN.md )**
2026-02-04 13:32:27 +08:00
<p align="center">
<img src="assets/banner.png" alt="MimiClaw" width="480" />
</p>
2026-02-06 23:01:05 +08:00
**The world's first AI assistant(OpenClaw) on a $5 chip. No Linux. No Node.js. Just pure C**
2026-02-04 12:37:56 +08:00
2026-02-06 13:45:09 +08:00
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.
2026-02-04 12:37:56 +08:00
2026-02-06 18:59:07 +08:00
## Meet MimiClaw
2026-02-04 12:37:56 +08:00
2026-02-06 18:59:07 +08:00
- **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
2026-02-04 12:37:56 +08:00
2026-02-05 19:12:20 +08:00
## How It Works
2026-02-04 12:37:56 +08:00
2026-02-09 02:45:00 +08:00

2026-02-04 12:37:56 +08:00
2026-02-06 18:59:07 +08:00
You send a message on Telegram. The ESP32-S3 picks it up over WiFi, feeds it into an agent loop — Claude thinks, calls tools, reads memory — and sends the reply back. Everything runs on a single $5 chip with all your data stored locally on flash.
2026-02-04 12:37:56 +08:00
2026-02-05 19:12:20 +08:00
## Quick Start
2026-02-04 12:37:56 +08:00
2026-02-05 19:12:20 +08:00
### What You Need
2026-02-04 12:37:56 +08:00
2026-02-05 19:12:20 +08:00
- 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 ](https://t.me/BotFather ) on Telegram to create one
- An **Anthropic API key ** — from [console.anthropic.com ](https://console.anthropic.com )
2026-02-04 12:37:56 +08:00
2026-02-05 19:12:20 +08:00
### Install
2026-02-04 12:37:56 +08:00
```bash
2026-02-08 00:16:03 +08:00
# You need ESP-IDF v5.5+ installed first:
# https://docs.espressif.com/projects/esp-idf/en/v5.5.2/esp32s3/get-started/
2026-02-05 19:12:20 +08:00
2026-02-04 12:40:36 +08:00
git clone https://github.com/memovai/mimiclaw.git
2026-02-04 12:37:56 +08:00
cd mimiclaw
2026-02-05 19:12:20 +08:00
idf.py set-target esp32s3
2026-02-07 00:37:49 +08:00
```
### Configure
2026-02-08 20:42:10 +08:00
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.
2026-02-07 00:37:49 +08:00
```bash
cp main/mimi_secrets.h.example main/mimi_secrets.h
```
Edit `main/mimi_secrets.h` :
```c
#define MIMI_SECRET_WIFI_SSID "YourWiFiName"
#define MIMI_SECRET_WIFI_PASS "YourWiFiPassword"
#define MIMI_SECRET_TG_TOKEN "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"
#define MIMI_SECRET_API_KEY "sk-ant-api03-xxxxx"
#define MIMI_SECRET_SEARCH_KEY "" // optional: Brave Search API key
#define MIMI_SECRET_PROXY_HOST "" // optional: e.g. "10.0.0.1"
#define MIMI_SECRET_PROXY_PORT "" // optional: e.g. "7897"
```
Then build and flash:
```bash
2026-02-07 23:09:40 +08:00
# Clean build (required after any mimi_secrets.h change)
idf.py fullclean && idf.py build
# Find your serial port
ls /dev/cu.usb* # macOS
ls /dev/ttyACM* # Linux
2026-02-04 12:37:56 +08:00
2026-02-07 23:09:40 +08:00
# Flash and monitor (replace PORT with your port)
# USB adapter: likely /dev/cu.usbmodem11401 (macOS) or /dev/ttyACM0 (Linux)
idf.py -p PORT flash monitor
```
2026-02-04 12:37:56 +08:00
2026-02-12 21:59:26 +08:00
> **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>
2026-02-07 00:37:49 +08:00
### CLI Commands
2026-02-04 12:37:56 +08:00
2026-02-08 20:42:10 +08:00
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):
```
mimi> wifi_set MySSID MyPassword # change WiFi network
mimi> set_tg_token 123456:ABC... # change Telegram bot token
mimi> set_api_key sk-ant-api03-... # change Anthropic API key
mimi> set_model claude-sonnet-4-5 # change LLM model
mimi> set_proxy 127.0.0.1 7897 # set HTTP proxy
mimi> clear_proxy # remove proxy
mimi> set_search_key BSA... # set Brave Search API key
mimi> config_show # show all config (masked)
mimi> config_reset # clear NVS, revert to build-time defaults
```
**Debug & maintenance:**
2026-02-07 23:04:24 +08:00
2026-02-04 12:37:56 +08:00
```
2026-02-07 00:37:49 +08:00
mimi> wifi_status # am I connected?
mimi> memory_read # see what the bot remembers
2026-02-07 23:04:24 +08:00
mimi> memory_write "content" # write to MEMORY.md
2026-02-07 00:37:49 +08:00
mimi> heap_info # how much RAM is free?
mimi> session_list # list all chat sessions
mimi> session_clear 12345 # wipe a conversation
mimi> restart # reboot
2026-02-04 12:37:56 +08:00
```
2026-02-05 19:12:20 +08:00
## 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 |
| `2026-02-05.md` | Daily notes — what happened today |
| `tg_12345.jsonl` | Chat history — your conversation with the bot |
2026-02-07 00:37:49 +08:00
## Tools
MimiClaw uses Anthropic's tool use protocol — Claude 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 |
2026-02-07 15:54:23 +08:00
| `get_current_time` | Fetch current date/time via HTTP and set the system clock |
2026-02-07 00:37:49 +08:00
2026-02-07 23:04:24 +08:00
To enable web search, set a [Brave Search API key ](https://brave.com/search/api/ ) via `MIMI_SECRET_SEARCH_KEY` in `mimi_secrets.h` .
2026-02-07 00:37:49 +08:00
2026-02-05 19:12:20 +08:00
## Also Included
2026-02-04 12:37:56 +08:00
2026-02-05 19:12:20 +08:00
- **WebSocket gateway** on port 18789 — connect from your LAN with any WebSocket client
- **OTA updates** — flash new firmware over WiFi, no USB needed
- **Dual-core** — network I/O and AI processing run on separate CPU cores
2026-02-06 23:01:05 +08:00
- **HTTP proxy** — CONNECT tunnel support for restricted networks
2026-02-07 00:37:49 +08:00
- **Tool use** — ReAct agent loop with Anthropic tool use protocol
2026-02-04 12:37:56 +08:00
2026-02-05 19:12:20 +08:00
## For Developers
2026-02-04 12:37:56 +08:00
2026-02-05 19:12:20 +08:00
Technical details live in the `docs/` folder:
2026-02-04 12:37:56 +08:00
2026-02-05 19:12:20 +08:00
- **[docs/ARCHITECTURE.md ](docs/ARCHITECTURE.md )** — system design, module map, task layout, memory budget, protocols, flash partitions
- **[docs/TODO.md ](docs/TODO.md )** — feature gap tracker and roadmap
2026-02-04 12:37:56 +08:00
## License
MIT
## Acknowledgments
2026-02-06 23:01:05 +08:00
Inspired by [OpenClaw ](https://github.com/openclaw/openclaw ) and [Nanobot ](https://github.com/HKUDS/nanobot ). MimiClaw reimplements the core AI agent architecture for embedded hardware — no Linux, no server, just a $5 chip.
2026-02-09 11:17:13 +08:00
## Star History
[](https://star-history.com/#memovai/mimiclaw &Date)