Use the agent to add features to a small codebase by passing a prompt like 'implement a search function in this file'
Study the 100-line source to understand the core loop of an AI coding agent before building your own
Point the agent at a local Ollama or LM Studio endpoint to run tasks without spending on the OpenAI API
Start from the minimal harness and use the agent to extend itself into a more capable coding assistant
Requires Bun runtime and an OpenAI API key, works with any OpenAI-compatible endpoint via base URL config.
This is a small experiment in building a coding agent from scratch using about 100 lines of TypeScript. The premise: write the smallest possible harness by hand, then let the agent extend itself from there. The repository is as much a learning artifact as it is a working tool. To run it, you need Bun (a JavaScript runtime) installed along with an OpenAI API key. You can also point it at any API endpoint that speaks the OpenAI protocol by setting the base URL in a configuration file. Once set up, you start the agent with a prompt and it reads your code and executes tasks accordingly. The only mode currently implemented is non-interactive: you pass a prompt with a flag and the agent works through it without waiting for further input. A separate flag lets you continue from a previous session, which is useful for multi-step tasks where you want to build on earlier work. The README shows examples like asking the agent to add jokes to a file, implement a new feature, or make the project look nicer visually. The broader idea is that once the core loop exists, you can use the agent to expand itself. The repository includes a list of additional features to add, and the author's intent is that you implement those features through the agent itself. It is a self-extending starting point rather than a finished product. The project is lightweight by design and avoids unnecessary output. If you want to understand how AI coding agents work at their most basic level, or if you want a minimal base to build your own, this gives you a concise starting point with the full implementation visible in a single file.
← yujqiao on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.