35 KB AI Logic, 888 KiB Firmware, and a Claw Pattern That Runs on Edge Hardware

repotoolaiinfrastructureembeddedciotedge-computingpattern

This pattern is directly relevant to Joel's system as a concrete model for hardware edge nodes that can execute scheduled actions, maintain local state, and stay inside a hard resource budget when remote services are unavailable.

35 KB assistant logic inside a <= 888 KiB all-in firmware target is the part that changes how you think about AI infrastructure. The repo runs on ESP32 with C on top of ESP-IDF and FreeRTOS, and keeps the total build under the budget after Wi-Fi, TLS/crypto, and cert overhead. That is not just a neat spec sheet, it’s a discipline lesson: the stack is a systems problem, not a model problem.

The feature surface reads like a miniature operations plane. You get Telegram or web-relay chat, timezone-aware scheduling, user-defined and built-in tools, GPIO controls with bulk read support, persistent flash memory, and provider support for Anthropic, OpenAI, OpenRouter, and Ollama. It feels less like a chatbot and more like a constrained assistant service: one that acts on hardware and state instead of pretending all value is in prompts.

The scripts in the same repo (install.sh, provision-dev.sh, flash.sh, web-relay.sh, benchmark.sh) signal this was built for reuse, not a one-off demo. For a platform like joelclaw, this is a useful reference point for an event-driven edge node layer that keeps local scheduling and actuation close to hardware while preserving the same compositional assistant pattern.

Key Ideas

  • Hard limits force architecture clarity: explicit firmware accounting makes size, TLS overhead, and cert costs visible instead of hidden, which helps avoid fantasy features that only run in demos.
  • Same assistant pattern, smaller substrate: tool composition, scheduling, and memory are shipped together in a firmware-first form factor.
  • Actionable interface parity: Telegram chat and a web relay mean control paths remain familiar while the execution target is still an ESP32.
  • Physical world integration is first-class: GPIO and persistent state in the same loop turn AI from an information tool into a control tool.
  • Local dev posture matters: the bootstrap, provision, flash, monitor, and benchmark scripts compress the feedback loop you usually lose in embedded work.