agent

Crumb - a small self-improving agent harness in under 200 lines of hand-written TypeScript. Bun runtime, no external libraries.

Zohaib Rauf· May 27, 2026 · 1 min read min read

The goal wasn't to build something useful. It was to take the magic out of "self-improving agent harness" by writing the smallest readable version of one.

When it decides to improve itself it edits its own code. The runtime reloads the new code into a fresh process and hands the conversation state back - so the next turn is the upgraded agent still talking to you with full memory.

It only has 5 tools which are get_user_input, call_shell, clear_conversation, restart and exit. call_shell does most of the heavy lifting and makes it into a capable agent.