Send "mimi😗is working..." to user when processing starts.
List get_current_time in system prompt available tools so the agent
knows to call it for time/date queries. Remove auto time fetch from
system prompt builder — agent calls the tool on demand.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fetches real time via HTTP Date header (works through proxy),
sets system clock, and returns formatted local time to the agent.
Also adds MIMI_TIMEZONE config and updates default model to claude-opus-4-5.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite agent_loop.c with ReAct tool use loop: LLM call → tool
execution → repeat until end_turn (max 10 iterations). Add tool
guidance to system prompt. Add set_search_key CLI command.
Add mimi_secrets.h for build-time credentials with highest priority
over NVS/CLI values. All modules (wifi, telegram, llm, proxy,
web_search) check build-time secrets first, fall back to NVS.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace SSE streaming with non-streaming JSON for Anthropic API.
Add llm_chat_tools() returning structured llm_response_t with text
and tool_use blocks. Implement tool registry with dispatch-by-name
and web_search tool via Brave Search API (direct + proxy support).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CLI task stack is 4KB; the 4096-byte stack buffer in cmd_memory_read
was overflowing and corrupting the heap. Use malloc instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable ESP32-S3 to reach api.telegram.org and api.anthropic.com through
an HTTP CONNECT proxy (e.g. Clash Verge), required in regions where
these services are blocked.
- New proxy module (http_proxy.c/h): CONNECT tunnel + TLS via esp_tls
with pre-connected socket injection (esp_tls_set_conn_sockfd)
- Telegram and LLM modules split into direct/proxy paths
- CLI commands: set_proxy <host> <port>, clear_proxy
- Proxy config persisted in NVS
- Fix TLS buffer: MBEDTLS_SSL_IN_CONTENT_LEN 4096 → 16384
- Increase task stacks for TLS overhead (poll 12KB, agent 12KB, outbound 8KB)
- Default model changed to claude-opus-4-6
- Capture raw error body for non-200 API responses
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All HTTP clients (Telegram, Claude API, OTA) were missing
crt_bundle_attach, causing TLS handshake failures. Add esp-tls
dependency to CMakeLists.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add app_update component to CMakeLists REQUIRES for OTA version
reporting. Add sdkconfig.defaults scaffold and gitignore nanobot
reference repo.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wraps esp_https_ota for over-the-air updates via HTTPS.
Dual OTA partitions enable safe rollback.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
JSON protocol server using esp_http_server with WS upgrade.
Supports up to 4 concurrent clients, auto-assigned chat_id,
routes messages through the agent via message bus.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
MEMORY.md for long-term memory, daily YYYY-MM-DD.md notes.
JSONL session files per chat_id with ring buffer history
(max 20 messages). All persisted on SPIFFS.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Agent loop runs on Core 1: pops inbound messages, builds system
prompt from bootstrap files + memory, calls Claude API, saves
session, pushes response to outbound queue. PSRAM-allocated buffers.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Anthropic Messages API integration with streaming response.
Parses content_block_delta SSE events, accumulates text tokens.
API key and model stored in NVS.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Direct HTTPS long polling against Telegram Bot API (getUpdates),
JSON parsing with cJSON, auto-split at 4096 chars, Markdown
with plain-text fallback.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
mimi_msg_t carries channel/chat_id/content between tasks.
Decouples input channels from agent loop and output dispatch.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
STA mode, reads SSID/password from NVS, exponential backoff
reconnect (1s-30s), EventGroup for connection state.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
16MB flash with custom partitions (2x2MB OTA + 12MB SPIFFS),
PSRAM/WiFi/TLS tuning, and centralized compile-time constants.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>