kidwit

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.

How it works

Small on purpose

Most coding agents are big. kidwit is a loop, six tools and two API adapters.

1

file

The whole engine is kidwit.py, about 600 lines of code. You can read it in an evening.

0

dependencies

Standard-library Python only. Nothing to install except Python 3.9 or newer.

6

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.

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.

AreaStatus
DeepSeek (OpenAI-compatible) on macOS, Python 3.14Tested live. 8 of 8 small eval tasks pass.
Linux, macOS and Windows, Python 3.14The offline tests pass in CI. No live-model run yet on Linux or Windows.
Anthropic APICovered by offline tests. Not yet run live.
Python 3.9 to 3.13Not 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.