explaingit

obra/smallest-agent

Analysis updated 2026-05-18

103Shell
This is a quick first-pass explanation. The richer sections — use-cases, tech stack, setup, prompts — are still being generated.

TLDR

This project is an experiment to see how small a working AI coding agent can be made.

Mindmap

A visual breakdown will appear here once this repo is fully enriched.

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

In plain English

This project is an experiment to see how small a working AI coding agent can be made. The author started with a larger version roughly equivalent to Claude Code, then used Claude itself to shrink the code repeatedly over about 20 minutes until almost nothing was left. The result is a JavaScript file that is 493 bytes, which is very small for a working program. A separate commented version of the same file exists with cleaner variable names so it is easier to read and understand what the tiny version is doing. A tool called terser is used to compress the readable version down into the minimal final file. The agent connects to a live AI API and can execute shell commands on your computer. The README includes a smoke test that sends a greeting, runs a command to generate a unique identifier, and tries a command that is expected to fail, to verify basic operation. The README includes a prominent warning that the agent has unrestricted access to run any shell command on your system. It can read files, write files, install software, or delete things. The warning is written bluntly: it might decide to erase all your files. This project is meant as a technical curiosity and demonstration, not a production tool to use without caution.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.