kidwit by Sabbir Amin
A coding agent
in one file.
kidwit reads your code, edits files and runs commands. It is plain Python with no dependencies, it works inside one directory, and it asks before it changes anything. I built it to see how little a coding agent needs.
>> the test for average() fails, fix it · run python3 -m unittest · read_file stats.py ▌ average() divides by len(xs) + 1. It should divide by len(xs). ┌ permission needed · edit stats.py - return sum(xs) / (len(xs) + 1) + return sum(xs) / len(xs) └ allow? [y/a/n] y · run python3 -m unittest ▌ Fixed. All tests pass.
How it works
Small on purpose
Most coding agents are big. kidwit is a loop, six tools and two API adapters.
file
The whole engine is kidwit.py, about 600 lines of code. You can read it in an evening.
dependencies
Standard-library Python only. Nothing to install except Python 3.9 or newer.
tools
list_files, search, read_file, write_file, edit_file and run.
Models
Use the model you already have
kidwit uses native tool calling. Pick a provider with one environment variable.
Anthropic
The Messages API, with prompt caching. Set ANTHROPIC_API_KEY.
OpenAI-compatible
DeepSeek, Kimi, OpenRouter, vLLM, or a local server such as Ollama or LM Studio. Set AGENT_BASE_URL.
Scriptable
Give it a task and it runs once and exits with 0 or 1. --json streams events for your own UI.
Safety
It asks first
Every write, edit and command shows a diff or the exact command, and waits for your answer.
Three modes
Ask (default), --yes to skip prompts, and --read-only to remove the write tools completely.
Danger guard
rm -rf, sudo, curl | sh, git push and similar commands ask every time, even with --yes.
Undo and audit
/undo restores the last file change byte for byte. Every action is logged to .agent/audit.jsonl.
Path jail
File tools refuse paths outside the project, including ../ and symlinks that lead out.
The limit: the jail covers file tools only. run executes real shell
commands as you, and there is no OS sandbox. Read each command before you approve it.
Install
Install
kidwit needs Python 3.9 or newer. Pick whichever way you like.
$ curl -fsSL https://kidwit.sabbiramin.dev/install | sh macOS and Linux. The script is open to read, never uses sudo, writes only inside your home directory, and checks a SHA-256 checksum when it downloads a file.
$ pipx install kidwit==0.1.0rc1 Installs kidwit into its own environment and puts it on your PATH.
$ uv tool install kidwit==0.1.0rc1$ uvx kidwit@0.1.0rc1 "fix the failing test"
The first line installs it. The second runs it once without installing.
$ pip install kidwit==0.1.0rc1 Works on Windows too. The tests pass there in CI, but nobody has run kidwit against a live model on Windows yet.
$ git clone https://github.com/sabbiramin113008/kidwit.git$ cd kidwit$ python3 src/kidwit.py "what does this project do?"
The whole engine is src/kidwit.py. Nothing to install.
Then set a key and run it: export ANTHROPIC_API_KEY=sk-ant-... and
kidwit "what does this project do?". For DeepSeek, Kimi or a local model, see
Configuration.
Status
What has been tested
This is early software, so here is the plain status.
| Area | Status |
|---|---|
| DeepSeek (OpenAI-compatible) on macOS, Python 3.14 | Tested live. 8 of 8 small eval tasks pass. |
| Linux, macOS and Windows, Python 3.14 | The offline tests pass in CI. No live-model run yet on Linux or Windows. |
| Anthropic API | Covered by offline tests. Not yet run live. |
| Python 3.9 to 3.13 | Not in CI yet. 3.10 to 3.13 passed once on Linux and macOS. |
The 8 tasks are small, so a pass rate says little yet. I plan a harder benchmark against other small agents.