Airlock – self-upgrading compiled AI agents
Compiles Go binaries that mix hard code with AI calls and actually self-upgrade.
A functional, secure and self-building claw in under 1500 lines of code
Tiny auditable AI agent: read the whole thing over coffee, modify it yourself.
Developers and power users who want to understand and customize their AI agent without vendor lock-in
OpenClaw · NanoClaw · Anthropic's Codebase Assistant (Claude MCP)
I wanted an always-on AI agent for email, calendar, and scheduled tasks - but I didn't want to run a codebase I couldn't fully understand. So I built one small enough to read in a sitting.
I was inspired by Karpathy's post about NanoClaw, and how a smaller source code footprint leads to better security and extensibility. But even NanoClaw was harder to understand than I expected - a lot of logic for supporting multiple channels simultaneously, and it felt sluggish due to container startup time on every message. So I built an even smaller agent that keeps a single session on an always-on Docker container. It's about 4x smaller in codebase size and noticeably faster.
The architecture is deliberately boring: a single Node.js process manages a Docker container running the Claude agent SDK. Host and container communicate through atomic JSON files. No databases, no message queues.
Since the entire codebase fits in Claude's context window, the agent can modify its own source to add new capabilities — Gmail, Google Calendar, or whatever MCP server you point it at. Every source file is listed in the README with line counts, I encourage you to read it!
Would love your feedback on my approach and welcome any contributions :)
Compiles Go binaries that mix hard code with AI calls and actually self-upgrade.
Someone actually solved the annoying UX around running dozens of agent sessions: per-agent sandboxing, a command palette with hotkeys, and built-in secrets injection make spinning up and triaging failed runs painless. There’s also an on-board assistant that can configure and drive the factory — smart move for reducing CLI friction. The tradeoff is obvious: it’s tightly coupled to macOS and Claude, so it’s brilliant if you live in that ecosystem but niche otherwise.
Clever filesystem IPC for workers, but it's Claude Code-locked and unproven at scale.
Stores mail as Markdown files so LLMs can read inboxes without complex parsers.
Agent rewrites own code, but unclear if self-modification meaningfully improves behavior.
Human approval flows prevent agents from sending emails without review.