MimiClaw: Tiny AI Assistant on a $5 ESP32‑S3 Chip

MimiClaw: Tiny AI Assistant on a $5 ESP32‑S3 Chip

The world’s first chatbot that runs on a single $5 board and keeps all information on‑chip. MimiClaw brings Claude’s conversational power, local memory, and a flexible tool‑use protocol to the edge, letting you answer questions, schedule tasks, and browse the web – all behind a Telegram bot.

Why MimiClaw Is a Game‑Changer

  • Zero‑Bloat – Only pure C code is compiled on an ESP32‑S3; no Linux, no Node.js, no external server.
  • Cost & Size – Built from a 16 MB flash, 8 MB PSRAM dev board (~$10) – a single thumb‑size chip.
  • Privacy‑First – All data is stored on internal flash; nothing is ever uploaded to the cloud.
  • Energy Efficient – Runs on USB 5 V, draws <0.5 W, and can stay online 24/7.
  • Extensible – Supports web search (Brave Search API), current time retrieval, OTA firmware updates, WebSocket gateway, and HTTP proxy.

System Overview

MimiClaw is built around the OpenClaw architecture. When a message arrives via the Telegram API, the ESP32‑S3

  1. Retrieves the message over Wi‑Fi.
  2. Feeds the text into Claude through the Anthropic API.
  3. Executes the ReAct loop: Claude can call tools (e.g., web_search, get_current_time), iterate until a task is finished.
  4. Streams the reply back to the user.

All session data (chat hist, memory files, logs) live on the flash as plain‑text files – * SOUL.md controls the bot’s personality. * USER.md stores user preferences. * MEMORY.md holds long‑term knowledge. * Daily logs are saved per‑date.

The firmware is split across two CPU cores: network I/O runs on one, AI inference and tool execution on the other, ensuring smooth operation.

Quick Start Guide

A step‑by‑step outline to get your first MimiClaw running:

  1. Hardware – Purchase an ESP32‑S3 dev board with 16 MB flash / 8 MB PSRAM (e.g., Xiaozhi AI board). Keep a USB‑C cable ready.
  2. Software – Install ESP‑IDF 5.5+ using the official guide.
  3. Clone Repo
    git clone https://github.com/memovai/mimiclaw.git
    cd mimiclaw
    idf.py set-target esp32s3
    
  4. Configure Secrets – Copy the example file and fill in credentials:
    cp main/mimi_secrets.h.example main/mimi_secrets.h
    
  5. MIMI_SECRET_WIFI_SSID – Your Wi‑Fi SSID
  6. MIMI_SECRET_WIFI_PASS – Wi‑Fi password
  7. MIMI_SECRET_TG_TOKEN – Telegram bot token from @BotFather
  8. MIMI_SECRET_API_KEY – Anthropic API key
  9. (Optional) MIMI_SECRET_SEARCH_KEY – Brave Search API key
  10. Build & Flash
    idf.py fullclean && idf.py build
    idf.py -p <PORT> flash monitor
    
  11. Interact – Send a message to your bot on Telegram; you should receive an answer in under a minute.

Runtime Configuration

After the device boots, you can tweak settings via the serial CLI: * wifi_set SSID PASS – Switch Wi‑Fi * set_tg_token TOKEN – Change Telegram token * set_api_key KEY – Switch Anthropic key or LLM model * set_proxy IP PORT – Configure HTTP proxy * set_search_key KEY – Enable web search * config_show – Inspect current runtime config * memory_read / memory_write "text" – View & edit long‑term memory

The settings are persisted in NVS flash, so they survive reboots.

Use Cases & Examples

Personal Knowledge Base

Add notes to MEMORY.md or let the assistant ask you to add facts; it will remember across restarts.

Task Automation

Use the ReAct loop to have MimiClaw schedule events, send emails, or pull data from APIs – everything via simple messages.

Browsing & Fact‑Checking

Enable Brave Search and ask for the latest news; MimiClaw will fetch up‑to‑date data without exposing your queries to external servers.

Educational Projects

Students can explore how an LLM interacts with constrained hardware, study the OTA update process, or modify the architecture for custom tools.

Future Roadmap

The MimiClaw repo already includes a docs/TODO.md that tracks upcoming features: * Expanded tool set (e.g., file I/O, GPS, sensor data) * Support for additional LLM providers * UI gateway via HTTP/WebSocket for richer front‑ends * Performance optimisations for 8‑MB flash variants

Open‑source contributors are invited to help build these features, fine‑tune memory handling, and adapt MimiClaw to other microcontrollers.

Bottom Line

MimiClaw proves that a powerful, privacy‑first AI assistant can fit on a $5 ESP32‑S3 — no server required, all local, and completely open‑source. Whether you’re a hobbyist, educator, or early‑adopter developer, MimiClaw offers a tangible entry point into edge AI and embedded conversation agents.

Dive into the code, tweak the memory files, and let your own bot learn from you—all while keeping your data safe and offline.

Original Article: View Original

Share this article