A developer published on GitHub a coding agent stripped to its core: nine lines of Python, no external dependencies, a single tool – the shell. The code, under the smol-env/smol project, stems from a radical question: how minimal can an AI coding assistant get before it becomes useless? For now, the answer is striking: an input loop, a call to an OpenAI Responses-compatible API, and a command executor are enough.

The secret lies entirely in the standard library. HTTP requests, JSON parsing, subprocess execution, and session handling are all handled by built-in Python modules, with no third-party imports. The agent keeps an append-only message history, uses a session_id for server-side caching, and shows the context window usage as a percentage – all with near-educational clarity. No system prompt, no complex toolchains: just a custom tool named “sh” that turns commands into real actions.

For those working in on-premise or air-gapped environments, this experiment carries a different weight. It is not a hacker’s curiosity; it’s a principle: the most useful agent is often the one that adds the fewest layers between the model and the user. In a self-hosted deployment, every external dependency is a risk vector, a maintenance cost, a potential security bottleneck. An agent running on vanilla Python and talking to a local LLM endpoint (via vLLM, Ollama, or any compatible server) wipes out dependency debt and reduces the attack surface. The choice to skip a system prompt also eliminates token overhead that, in TCO calculations, becomes real cost at scale across thousands of interactions.

The use of a “custom tools” API – still sparsely supported, as the author acknowledges – is a signal: the API landscape is evolving to include generic tools without the rigidity of function calling. Until widespread endpoints catch up, swapping the model name and tool type is enough to make the agent work with any local interface. This flexibility turns nine lines of code into a portability manifesto: the same script can talk to open-weight models running on consumer hardware, industrial GPUs, or Kubernetes clusters.

The implications go beyond convenience. Such a bare-bones agent questions the bloated architecture of many commercial assistants. If a tiny script can orchestrate an LLM effectively, perhaps the complexity of platforms like GitHub Copilot or Cursor is largely interface and IDE integration, not intrinsic power. For companies that want to give their developers an in-house copilot without sending source code to the cloud, this minimalist approach is a prototype of an alternative path: auditable, customizable, and governable with the same tools that already secure the internal infrastructure.

A second-order effect hints at a compositional trend: single-file agents, in Python but also in Go (a ~20-line version is already available) or Clojure (announced), that can be combined without heavyweight frameworks. In the medium term, this shifts incentives: the strength of an AI assistant is no longer defined by the tooling vendor, but by model quality and reliable action execution. For those investing in local hardware, a few dozen lines of code can unlock a private AI co-development experience, reducing dependence on external services and granting more freedom in every infrastructure choice.

The story of these nine lines is, ultimately, a lesson in computational minimalism that the local AI industry is still struggling to absorb: complex orchestrations are not always needed to extract value from an LLM. Sometimes a while loop and a bit of common sense are more than enough.