# mi

A self-extending, sandboxed agentic coding harness built from one loop, two tools and a large language model, able to spawn subagents, pursue a high-level goal until a check command passes, and write its own new tools.

mi is a small agentic coding harness: a loop, a bash tool and a delegate tool, wired to any OpenAI-compatible API such as OpenAI, Ollama, LM Studio, LiteLLM or vLLM. The bash tool gives full system access, including git, curl, compilers and file editing, with optional timeouts and background execution; the delegate tool spawns a mi subagent with its own prompt in the same directory and API, streaming its output live, and a goal tool iterates subagents against a bash check command until it exits successfully, using a progress file so later iterations build on earlier work.

Agents can write their own tools through a built-in skill, and additional tools are added simply by dropping a script file into a tools folder, hot-loaded before each model call. A sandbox mode runs the whole harness inside a Docker container preloaded with common development utilities, for safe destructive experiments, and the tool reads a repository's own agent-instructions file automatically.

It runs directly with npx, installs globally from npm, or runs from a published Docker image, and supports both an interactive chat REPL and non-interactive scripting through a prompt flag or stdin.

Website: https://github.com/av/mi
