Lightweight Autonomous Coding Agent, Mi, Fits Inside a JavaScript File

Quick Reads
- Mi is an autonomous coding agent contained in a single JavaScript file with approximately 30 lines of core logic.
- It works with any OpenAI-compatible API, including Ollama and local models.
- Two built-in tools, Bash and Skills, handle code reading, writing, testing, and debugging.
- Developers can extend it by adding a .mjs file to the tools folder.
- Mi is MIT-licensed, runs anywhere Node.js runs, and is available via npm or npx.
A developer released Mi, a lightweight autonomous coding agent running entirely from a single JavaScript file. Additionally, it offers an open-source alternative to bulkier AI coding tools.
Ivan Charapanau published the project on GitHub under the username “av.” Moreover, Mi works with OpenAI-compatible APIs, including OpenAI, Ollama, and locally hosted models. The project also relies only on Node.js built-ins, avoiding external dependencies entirely.
The latest v1.6.1 release launched on April 27, 2026. Since launch, the project has gained 19 GitHub stars and four forks.
At its core, Mi runs a continuous operational loop. First, it calls the language model and checks whether the model requests tools. Then, Mi executes those tools, returns results, and repeats the process automatically.
Two built-in tools drive the workflow efficiently. Bash provides full system access, while Skills loads markdown playbooks whenever developers request them. Consequently, the agent can read repositories, write code, run tests, and debug failures independently.
Developers can also add new tools by dropping a .mjs file into the tools folder. Mi automatically discovers those tools during startup. Furthermore, the agent supports recursive sub-agents and non-interactive scripting through the -p flag. It also accepts stdin piping for shell-based workflows.
Meanwhile, developers can switch models by changing a single environment variable. As a result, Mi avoids vendor lock-in entirely. The project also uses the MIT license and supports installation through npx @avcodes/mi or npm globally.
However, Mi stands out because of its simplicity rather than its feature count. The agentic logic runs in roughly 30 lines of code. Therefore, developers can quickly read and fully understand the entire system. According to the documentation, the project intentionally proves that agentic harnesses do not require complex architectures.





