{"slug": "i-built-the-unoq-s-claw-a-tiny-agentic-ai-assistant-that-lives-inside-an-arduino", "title": "I Built The UnoQ's Claw: A Tiny Agentic AI Assistant That Lives Inside an Arduino Uno Q", "summary": "QClaw, an agentic AI assistant that runs entirely offline on an Arduino Uno Q board, hosting a local language model (Qwen3.5 0.8B) to autonomously generate, compile, and flash firmware to the board's microcontroller without any cloud API calls or external hardware probes. It features a dual-path runtime—an agentic path with eight tools for full sketch lifecycle management and a direct path for faster factual queries—and leverages the Uno Q's unique dual-silicon design, where the MPU controls the MCU via GPIO SWD for sub-second flashing.", "body_md": "Every \"AI on hardware\" demo you have ever seen has a LLM behind it. The user talks to a board via a terminal or Telegram, and the board calls an API to have a cloud model do the work. QClaw flips that arrangement. The Arduino Uno Q hosts the language model, runs the agent loop, drives the compile toolchain, and flashes its own microcontroller.\n\nAsk QClaw to scroll \"QClaw\" across the LED matrix and it does. End to end. On the board. Offline.\n\nQClaw has an eight-tool agentic surface, a fifteen-skill pre-router, and a direct OpenOCD flash route that makes autonomous uploads actually execute. A dual-path runtime lets you pick speed or full hardware control on the same model.\n\n**Why the Uno Q Is the Right Board for This**\n\nThe Arduino Uno Q is a split-silicon device. It looks like a classic Arduino on the outside, but it is two boards in a trench-coat:\n\nThe MPU and MCU share the same PCB. The MPU can hold the MCU in reset and reprogram its flash directly through GPIO pins wired to SWD via the `linuxgpiod`\n\ndriver. No USB cable between them. No probe. No second machine. That is the genius of QClaw.\n\nThe agentic loop orchestrates the full sketch lifecycle across the Arduino Uno Q's dual-silicon topology, with the MPU driving the loop and the MCU executing the resulting firmware. This is how QClaw generates, compiles, flashes, and observes.\n\nThe QClaw `arduino`\n\ntool invokes OpenOCD directly at the correct address. The tool compiles with `arduino-cli compile --fqbn arduino:zephyr:unoq --export-binaries`\n\n, picks up the resulting `.elf-zsk.bin`\n\n, and pipes it through OpenOCD over the GPIO SWD bridge. No SSH, no network credentials, no remote OCD tunnel. Just MPU to MCU, on the same board. Sub-second flash once the binary is on disk.\n\nFour gigs of RAM is also more than enough to host a Qwen3.5 0.8B Q4_0 model with an 8K context window, mlocked, with q8_0 KV cache. QClaw lives on the Uno Q at around 1.3 GB. Decode runs at roughly 8 tokens per second. Slow next to a desktop GPU, fast enough that a sketch compiles and flashes before you have finished your coffee.\n\n**How To Use QClaw **\n\nQClaw ships two runtimes on top of the same llama-server backend, the same `SOUL.md`\n\n, and the same 23-rule pre-router. They differ in what wraps the LLM call.\n\nAgentic path (`make qclaw-agentic`\n\n). the qclaw Go gateway sits in front of the model. It runs channel adapters (terminal, SSH, Telegram), the multi-iteration agent loop, the pre-router, and the eight-tool dispatcher. This is the production default. It is the only path that can actually compile and flash a sketch.\n\nDirect path (`make qclaw-direct`\n\n). A thin Python REPL POSTs directly to `llama-server`\n\nafter running the same pre-router rules in Python. No loop, no tools, no Telegram. About 33 percent lower latency on pure factual prompts at equivalent correctness, because there is no tool schema in the prompt and no second iteration.\n\nUse the agentic path when you want a sketch flashed or a frame captured. Use the direct path when you just want to ask which pins on the Uno Q do PWM.\n\nDrop in two commands and you have a session:\n\n```\ngit clone https://github.com/laurenvil/Uno-QClaw.git ~/ArduinoApps/QClaw     \n\ncd ~/ArduinoApps/QClaw     \n\ngit submodule update --init --recursive     \n\n# Download the inference engine     \n\ncd yzma && make download-llama.cpp && cd ..     \n\n# Download the model (~490 MB for Q4_0)     \n\nmkdir -p ~/models     \n\nwget -O ~/models/Qwen_Qwen3.5-0.8B-Q4_0.gguf \\     \n\n     'https://huggingface.co/Qwen/Qwen3.5-0.8B-GGUF/resolve/main/Qwen3.5-0.8B-Q4_0.gguf'     \n\n# Build, install arduino-cli, configure (one time)     \n\nmake qclaw-install     \n\n# Start a session — pick a path     \n\nmake qclaw-agentic    # full agent loop + 8 tools (compile/upload/camera/sysfs_led/network/i2cdetect)     \n\nmake qclaw-direct     # pre-router + direct API (fast Q&A, no tools)\n```\n\n`make qclaw-install`\n\nbuilds the Go binary, copies the system prompt and the fifteen-skill tree into `~/.qclaw/workspace/`\n\n, installs `arduino-cli`\n\nplus the `arduino:zephyr`\n\ncore, and runs an interactive wizard that sets up the optional Telegram gateway.\n\nOnce it is running, the agent has eight narrowly-scoped tools available:\n\n`read_file`\n\n, `write_file`\n\n, `list_dir`\n\nfor workspace navigation\n\n`arduino`\n\nfor compile and flash via OpenOCD\n\n`camera`\n\nfor single-frame V4L2 capture through GStreamer\n\n`sysfs_led`\n\nfor the MPU-side RGB LEDs at `/sys/class/leds/*`\n\n`network`\n\nfor hostname, interfaces, and the default gateway, all read-only stdlib Go\n\n`i2cdetect`\n\nfor listing and scanning Linux I²C buses with `-y -r`\n\nonly\n\nNo general `exec`\n\n. No general shell. Every tool validates its arguments against an allow-list. The total tool schema is around 3.4K characters, leaving plenty of room for the system prompt at an 8K context window.\n\n**The Pre-Router: Skills, Not RAG**\n\nThe pre-router is the part of QClaw that does the heavy lifting on a 0.8B model. It is not RAG. It is a flat table of 23 keyword regex rules across 15 skills. When you send a message, the pre-router scans it, finds matching rules, and inlines the relevant `SKILL.md`\n\nplus its referenced files directly into the system prompt before the LLM call.\n\nThe model never has to call `read_file`\n\nfor canonical skill content. The content is already there. At 0.8B scale, a `read_file`\n\ncall costs a full LLM iteration, roughly 10 to 20 minutes of cold prefill plus decode. The pre-router amortizes that to zero.\n\n**The skills cover: **\n\nSketch fundamentals: blink, breathe, button, potentiometer, servo, compile and upload, CAN bus, DAC, OPAMP\n\nThe 13x8 LED matrix with the canonical Arduino_LED_Matrix template\n\nUno Q hardware: pin tables, voltage rules, connectors, power\n\nDual-chip workflow: Bridge RPC, App Lab, Bricks\n\nLinux-side capabilities: Wi-Fi, Bluetooth, camera, OpenCV, microphone, sysfs LEDs\n\nPlug-and-play Modulino sensors\n\nEach skill is just a directory under `workspace/skills/<name>/`\n\nwith a `SKILL.md`\n\nand optional reference files. Adding a new one is a matter of writing the markdown and adding a regex rule.\n\n**Try It **\n\n**Repo:**[https://github.com/laurenvil/Uno-QClaw](https://github.com/laurenvil/Uno-QClaw)\n\nIssues, forks, and pull requests are welcome at [https://github.com/laurenvil/Uno-QClaw](https://github.com/laurenvil/Uno-QClaw). If you have an Arduino Uno Q on your desk, you can have a self-flashing AI assistant sitting on it tonight, with the Ethernet cable unplugged.", "url": "https://wpnews.pro/news/i-built-the-unoq-s-claw-a-tiny-agentic-ai-assistant-that-lives-inside-an-arduino", "canonical_source": "https://dev.to/david_laurenvil_5d43bea48/i-built-the-unoqs-claw-a-tiny-agentic-ai-assistant-that-lives-inside-an-arduino-uno-q-g48", "published_at": "2026-05-21 05:42:00+00:00", "updated_at": "2026-05-21 06:20:34.517779+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "hardware", "open-source", "developer-tools"], "entities": ["Arduino Uno Q", "QClaw", "OpenOCD", "arduino-cli", "MPU", "MCU", "SWD", "linuxgpiod"], "alternates": {"html": "https://wpnews.pro/news/i-built-the-unoq-s-claw-a-tiny-agentic-ai-assistant-that-lives-inside-an-arduino", "markdown": "https://wpnews.pro/news/i-built-the-unoq-s-claw-a-tiny-agentic-ai-assistant-that-lives-inside-an-arduino.md", "text": "https://wpnews.pro/news/i-built-the-unoq-s-claw-a-tiny-agentic-ai-assistant-that-lives-inside-an-arduino.txt", "jsonld": "https://wpnews.pro/news/i-built-the-unoq-s-claw-a-tiny-agentic-ai-assistant-that-lives-inside-an-arduino.jsonld"}}