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.
>> 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.
Small on purpose
Most coding agents are big. kidwit is a case study in how little one needs: 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.
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.
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.
Be honest about 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
kidwit needs Python 3.9 or newer. Use whichever of these suits you.
From source, available now
$ git clone https://github.com/sabbiramin113008/kidwit.git $ cd kidwit $ export ANTHROPIC_API_KEY=sk-ant-... $ python3 src/kidwit.py "what does this project do?"
With pipx or uv, after the first release
$ pipx install kidwit $ uvx kidwit "fix the failing test"
One line, after the first release
$ curl -fsSL https://kidwit.sabbiramin.dev/install | sh
The installer never uses sudo and checks a SHA-256 checksum before it installs.
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. |
| Anthropic API | Covered by offline tests. Not yet run live. |
| Linux, Python 3.9 to 3.13 | Untested. CI will cover it. |
| Windows | Untested. |
The 8 tasks are small, so a pass rate says little yet. A harder benchmark against other small agents is planned.