An Arduino library for running MimiClaw AI Agent on ESP32-S3 with PSRAM.
- ReAct Agent Loop — Autonomous AI agent with tool calling (up to 10 iterations)
- Dual LLM Support — Anthropic Claude and OpenAI GPT models
- Telegram Bot — Long-polling Telegram bot integration
- WebSocket Server — Real-time communication gateway
- Persistent Memory — SPIFFS-based long-term memory and daily notes
- Session Management — Per-chat conversation history (JSONL)
- 9 Built-in Tools — Web search, file I/O, time, cron scheduling
- Skill System — Extensible skill files loaded from SPIFFS
- Cron Scheduler — Recurring and one-shot scheduled tasks
- Heartbeat — Periodic HEARTBEAT.md file checking
- HTTP/SOCKS5 Proxy — Optional proxy support for all API calls
- ESP32-S3 board with PSRAM (recommended: 8MB+ PSRAM, 16MB flash)
- WiFi connectivity
Install via Arduino Library Manager:
- ArduinoJson v7.0+ by Benoit Blanchon
- WebSockets v2.4+ by Markus Sattler (links2004)
- Install the library (copy
MimiClawfolder to Arduinolibraries/) - Install dependencies (ArduinoJson, WebSockets)
- Upload
data/folder to SPIFFS using "ESP32 Sketch Data Upload" - Open
Examples > MimiClaw > BasicAgent - Set your WiFi, Telegram, and API credentials
- Upload to your ESP32-S3 board
| Setting | Value |
|---|---|
| Board | ESP32S3 Dev Module |
| PSRAM | OPI PSRAM |
| Flash Size | 16MB (128Mb) |
| Partition Scheme | Default with large SPIFFS |
#include <MimiClaw.h>
MimiClaw mimi;
// Setup
mimi.begin(); // Initialize all subsystems
mimi.setWiFi("SSID", "PASSWORD"); // WiFi credentials
mimi.setTelegramToken("BOT_TOKEN"); // Telegram bot token
mimi.setApiKey("API_KEY"); // LLM API key
mimi.setModelProvider("anthropic"); // "anthropic" or "openai"
mimi.setModel("claude-opus-4-5"); // Model name
mimi.setSearchKey("BRAVE_KEY"); // Brave Search API key
mimi.setTimezone("CST-8"); // POSIX timezone
mimi.setProxy("host", 8080, "http"); // HTTP/SOCKS5 proxy
mimi.start(); // Start all services
// Loop
mimi.loop(); // Call in loop()
// Access subsystems
mimi.memory(); // MimiMemory — read/write persistent memory
mimi.session(); // MimiSession — conversation history
mimi.tools(); // MimiToolRegistry — register custom tools
mimi.cron(); // MimiCron — manage scheduled jobsbool myToolExecute(const char* input_json, char* output, size_t output_size) {
// Parse input_json, do work, write result to output
snprintf(output, output_size, "Tool result here");
return true;
}
MimiTool myTool = {
.name = "my_tool",
.description = "Description of what this tool does",
.input_schema_json = "{\"type\":\"object\",\"properties\":{\"param\":{\"type\":\"string\"}},\"required\":[\"param\"]}",
.execute = myToolExecute
};
mimi.tools().registerTool(&myTool);┌──────────────────────────────────────────────┐
│ MimiClaw │
│ │
│ ┌─────────┐ ┌──────┐ ┌───────────────┐ │
│ │Telegram │──>│ │──>│ Agent Loop │ │
│ │Bot │ │ Bus │ │ (ReAct) │ │
│ └─────────┘ │ │ │ │ │
│ ┌─────────┐ │ In │ │ System Prompt │ │
│ │WebSocket│──>│ + │ │ + LLM Call │ │
│ │Server │ │ Out │ │ + Tool Exec │ │
│ └─────────┘ │ │ │ + Session │ │
│ ┌─────────┐ │ │<──│ │ │
│ │Cron │──>│ │ └───────────────┘ │
│ │Heartbeat│ └──────┘ │
│ └─────────┘ │
│ │
│ Storage: SPIFFS (memory, sessions, skills) │
│ LLM: Anthropic / OpenAI via HTTPS │
└──────────────────────────────────────────────┘
Upload the data/ folder to SPIFFS:
/spiffs/
config/
SOUL.md — AI personality definition
USER.md — User info (auto-populated)
memory/
MEMORY.md — Long-term persistent memory
daily/ — Daily notes (auto-created)
sessions/ — Chat session files (auto-created)
skills/ — Skill files (auto-created)
cron.json — Scheduled jobs (auto-created)
MIT — See original MimiClaw project.