Noureddine RAMDI / PycoClaw: Running full OpenClaw AI agents on $5 ESP32 microcontrollers with MicroPython

Created Mon, 04 May 2026 10:23:02 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

jetpax/pycoclaw

Running a full-featured AI agent framework on a $5 microcontroller sounds like a stretch, but PycoClaw pulls it off by porting OpenClaw to MicroPython for ESP32 chips. This project tackles the challenge of fitting a conversational AI agent runtime, complete with hybrid memory and multi-agent lifecycle management, into the tight memory and power constraints of embedded hardware.

What pycoclaw does and how it’s built

PycoClaw is a port of the OpenClaw agent framework designed to run on MicroPython-compatible ESP32 microcontrollers, specifically the ESP32-S3, ESP32-P4, and ESP32-C6 models with at least 8MB of flash memory and 4MB of PSRAM. The goal is to bring full conversational AI agents to these low-cost, low-power devices.

At its core, PycoClaw implements the Prefrontal Cortex (PFC) agent core from OpenClaw feature-for-feature. This includes a hybrid TF-IDF plus vector memory system, subagent lifecycle management (spawn, steer, reap), cron-driven proactive wake-ups for scheduling tasks, and support for dynamic skill loading from a centralized skill repository called ScriptoHub.

The architecture also includes compatibility with multiple large language model (LLM) providers, achieved through an OpenAI API-compatible interface that tolerates quirks and argument differences for providers like GLM, Qwen, and Moonshot. Management and telemetry are handled through the Scripto Studio progressive web app (PWA), which offers a live heads-up display and device management UI.

The stack is centered on MicroPython running on ESP32 hardware, leveraging the chip’s external flash and PSRAM to hold the runtime, memory, and agent logic. The project is open source under the MIT license and is production-ready on the aforementioned ESP32 models, with RP2350 support still in development.

Why pycoclaw stands out: engineering AI agents on constrained hardware

What distinguishes PycoClaw is how it adapts a complex AI agent framework, originally designed for more capable environments, to fit within the milliwatt power budgets and megabyte-scale memory limits of ESP32-class MCUs.

The hybrid memory system combines TF-IDF, a classical information retrieval technique, with vector embeddings to balance accuracy and compute overhead. This hybrid approach is specifically chosen to reduce the footprint compared to pure vector memory systems, which are typically more resource intensive.

Managing multiple subagents within the constrained runtime is another technical highlight. PycoClaw implements a lifecycle for subagents that includes spawning new agents to handle tasks, steering their behavior dynamically, and reaping completed agents to free resources. This prevents resource leaks and keeps memory usage predictable.

The cron-driven wake-up mechanism is a smart way to handle periodic or scheduled tasks without keeping the device fully active, important for low-power embedded operation. Instead of polling or continuous runtime, agents can wake proactively based on cron schedules.

Supporting multiple LLM backends via an OpenAI-spec-compatible client is notable given the limited environment. The code includes tolerant argument coercion to handle quirks of different providers, so the system can interoperate with a range of models without breaking.

The codebase itself strikes a balance between minimal dependencies and full capabilities. It’s surprisingly clean for an embedded MicroPython project that handles complex state, concurrency, and network interactions. That said, the hardware requirements—≥8MB flash and ≥4MB PSRAM—are non-trivial for some embedded contexts, and the project is limited to ESP32 variants that meet those specs.

Quick start to get pycoclaw running

  1. Get hardware — ESP32-S3 or P4 with ≥8MB flash + ≥4MB PSRAM (~$5)
  2. Install firmware — pycoclaw.com/install — one-click browser flasher
  3. Manage device — Scripto Studio PWA (chat panel, file editor, config)

This minimal setup flow highlights PycoClaw’s focus on ease of deployment for embedded AI agents. The one-click flasher simplifies firmware installation, and the web-based management UI reduces the need for complex toolchains.

Verdict: who should consider using pycoclaw?

PycoClaw is a solid choice for embedded and IoT developers who want to run conversational AI agents directly on affordable ESP32 microcontrollers with MicroPython. It’s production-ready on supported ESP32 models and offers a rich feature set including hybrid memory and dynamic subagent management.

The main limitation is hardware: you need at least 8MB flash and 4MB PSRAM, which excludes many lower-end MCUs. Also, the RP2350 support is still in progress, so if you’re targeting that hardware, expect some waiting.

For AI practitioners interested in edge computing, PycoClaw demonstrates a practical engineering approach to packing AI agent runtimes into constrained environments without sacrificing key capabilities. The project’s open design and integration with the Scripto Studio PWA improve DX for managing agents remotely.

Overall, PycoClaw is worth exploring if you want to push conversational AI to the edge on cheap hardware, with a clear understanding of the tradeoffs involved in memory, compute, and power.


→ GitHub Repo: jetpax/pycoclaw ⭐ 127 · Astro