Back to browse
GitHub Repository

A functional, secure and self-building claw in under 1500 lines of code

53 starsTypeScript

BitClaw – A self-upgrading AI agent in 1,500 lines of code

by nicktikhonov·Feb 24, 2026·4 points·0 comments

AI Analysis

●●SolidShip ItNiche GemBig Brain

Tiny auditable AI agent: read the whole thing over coffee, modify it yourself.

Strengths
  • Constraint-driven design (1.5K lines) forces clarity; entire codebase fits in Claude's context for self-modification
  • Deliberately boring architecture (Node.js + Docker + JSON files) avoids hidden complexity; no databases, queues, or magic
  • Honest comparison to predecessors (NanoClaw 4x larger, slower container startup) shows thoughtful iteration
Weaknesses
  • Early project (5 stars); no production deployments or failure case documentation yet
  • Self-upgrading claims not validated; unclear what happens when agent modifies critical paths or introduces bugs
Category
Target Audience

Developers and power users who want to understand and customize their AI agent without vendor lock-in

Similar To

OpenClaw · NanoClaw · Anthropic's Codebase Assistant (Claude MCP)

Post Description

Hey HN!

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 :)

Similar Projects

AI/ML●●Solid

AgenC – an agentic work factory focused on self-upgrading

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.

Rabbit HoleNiche Gem
mieubrisse
103mo ago