Resident — sandbox runtime for ESP32 devices<br>Resident<br>Code sandbox with hot reload for ESP32 devices.<br>alphaesp-idf/ArduinoMIT Open Source License<br>/resident:push-appgive me a lil guy on my m5stick<br>Start building →Try it now →<br>useresp32 devicesandboxdrivershardwarewebsocketagent, cli, webapp, eventsyour C++e.g. display, imu, leds
Why Resident<br>Devices need sandboxes for agents. AI is coming into the real world. Humble devices gain superpowers when they host user code.<br>A Lua sandbox with hardware IO. Drivers expose approved peripherals. The sandbox sees their events.<br>Claude, meet websockets. Use the Claude skill plus optional websockets to push and iterate apps. Your end users can swap and load apps too.
Start building<br>Bring up your ESP32 device as normal. Arduino and esp-idf frameworks are supported.<br>Add the sandbox with Resident::Sandbox and your custom drivers. Resident handles Wi-Fi, a WebSocket, JSON message routing and hot-reloading Lua apps over the network.<br>Create and push apps using the built-in Claude skills. Replace the back-end when you're ready.<br>Read the Resident docs on GitHub ↗<br>src/main.cpphello-world.lua<br>C++<br>#include<br>#include "MyDisplayDriver.h"<br>#include "MyButtonsDriver.h"
MyDisplayDriver display;<br>MyButtonsDriver buttons;
Resident::SandboxConfig makeConfig() {<br>Resident::SandboxConfig cfg;<br>cfg.deviceType = "demo";<br>cfg.statusDisplay = &display;<br>cfg.extensions = {&display, &buttons};
Courier::Config courier;<br>courier.host = "your-server.example.com";<br>cfg.network = courier;<br>return cfg;
Resident::Sandbox sandbox{makeConfig()};
void setup() { sandbox.setup(); }<br>void loop() { sandbox.loop(); }
Device. Your ESP32 device with connectivity and custom hardware.<br>Driver. Expose hardware functionality to the Lua sandbox with C++ extensions.<br>Sandbox. Lua runtime with hot-reloading capabilities and an isolated execution environment.<br>App. Lua apps that are quick to load, can be loaded over the network, and shared by your users.<br>Events. Events from hardware drivers and the network — JSON over websockets or MQTT.
Resident builds on Courier ↗ for batteries-included connectivity including Wi-Fi config and JSON messaging.
Try it now<br>We love M5StickS3 for prototyping. Before developing your ESP32 device, get this pocket-sized prototyping device from M5. It has an ESP32, 135×240 LCD, buttons, buzzer, IMU and a battery, and is perfect for trying Resident. Buy from Amazon ↗<br>Use our simulator right now. No hardware required — drag and drop an app onto our M5StickS3 simulator below. The simulator has the Resident sandbox pre-flashed and it is running in your browser.<br>Loading
Create and push apps from your terminal. Install the Resident skills to create, validate and push apps. We provide a back-end relay to load apps via websocket.<br>Tap to connectDevice ID:not connectedTry this in the browser. Tap to connect, then push an app to see the simulator update live.
❯/plugin marketplace add inanimate-tech/agent-pluginsCopy<br>❯/plugin install resident@inanimateCopy<br>❯/resident:push-app give me a lil guy on my m5stickCopy
examples/m5stick-demo ↗
Design notes<br>Sandboxes are a new primitive. We use Resident in all our prototyping at Inanimate, and these same capabilities will be in our products. As we build devices and a platform to bring AI agents into the real world, we’ve found that users need expressive control of their environments, and agents need a place to run code to make generative UI. On-device sandboxes are the foundational building block. Read more about the thinking behind Resident ↗<br>Made to be composable. We’re building Resident to integrate with existing firmware, frameworks, and back-end services. We love ESP32 so that’s where we’re starting: it’s used by makers, hardware startups, and in mass production. Our goal is that, whatever your hardware and whatever manages your run loop, you can add a sandbox.<br>Built for agents. AI agents are how we code now, and also the emerging interface for end users. So we have agent-facing docs that walk you through integrating Resident, and skills for the whole sandbox app creation lifecycle. Although there’s no edge AI here, we want to make it easy for agents to hermit crab behavior into the world. Add our marketplace to your Claude Code ↗
Resident<br>Code sandbox with hot reload for ESP32 devices.<br>Supported frameworks: esp-idf, Arduino.<br>MIT Open Source License.<br>Quick start, API docs, agent skills and examples on GitHub.<br>GitHub ↗
lualil-guy.lua
luaauto-tetris.lua
luapomodoro.lua
Idle · drag a doc onto the device