mirror of
https://github.com/m5stack/ESP-Claw.git
synced 2026-05-20 11:51:49 -07:00
basic_demo Guide
How It Works
The main entry point is application/basic_demo/main/main.c.
After the device boots, the overall flow is:
- Initialize NVS and load device settings
- Mount FATFS at
/fatfs - Initialize Wi-Fi and the local HTTP configuration service
- Enter
app_claw_start() - Initialize the event router, memory, skills, and capabilities
- Initialize and start
claw_core - Start the CLI and begin handling requests and events
The current runtime depends on the following local directories:
/fatfs/sessions: session history/fatfs/memory/MEMORY.md: long-term memory/fatfs/skills: skill documents and manifest/fatfs/scripts: Lua scripts/fatfs/router_rules/router_rules.json: automation rules/fatfs/inbox: message attachment storage
The current basic_demo integrates the following capabilities:
cap_im_qqcap_im_tgcap_filescap_luacap_mcp_clientcap_mcp_servercap_skill_mgrcap_timecap_llm_inspectcap_web_search
Quick Start
Prerequisites
- ESP-IDF is installed and exported
ESP-IDF v5.5.4is recommended
. <your-esp-idf-path>/export.sh
Configuration
To make esp-board-manager easier to use, first install the helper package with pip install esp-bmgr-assist. You only need to do this once in a given ESP-IDF environment.
- Generate board support files:
cd application/basic_demo
idf.py gen-bmgr-config -c ./boards -b esp32_S3_DevKitC_1
idf.py gen-bmgr-config -c ./boards -b <board_name>generates the configuration for the specified board. Available board names can be found in theboardsdirectory.
- Configure Wi-Fi, LLM, IM, search engine, and related parameters:
The key demo settings include:
- Wi-Fi SSID / Password
- LLM API Key / Provider / Model
- QQ App ID / App Secret
- Telegram Bot Token
- Brave / Tavily Search Key
- Timezone
Key Notes:
- IM bot token: available from Telegram @BotFather or QQ Bot
- LLM API key: available from Anthropic Console, OpenAI Platform, or Alibaba Cloud Bailian
You can adjust compile-time default values through menuconfig:
idf.py menuconfig
- Build and flash:
idf.py build
idf.py flash monitor