How memovai/mimiclaw works
MimiClaw is an ESP32-S3 AI assistant: users send messages through chat or a local interface; channel adapters queue them for the agent, which builds context, consults an LLM and tools, uses persistent memory, and returns a response through outbound dispatch. The product also includes WiFi onboarding, scheduled and heartbeat messages, skills, a WebSocket gateway, and device tools. Runtime wiring is supported by the excerpts and source index; tool implementations and some auxiliary subsystems were not sampled, so uncertain links are marked dashed.
Main entry points: message_bus.c Message bus · tool_registry.c Tool registry · agent_loop.c Agent loop · mimi.c Outbound dispatch
Components 29
Interfaces & connectivity
- Telegram bot
main/channels/telegram/telegram_bot.c - Feishu bot
main/channels/feishu/feishu_bot.c - Serial CLI
main/cli/serial_cli.c - WiFi onboarding
main/onboard/wifi_onboard.c - WiFi manager
main/wifi/wifi_manager.c - WebSocket gateway
main/gateway/ws_server.c
Agent & conversation
- Message bus
main/bus/message_bus.c - Agent loop
main/agent/agent_loop.c - Context builder
main/agent/context_builder.c - LLM proxy
main/llm/llm_proxy.c - Session manager
main/memory/session_mgr.c - Long-term memory
main/memory/memory_store.c - Outbound dispatch
main/mimi.c
Assistant capabilities
- Tool registry
main/tools/tool_registry.c - Web search
main/tools/tool_web_search.c - Cron tools
main/tools/tool_cron.c - File tools
main/tools/tool_files.c - GPIO tools
main/tools/tool_gpio.c - Time tool
main/tools/tool_get_time.c - Skills loader
main/skills/skill_loader.c
Device operations
- Cron service
main/cron/cron_service.c - Heartbeat service
main/heartbeat/heartbeat.c - HTTP proxy
main/proxy/http_proxy.c - OTA manager
main/ota/ota_manager.c
Other components
- User
- LLM provider
- Search providers
- SPIFFS storage
- NVS config
Connections 38
- User → Telegram bot: sends message
README.md - Telegram bot → Message bus: queues inbound
main/channels/telegram/telegram_bot.c - Feishu bot → Message bus: queues inbound
main/channels/feishu/feishu_bot.c - Serial CLI → Message bus: queues inbound
- WebSocket gateway → Message bus: queues inbound
main/gateway/ws_server.c - Message bus → Agent loop: delivers inbound
main/agent/agent_loop.c - Agent loop → Context builder: builds context
main/agent/agent_loop.c - Agent loop → LLM proxy: requests completion
main/agent/agent_loop.c - Agent loop → Session manager: loads and appends
main/agent/agent_loop.c - Agent loop → Tool registry: executes tools
main/agent/agent_loop.c - Context builder → Long-term memory: reads memory
main/agent/context_builder.c - Context builder → Skills loader: loads skill summary
main/agent/context_builder.c - LLM proxy → LLM provider: calls provider
README.md - Tool registry → Web search: dispatches tool
- Tool registry → Cron tools: dispatches tool
- Tool registry → File tools: dispatches tool
- Tool registry → GPIO tools: dispatches tool
- Tool registry → Time tool: dispatches tool
- Web search → Search providers: queries providers
- Telegram bot → HTTP proxy: uses HTTPS proxy
main/channels/telegram/telegram_bot.c - Feishu bot → HTTP proxy: uses HTTPS proxy
main/channels/feishu/feishu_bot.c - LLM proxy → HTTP proxy: uses HTTPS proxy
main/llm/llm_proxy.c - Web search → HTTP proxy: uses HTTPS proxy
main/tools/tool_web_search.c - Cron service → Message bus: queues due message
main/cron/cron_service.c - Heartbeat service → Message bus: queues check message
main/heartbeat/heartbeat.c - Cron tools → Cron service: manages schedules
- Outbound dispatch → Message bus: pops responses
main/mimi.c - Outbound dispatch → Telegram bot: sends response
main/mimi.c - Outbound dispatch → Feishu bot: sends response
main/mimi.c - Outbound dispatch → WebSocket gateway: sends response
main/mimi.c - WiFi onboarding → WiFi manager: sets up WiFi
main/onboard/wifi_onboard.c - User → WiFi onboarding: configures network
- Session manager → SPIFFS storage: stores histories
- Long-term memory → SPIFFS storage: stores memory
- Cron service → SPIFFS storage: persists jobs
main/cron/cron_service.c - WiFi manager → NVS config: stores credentials
- LLM proxy → NVS config: stores settings
- OTA manager → User: updates firmware